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

Allow custom themes to react theme variant changes, fixes #2006 #2049

Merged
merged 2 commits into from Mar 1, 2021

Conversation

fpabl0
Copy link
Member

@fpabl0 fpabl0 commented Mar 1, 2021

Description:

Fixes #2006

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

Copy link
Member

@andydotxyz andydotxyz left a 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.

app/settings.go Outdated Show resolved Hide resolved
cmd/fyne_settings/settings/appearance.go Outdated Show resolved Hide resolved
@@ -76,16 +76,68 @@ func TestOverrideTheme_IgnoresSettingsChange(t *testing.T) {
}
set.setupTheme()
assert.Equal(t, theme.LightTheme(), set.Theme())

Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member

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

Copy link
Member

@andydotxyz andydotxyz left a 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

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

Successfully merging this pull request may close these issues.

None yet

2 participants