Skip to content

Commit 98dde1b

Browse files
committed
move warning to avoid overflow
1 parent 2bd2120 commit 98dde1b

File tree

2 files changed

+61
-60
lines changed

2 files changed

+61
-60
lines changed

atomic_defi_design/Dex/Exchange/Trade/ConfirmTradeModal.qml

+58-57
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ MultipageModal
2929
titleAlignment: Qt.AlignHCenter
3030
titleTopMargin: 0
3131
topMarginAfterTitle: 10
32-
flickMax: window.height - 430
32+
flickMax: window.height - 385
3333

3434
header: [
3535
RowLayout
@@ -77,62 +77,6 @@ MultipageModal
7777
{
7878
id: price_line
7979
Layout.fillWidth: true
80-
},
81-
82-
ColumnLayout
83-
{
84-
id: warnings_text
85-
Layout.fillWidth: true
86-
Layout.alignment: Qt.AlignHCenter
87-
88-
// Large margin warning
89-
FloatingBackground
90-
{
91-
Layout.alignment: Qt.AlignCenter
92-
width: childrenRect.width
93-
height: childrenRect.height
94-
color: Style.colorRed2
95-
visible: Math.abs(parseFloat(API.app.trading_pg.cex_price_diff)) >= 50
96-
97-
RowLayout
98-
{
99-
Layout.fillWidth: true
100-
101-
Item { width: 3 }
102-
103-
DefaultCheckBox
104-
{
105-
id: allow_bad_trade
106-
Layout.alignment: Qt.AlignCenter
107-
textColor: Style.colorWhite0
108-
visible: Math.abs(parseFloat(API.app.trading_pg.cex_price_diff)) >= 50
109-
spacing: 2
110-
boxWidth: 16
111-
boxHeight: 16
112-
boxRadius: 8
113-
label.wrapMode: Label.NoWrap
114-
text: qsTr("Trade price is more than 50% different to CEX! Confirm?")
115-
font: DexTypo.caption
116-
}
117-
}
118-
}
119-
120-
DefaultText
121-
{
122-
Layout.alignment: Qt.AlignHCenter
123-
text_value: qsTr("This swap request can not be undone and is a final event!")
124-
font: DexTypo.italic12
125-
color: Dex.CurrentTheme.foregroundColor2
126-
}
127-
128-
DefaultText
129-
{
130-
id: warnings_tx_time_text
131-
Layout.alignment: Qt.AlignHCenter
132-
text_value: qsTr("This transaction can take up to 60 mins - DO NOT close this application!")
133-
font: DexTypo.italic12
134-
color: Dex.CurrentTheme.foregroundColor2
135-
}
13680
}
13781
]
13882

@@ -244,6 +188,38 @@ MultipageModal
244188
}
245189
}
246190

191+
// Large margin warning
192+
FloatingBackground
193+
{
194+
Layout.alignment: Qt.AlignCenter
195+
width: childrenRect.width
196+
height: childrenRect.height
197+
color: Style.colorRed2
198+
visible: Math.abs(parseFloat(API.app.trading_pg.cex_price_diff)) >= 50
199+
200+
RowLayout
201+
{
202+
Layout.fillWidth: true
203+
204+
Item { width: 3 }
205+
206+
DefaultCheckBox
207+
{
208+
id: allow_bad_trade
209+
Layout.alignment: Qt.AlignCenter
210+
textColor: Style.colorWhite0
211+
visible: Math.abs(parseFloat(API.app.trading_pg.cex_price_diff)) >= 50
212+
spacing: 2
213+
boxWidth: 16
214+
boxHeight: 16
215+
boxRadius: 8
216+
label.wrapMode: Label.NoWrap
217+
text: qsTr("Trade price is more than 50% different to CEX! Confirm?")
218+
font: DexTypo.caption
219+
}
220+
}
221+
}
222+
247223
// Custom config section
248224
Item
249225
{
@@ -416,6 +392,31 @@ MultipageModal
416392
}
417393
}
418394

395+
ColumnLayout
396+
{
397+
id: warnings_text
398+
Layout.fillWidth: true
399+
Layout.alignment: Qt.AlignHCenter
400+
401+
402+
DefaultText
403+
{
404+
Layout.alignment: Qt.AlignHCenter
405+
text_value: qsTr("This swap request can not be undone and is a final event!")
406+
font: DexTypo.italic12
407+
color: Dex.CurrentTheme.foregroundColor2
408+
}
409+
410+
DefaultText
411+
{
412+
id: warnings_tx_time_text
413+
Layout.alignment: Qt.AlignHCenter
414+
text_value: qsTr("This transaction can take up to 60 mins - DO NOT close this application!")
415+
font: DexTypo.italic12
416+
color: Dex.CurrentTheme.foregroundColor2
417+
}
418+
}
419+
419420
Item
420421
{
421422
visible: buy_sell_rpc_busy

src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ namespace atomic_dex
8181
void
8282
qt_orderbook_wrapper::refresh_orderbook_model_data(mm2::orderbook_result_rpc answer)
8383
{
84-
SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] bids/asks size: {}/{}", answer.bids.size(), answer.asks.size());
84+
// SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] bids/asks size: {}/{}", answer.bids.size(), answer.asks.size());
8585
this->m_asks->refresh_orderbook_model_data(answer.asks);
8686
this->m_bids->refresh_orderbook_model_data(answer.bids);
8787
const auto data = this->m_system_manager.get_system<orderbook_scanner_service>().get_bestorders_data();
@@ -91,12 +91,12 @@ namespace atomic_dex
9191
}
9292
else if (m_best_orders->rowCount() == 0)
9393
{
94-
SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : reset_best_orders");
94+
// SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : reset_best_orders");
9595
m_best_orders->reset_orderbook(data, true);
9696
}
9797
else
9898
{
99-
SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : refresh_best_orders");
99+
// SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : refresh_best_orders");
100100
m_best_orders->refresh_orderbook_model_data(data, true);
101101
}
102102
this->set_both_taker_vol();

0 commit comments

Comments
 (0)