Simple theme resources use DynamicResource to make tweaks easier#20819
Simple theme resources use DynamicResource to make tweaks easier#20819zacfromaustinpowder wants to merge 1 commit intoAvaloniaUI:masterfrom
Conversation
|
You can test this PR using the following package version. |
|
Colors are constants -- you modify the brushes instead. I wouldn't merge this. |
|
Fluent theme seems to dynamically bind to the colors, I figured it would be nice to do the same with simple theme. I'm happy if it doesn't get merged though. |
OK, fair enough. I misread this thinking it was for Fluent theme and changing how it was designed to work. So my mistake. |
|
Although, after reviewing Fluent theme I can see we are actually inconsistent. Several Colors for base brushes are in fact static. It seems certain colors that are expected to change -- such as accent color -- are dynamic though. Avalonia/src/Avalonia.Themes.Fluent/Accents/BaseResources.xaml Lines 100 to 111 in 45b0eb3 |
What does the pull request do?
I wanted to make some tweaks to SimpleTheme. I could've done it by overriding the colors AND the brushes, but it would be much nicer to only worry about the colors. This is possible now that the brushes bind dynamically to the colors.
Checklist
Breaking changes
None. (EDIT: This may actually be a breaking change if people are doing something weird where they override the colors but not the brushes, or vice-versa).
Obsoletions / Deprecations
None.
Fixed issues
None (I think).