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

Improve theme change at runtime #1473

Merged
merged 5 commits into from
Jun 21, 2022
Merged

Conversation

leaanthony
Copy link
Member

Fixes runtime theme changes

@leaanthony leaanthony requested a review from stffabi June 20, 2022 11:14
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 20, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6abda7b
Status:⚡️  Build in progress...

View logs

Copy link
Collaborator

@stffabi stffabi left a 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 {
Copy link
Collaborator

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

v2/internal/frontend/desktop/windows/theme.go Show resolved Hide resolved
@leaanthony leaanthony merged commit 1687906 into master Jun 21, 2022
@leaanthony leaanthony deleted the bugfix/runtime_theme_changes branch June 21, 2022 22:34
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.

2 participants