sossoldi icon indicating copy to clipboard operation
sossoldi copied to clipboard

[Bug] Select a currency dialog has two background colors

Open bongio94 opened this issue 9 months ago • 5 comments

🛰️ What happened?

When selecting a currency from:

Settings -> General Settings -> Tap on currency symbol

The dialog that pops up for selecting the currency shows two different background colors, one for the dialog itself and one for the ListTiles.

🖥️ OS

Both

🔄 What version?

Android 15

🔢 Version

0.1.2 (main branch)

📸 Screenshots or logs

https://github.com/user-attachments/assets/d3c733ab-07ed-4a78-931f-5f2378a1da6b

https://github.com/user-attachments/assets/215ba9b8-15de-4e63-b357-542e8ad17d5a

📝 Code of Conduct

  • [x] ✅ I agree

bongio94 avatar Mar 21 '25 08:03 bongio94

I can work on this @theperu @mikev-cw

bongio94 avatar Mar 21 '25 08:03 bongio94

@federicopozzato I think this piece of work might be connected to #333, should I do something along the same lines as discussed in that thread to maintain the visual consistency in that page?

bongio94 avatar Mar 21 '25 08:03 bongio94

ABSOLUTELY

federicopozzato avatar Mar 21 '25 08:03 federicopozzato

Hey @federicopozzato

I was looking at the colors and while the light mode seems to be fine in terms of contrast, using the dark variant of the same colors doesn't give enough contrast in dark mode.

I would want to avoid doing manual switching in code basing on the current brightness so probably the best action would be to add some more colors in the customColorScheme.

Light Mode Dark Mode
Image Image
Image Image

customColorScheme is currently defined like this:

https://github.com/RIP-Comm/sossoldi/blob/5eb811c77ae4d2cccf6d4e04149abe698ac8b2be/lib/utils/app_theme.dart#L365-L393

And I'm using:

  • colorScheme.secondary for texts and borders
  • colorScheme.surface for the container background color

bongio94 avatar Mar 21 '25 10:03 bongio94

I think this would work for dark mode

Image

To achieve this, add onSurfaceVariant to customColorScheme, defined as following:

Light Mode Dark Mode
blue5 darkBlue6

And it would look like this:

Image

bongio94 avatar Mar 21 '25 11:03 bongio94