-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Force Light Mode permanently on #297
Conversation
LightBulb/App.axaml
Outdated
<Application.Styles> | ||
<materialStyles:MaterialTheme /> | ||
<!-- Dummy values for foreground colors to initialize properly. All associated brushes are overridden in Application.Resources. --> | ||
<materialStyles:MaterialTheme BaseTheme="Light" PrimaryColor="Purple" SecondaryColor="Green"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the dummy values actually necessary here? If so, what do they achieve?
LightBulb/App.axaml
Outdated
<SolidColorBrush x:Key="MaterialSecondaryLightBrush" Color="#F9A825"></SolidColorBrush> | ||
<SolidColorBrush x:Key="MaterialSecondaryLightForegroundBrush" Color="#F9A825"></SolidColorBrush> | ||
<SolidColorBrush x:Key="MaterialSecondaryMidBrush" Color="#F9A825"></SolidColorBrush> | ||
<SolidColorBrush x:Key="MaterialSecondaryMidForegroundBrush" Color="#F9A825"></SolidColorBrush> | ||
<SolidColorBrush x:Key="MaterialSecondaryDarkBrush" Color="#F9A825"></SolidColorBrush> | ||
<SolidColorBrush x:Key="MaterialSecondaryDarkForegroundBrush" Color="#F9A825"></SolidColorBrush> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be wrong, but shouldn't all these colors not be the same?
I think a simpler fix would be to set |
I'd push back against this -- the current approach is actually incorrect, which is the source of this bug. Read this documentation; since we always apply the theme manually, we should be using However, |
Ok fair enough. I'm just wary of setting all color brushes by hand like that, for two reasons:
It looks like the doc you linked doesn't necessarily specify why the current approach is incorrect though, at least I don't see where it does that. |
Those points are good ones -- I played around with it a bit more and got Let me know what you think. By the way, the part in the doc that specifies MaterialThemeBase:
|
Looks good. Can you also please explain why |
It does work -- I'll make that change as well. As long as we're correctly using MaterialThemeBase I've got no issues with it. |
Thanks! |
Closes #296 by forcing light mode on via the theme, and specifying theme colors in
Application.Resources
instead of by manually building a theme.