diff --git a/atomic_defi_design/Dex/Constants/General.qml b/atomic_defi_design/Dex/Constants/General.qml index 251c19456d..34c89b8fcf 100644 --- a/atomic_defi_design/Dex/Constants/General.qml +++ b/atomic_defi_design/Dex/Constants/General.qml @@ -442,6 +442,15 @@ QtObject { return feetype + " " + amount + " " + ticker + " (" + fiat_text + ")" } + function reducedBignum(text, decimals=8, max_length=12) { + let val = new BigNumber(text).toFixed(decimals) + if (val.length > max_length) + { + return val.substring(0, max_length) + } + return val + } + function getSimpleFromPlaceholder(selectedTicker, selectedOrder, sell_ticker_balance) { if (privacy_mode) { diff --git a/atomic_defi_design/Dex/Exchange/Trade/OrderBook/ListDelegate.qml b/atomic_defi_design/Dex/Exchange/Trade/OrderBook/ListDelegate.qml index 8667ff4694..43b16d0c7b 100644 --- a/atomic_defi_design/Dex/Exchange/Trade/OrderBook/ListDelegate.qml +++ b/atomic_defi_design/Dex/Exchange/Trade/OrderBook/ListDelegate.qml @@ -21,11 +21,11 @@ Item DefaultTooltip { visible: mouse_area.containsMouse && (tooltip_text.text_value != "") - width: 300 + width: 340 contentItem: RowLayout { - width: 290 + width: 330 Qaterial.ColorIcon { @@ -175,12 +175,12 @@ Item // Dot on the left side of the row to indicate own order Rectangle { - Layout.leftMargin: 6 + Layout.leftMargin: 4 Layout.alignment: Qt.AlignVCenter opacity: is_mine ? 1 : 0 - width: 6 - height: 6 - radius: 3 + width: 4 + height: 4 + radius: 2 color: isAsk ? Dex.CurrentTheme.warningColor : Dex.CurrentTheme.okColor } @@ -188,9 +188,9 @@ Item Dex.ElidableText { Layout.fillHeight: true - Layout.minimumWidth: 90 + Layout.minimumWidth: 100 Layout.alignment: Qt.AlignVCenter - text: { new BigNumber(price).toFixed(8) } + text: General.reducedBignum(price, 8) font.family: DexTypo.fontFamily font.pixelSize: 12 color: isAsk ? Dex.CurrentTheme.warningColor : Dex.CurrentTheme.okColor @@ -203,9 +203,9 @@ Item Dex.ElidableText { Layout.fillHeight: true - Layout.minimumWidth: 90 + Layout.minimumWidth: 100 Layout.alignment: Qt.AlignVCenter - text: { new BigNumber(base_max_volume).toFixed(6) } + text: General.reducedBignum(base_max_volume, 6) font.family: DexTypo.fontFamily font.pixelSize: 12 horizontalAlignment: Text.AlignRight @@ -219,12 +219,12 @@ Item { id: total_text Layout.fillHeight: true - Layout.minimumWidth: 90 + Layout.minimumWidth: 100 Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter font.family: DexTypo.fontFamily font.pixelSize: 12 - text: { new BigNumber(total).toFixed(6) } + text: General.reducedBignum(total, 6) horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter wrapMode: Text.NoWrap @@ -236,7 +236,7 @@ Item { id: cancel_flat_btn Layout.fillHeight: true - width: 30 + width: 20 Layout.alignment: Qt.AlignVCenter MouseArea @@ -261,7 +261,7 @@ Item Qaterial.ColorIcon { anchors.centerIn: parent - iconSize: 16 + iconSize: 14 color: Dex.CurrentTheme.warningColor source: Qaterial.Icons.close visible: is_mine diff --git a/atomic_defi_design/Dex/Exchange/Trade/OrderBook/Vertical.qml b/atomic_defi_design/Dex/Exchange/Trade/OrderBook/Vertical.qml index a32347e739..0c8918e6fc 100644 --- a/atomic_defi_design/Dex/Exchange/Trade/OrderBook/Vertical.qml +++ b/atomic_defi_design/Dex/Exchange/Trade/OrderBook/Vertical.qml @@ -16,8 +16,8 @@ Widget readonly property string pair_volume_24hr: API.app.trading_pg.pair_volume_24hr readonly property string pair: atomic_qt_utilities.retrieve_main_ticker(left_ticker) + "/" + atomic_qt_utilities.retrieve_main_ticker(right_ticker) - margins: 10 - spacing: 10 + margins: 8 + spacing: 8 collapsable: false Header