-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Changing theme while application is running doesn't change some parameters on some widgets #4344
Comments
You will need to provide code to replicate this. As you can see in fyne_demo and in our tests it does normally work. |
I think you can try this function // https://github.com/fyne-io/fyne/issues/2996
func Refresh(tableapps ...*container.AppTabs) {
for _, c := range tableapps {
c.OnSelected = func(t *container.TabItem) {
fyne.CurrentApp().Settings().SetTheme(fyne.CurrentApp().Settings().Theme())
}
}
} |
Experiencing this effect as well, and didn't get around to isolate the code for testing yet. So for now just a comment. |
Just isolated the code in question, and it does involve AppTabs like others also mentioned. package main
import (
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
)
func main() {
a := app.New()
w := a.NewWindow("Theme Test")
foo := container.NewVBox(
widget.NewButton("dark", func() {
a.Settings().SetTheme(theme.DarkTheme())
}),
widget.NewButton("light", func() {
a.Settings().SetTheme(theme.LightTheme())
}),
)
bar := container.NewVBox(
widget.NewButton("dark", func() {
a.Settings().SetTheme(theme.DarkTheme())
}),
widget.NewButton("light", func() {
a.Settings().SetTheme(theme.LightTheme())
}),
)
tabs := container.NewAppTabs(
container.NewTabItem("Foo", foo),
container.NewTabItem("Bar", bar),
)
w.SetContent(tabs)
w.ShowAndRun()
} |
Fixed on develop :) |
Checklist
Describe the bug
When changing theme from dark to light (or vice versa) some widgets like buttons doesn't change it's theme. E.g buttons doesn't change background until mouseover, never changes font color.
How to reproduce
Screenshots
Example code
I'll add code later if neccessary. Just create a window, put tabs in it, but some buttons in tabs containers.
Fyne version
2.3.5, 2.4.1
Go compiler version
1.21.3
Operating system and version
Arch Linux latest @ 20231026
Additional Information
No response
The text was updated successfully, but these errors were encountered: