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
Allow custom themes to react theme variant changes, fixes #2006 #2049
Conversation
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.
This is a great catch thanks.
Unfortunately 1 blocker - we cannot change public API outside of a x.0 release and deprecation cycle.
Also a note on naming that's less important.
@@ -76,16 +76,68 @@ func TestOverrideTheme_IgnoresSettingsChange(t *testing.T) { | |||
} | |||
set.setupTheme() | |||
assert.Equal(t, theme.LightTheme(), set.Theme()) | |||
|
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 have edited this test, by removing the behavior that ignores forever the changes in the application once FYNE_THEME env var is set at least once, is that ok?
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.
FYNE_THEME is an override, once set it should not be changed
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 don't think we had considered the env changing during runtime. That could go either way.
What I meant was that if env is set nothing else should influence the setting
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.
Seems good. Clearing an env at runtime was not supported before - we can look at the details for that later
Description:
Fixes #2006
Checklist: