Repository navigation
Support dark theme in Windows candidate window - #1607
nameless911 wants to merge 1 commit into
Conversation
Follow the Windows app mode (AppsUseLightTheme) and use the dark renderer style added for the Qt renderer (google#1582). Reload the style when Windows broadcasts WM_SETTINGCHANGE with "ImmersiveColorSet", and stop hard-coding white as the infolist row background.
|
Thank you for the PR and for offering to adapt the approach. I intentionally excluded Windows and macOS from PR #1582. The dark theme support is still experimental, and changes to the Windows and macOS builds also impact Google Japanese Input. Before turning this on by default for Windows and macOS, I plan to:
While I appreciate your willingness to follow up on a different approach, I think handling these changes among the core committers will actually be easier and more efficient for this particular feature. The most costly part here is the communication and coordination rather than the code implementation itself, which is straightforward and easy to automate these days once the direction is agreed on. Therefore, I'll be closing this PR. That said, I love to see people fork and customize our codebase to demonstrate their ideas. Feel free to use the Discussions forum, e.g. "Show and tell" category, to share your ideas with us and other developers. Thanks again for your understanding and your interest in Mozc. |
Description
#1582 added
renderer_style_dark.textprotoandRendererStyleHandler::ColorTheme, but only the Qt renderer uses them, so the Win32 candidate window stays light when Windows is in dark mode.This pull request makes the Win32 renderer follow the Windows app mode:
GetScaledRendererStyle()readsAppsUseLightThemeunderHKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalizeand picksColorTheme::kDarkwhen it is0. All Win32 windows andTextRendererget their colors through this function, so they switch together.CandidateWindowandInfolistWindowreload the style when Windows broadcastsWM_SETTINGCHANGEwith"ImmersiveColorSet", so a mode change takes effect on the next candidate window without restarting.InfolistWindowno longer hard-codes white as the row background; it uses the candidate background color (still white in the light theme).//bazel/win32:advapi32forRegGetValueW.The light theme is unchanged. The dark colors are the ones from #1582 as is.
Issue IDs
mozc_renderer#1581 / Support dark-theme in Qt renderer with Qt 6.5+ #1582 (dark theme for the Qt renderer).Steps to test new behaviors (if any)
Done so far:
Mozc64_x64.msiand confirmed step 3 for the suggestion and prediction windows in dark mode.Additional context
Not covered in this pull request:
IndicatorWindow(mode indicator) still uses hard-coded colors.Happy to follow up on these, or to change the approach if there is a different plan for Windows dark theme support.