I can run my Fyne application with FYNE_THEME=light to make it use a light background and running without this var it will default to dark. Is there a way to reverse this behaviour? Having the application start with the light theme by default?
add
os.Setenv("FYNE_THEME", "light")
in func main() before you show and run the window.
App would start with light theme by default.
You set the theme globally by running fyne_settings to change user theme.
go get fyne.io/fyne/cmd/fyne_settings
All fyne apps will respect the configuration set in that app.
If your intent is to override the user theme (be careful about doing this as their settings will be ignored) you can configure the app settings in code:
myApp.Settings().SetTheme(theme.LightTheme())
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With