-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
enhance(windows): apply dark mode to menus and other controls #751
Conversation
Not sure how will this work with external crate like |
This should work with |
I will try to review ASAP (currently on a sick leave and some national holidays coming) but I agree with @ahodesuka, I think it is better to keep this in tao since it has info about the theme management and would be redundant to implement both in |
Actually since we don't plan on releasing this for 1.x, lets just implement this in |
Looking at it now I think you are right. It should be implemented in |
Yeah sounds good, feel free to open a PR there. |
After taking a second look, I was wrong, this API that switches the context menu should be called in |
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.
@ahodesuka thanks for your contributions and I apologize for dismissing the PR earlier without a deeper look.
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
Other information
The current dark mode only applies to the window titlebar. An additional undocumented function
from uxtheme.dll must be called for the menus to appear with the dark theme.
The function that must be called has changed once since being introduced, in Windows 10 version 1903 (build 18362),
this latest version allows you to force the theme color you want instead of just allowing dark to
be set if it is the system default.
From what I have tested this works for system tray menus, menubar menus, and the system menu when right clicking the titlebar as seen below.
A somewhat related issue is tauri-apps/muda#97 although this issue seems to be more about the menubar control itself and not the menus.
Also closes tauri-apps/tauri#6645