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

Switching the colors of the controls #270

Open
Saber-1980 opened this issue Oct 27, 2023 · 2 comments
Open

Switching the colors of the controls #270

Saber-1980 opened this issue Oct 27, 2023 · 2 comments

Comments

@Saber-1980
Copy link

This one is actually a question, not a bug, I think.

I've been testing the library for a few days and now I wanted to replace the blue accent color with a yellow one. To do this, I´ve tried to use the color palettes defined in the file Dark\Palette.axaml and override the values.

Until I noticed that this has no effect. For example, I wanted to replace the blue focus border of the textbox. However, in the file Dark\TextBox.axaml no reference to a palette entry is set, but the color value is hard coded there again:

<SolidColorBrush x:Key="TextBoxFocusBorderBrush" Color="#54A9FF" />

When I search for the hex value 54A9FF, it is hardcoded in numerous controls.

Is this the final way and the palettes are only a reference for developers, or will this being changed one day?
Or have I missed something maybe?

Thanks!

@rabbitism
Copy link
Member

rabbitism commented Oct 28, 2023

  1. Yes, you are correct. palette is only used for reference, or people what to change some brush but still want to use predefined colors.
  2. Semi definitely won't use shared brushes for different controls, thus user can override resources in minimum scope and minimum impact to other controls.
  3. Meanwhile, I'm still hesitating whether we should use shared color for different brushes. I need to carefully consider this, and I can't leave you an answer now.

@Saber-1980
Copy link
Author

Thank you for answering my questions.

That's fine. I'll figure out a suitable integration strategy for my application. I just wanted to make sure I understood the situation correctly.

Great theme for Avalonia!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants