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

Better coin type readability in enable modal #1296

Merged
merged 3 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion atomic_defi_design/qml/Components/CoinTypeTag.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AnimatedRectangle {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
text: type
color: DexTheme.foregroundColor
color: Style.getCoinTypeTextColor(model.type)
font: DexTypo.overLine
}
}
7 changes: 0 additions & 7 deletions atomic_defi_design/qml/Constants/DexTheme.qml
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,6 @@ QtObject {
return Style.colorWhite4
}

function getCoinTypeColor(type) {
return getCoinColor(type === "ERC-20" ? "ETH" :
type === "QRC-20" ? "QTUM" :
type === "Smart Chain" ? "KMD" :
"BTC")
}

function getCoinColor(ticker) {
const c = colorCoin[ticker]
return c || Style.colorTheme2
Expand Down
11 changes: 10 additions & 1 deletion atomic_defi_design/qml/Constants/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,15 @@ QtObject {
}
}

function getCoinTypeTextColor(type)
{
switch (type)
{
case 'BEP-20': return '#232323'
default: return '#D5D5D5'
}
}

function getCoinColor(ticker) {
const c = colorCoin[atomic_qt_utilities.retrieve_main_ticker(ticker)]
return c || Style.colorTheme2
Expand All @@ -271,7 +280,7 @@ QtObject {
"AVAX": "#E84142",
"AXS": "#0055D5",
"BAL": "#4D4D4D",
"BNB": "#F3BA2F",
"BNB": "#FFD46A",
"BCH": "#8DC351",
"BIDR": "#F0B90B",
"BSTY": "#78570D",
Expand Down