-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve theme change at runtime #1473
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.
Nice work, that definitely improve the theme changing 🚀 .
I just added some comments about possibly loosing the adaption to system changes, like active/inactive and changing the system theme.
} | ||
|
||
win32.SetTheme(w.Handle(), isDarkMode) | ||
|
||
// Custom theme | ||
if win32.SupportsCustomThemes() && customTheme != nil { | ||
if w.isActive { |
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.
Don't we need to also set w.themeChanged = true
when w.isActive
gets changed during w32.WM_ACTIVATE
?
I think we might loose the adaption of the active/inactive color when customThemes are active.
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.
Done
# Conflicts: # v2/internal/frontend/desktop/windows/window.go
Fixes runtime theme changes