Skip to content

Commit

Permalink
GWallet.Frontend.XF: fix currency colors on GTK
Browse files Browse the repository at this point in the history
Fix currency color indicator on GTK which was not showing up.
To address this, we double its width when the platform is GTK.

Co-authored-by: webwarrior <reg@webwarrior.ws>
  • Loading branch information
Mersho and webwarrior-ws committed Feb 29, 2024
1 parent 24903fe commit 7acead9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/GWallet.Frontend.XF/FrontendHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,12 @@ module FrontendHelpers =
normalCryptoBalanceClassId,readonlyCryptoBalanceClassId

let CreateCurrencyBalanceFrame currency (cryptoLabel: Label) (fiatLabel: Label) currencyLogoImg classId =
let colorBoxWidth = 10.
let colorBoxWidth =
if Device.RuntimePlatform = Device.GTK then
// Because on GTK for some reason it's narrower than it should be, so we increase width for it to show up
20.
else
10.

let stackLayout = StackLayout(Orientation = StackOrientation.Horizontal,
Padding = Thickness(20., 20., colorBoxWidth + 10., 20.))
Expand Down

0 comments on commit 7acead9

Please sign in to comment.