Skip to content

Commit

Permalink
Merge branch 'dev' into fix/timesync-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Aug 27, 2024
2 parents 6dc7212 + 7a6e41d commit b5ea876
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
9 changes: 9 additions & 0 deletions atomic_defi_design/Dex/Constants/General.qml
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,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)
{
Expand Down
28 changes: 14 additions & 14 deletions atomic_defi_design/Dex/Exchange/Trade/OrderBook/ListDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -175,22 +175,22 @@ 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
}

// Price
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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -236,7 +236,7 @@ Item
{
id: cancel_flat_btn
Layout.fillHeight: true
width: 30
width: 20
Layout.alignment: Qt.AlignVCenter

MouseArea
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions atomic_defi_design/Dex/Exchange/Trade/OrderBook/Vertical.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5ea876

Please sign in to comment.