Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual tweaks #1961

Merged
merged 3 commits into from Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions atomic_defi_design/Dex/Components/DexComboBox.qml
Expand Up @@ -103,7 +103,7 @@ ComboBox
// Each dropdown item
delegate: ItemDelegate
{
id: delegate
id: combo_item

width: control.width
highlighted: control.highlightedIndex === index
Expand All @@ -118,8 +118,8 @@ ComboBox

background: Rectangle
{
anchors.fill: delegate
color: delegate.highlighted ? Dex.CurrentTheme.comboBoxDropdownItemHighlightedColor : Dex.CurrentTheme.comboBoxBackgroundColor
anchors.fill: combo_item
color: combo_item.highlighted ? Dex.CurrentTheme.comboBoxDropdownItemHighlightedColor : Dex.CurrentTheme.comboBoxBackgroundColor
}
}

Expand Down
27 changes: 14 additions & 13 deletions atomic_defi_design/Dex/Components/DexLanguage.qml
Expand Up @@ -14,19 +14,17 @@ DexComboBox
{
id: control
model: API.app.settings_pg.get_available_langs()

property color highlightedBackgroundColor: Dex.CurrentTheme.comboBoxDropdownItemHighlightedColor
property color mainBackgroundColor: Dex.CurrentTheme.floatingBackgroundColor

height: 50

displayText: API.app.settings_pg.lang
leftPadding: 5

// Each dropdown item
delegate: ItemDelegate
{
id: combo_item
width: control.width
height: 30
height: 35
highlighted: control.highlightedIndex === index

contentItem: RowLayout
Expand All @@ -47,10 +45,11 @@ DexComboBox
}
}

// Dropdown Item background
background: DexRectangle {
background: Rectangle
{
anchors.fill: combo_item
color: combo_item.highlighted ? highlightedBackgroundColor : mainBackgroundColor
radius: 6
color: combo_item.highlighted ? Dex.CurrentTheme.comboBoxDropdownItemHighlightedColor : Dex.CurrentTheme.comboBoxBackgroundColor
}

onClicked:
Expand All @@ -62,17 +61,13 @@ DexComboBox
}
}

// Main, selected item
contentItem: Text
{
anchors.fill: parent
leftPadding: 0
rightPadding: control.indicator.width + control.spacing

//text: control.displayText
font: control.font
color: control.pressed ? "#17a81a" : "#21be2b"
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight

DexImage
{
Expand All @@ -84,6 +79,12 @@ DexComboBox
}
}

background: FloatingBackground
{
radius: 20
color: Dex.CurrentTheme.comboBoxBackgroundColor
}

DexMouseArea
{
anchors.fill: parent
Expand Down
2 changes: 1 addition & 1 deletion atomic_defi_design/Dex/Constants/Style.qml
Expand Up @@ -474,7 +474,7 @@ QtObject {
"YFII": "#FF2A79",
"ZET": "#155169",
"ZIL": "#42BBB9",
"ZOMBIE": "#3F3F3F",
"ZOMBIE": "#72B001",
"ZRX": "#302C2C",
"UNI": "#FF007A",
"VOTE2022": "#7490AA",
Expand Down
2 changes: 0 additions & 2 deletions atomic_defi_design/Dex/Settings/Settings.qml
Expand Up @@ -175,8 +175,6 @@ Item {
onClicked: view_seed_modal.open()
}



HorizontalLine {
Layout.fillWidth: true
Layout.leftMargin: combo_fiat.Layout.leftMargin
Expand Down
5 changes: 4 additions & 1 deletion atomic_defi_design/Dex/Wallet/ClaimRewardsModal.qml
Expand Up @@ -86,9 +86,12 @@ MultipageModal
if(root.visible && broadcast_result !== "") {
root.currentIndex = 1
postClaim()
root.width = 750
}
}

Behavior on width { NumberAnimation { duration: 300 } }

function prepareClaimRewards() {
if(!can_claim) return

Expand Down Expand Up @@ -441,9 +444,9 @@ MultipageModal
// Result Page
SendResult
{
address: current_ticker_infos.address
result: prepare_claim_rewards_result
tx_hash: broadcast_result

function onClose() { root.close() }
}
}