Mercurial > dwindows
diff win/XBrowseForFolder.cpp @ 2141:709f8bfa711f
Win: Fix a problem where full dark mode was functioning as forced.
Added sysmenu and icon for the window menu when operating in full dark mode.
I can't seem to convert from a menubar to a popup menu... will keep looking but...
because of this we will need to use the titlebar menu even in light mode when
full dark mode is enabled. When dark mode is disabled or basic will use the
classic menu bar. Also prefix some of the internal dark mode functions.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 16 Jul 2020 20:47:15 +0000 |
parents | d39f4f9bed26 |
children | 2e804b4db81e |
line wrap: on
line diff
--- a/win/XBrowseForFolder.cpp Sun Jul 12 22:18:36 2020 +0000 +++ b/win/XBrowseForFolder.cpp Thu Jul 16 20:47:15 2020 +0000 @@ -216,11 +216,11 @@ /* Include necessary variables and prototypes from dw.c */ extern int _DW_DARK_MODE_SUPPORTED; extern int _DW_DARK_MODE_ENABLED; -extern BOOL (WINAPI * _ShouldAppsUseDarkMode)(VOID); +extern BOOL (WINAPI * _DW_ShouldAppsUseDarkMode)(VOID); -BOOL IsHighContrast(VOID); -BOOL IsColorSchemeChangeMessage(LPARAM lParam); -void RefreshTitleBarThemeColor(HWND window); +BOOL _DW_IsHighContrast(VOID); +BOOL _DW_IsColorSchemeChangeMessage(LPARAM lParam); +void _DW_RefreshTitleBarThemeColor(HWND window); BOOL CALLBACK _dw_set_child_window_theme(HWND window, LPARAM lParam); } #endif @@ -239,11 +239,11 @@ #ifdef AEROGLASS case WM_SETTINGCHANGE: { - if(_DW_DARK_MODE_SUPPORTED && IsColorSchemeChangeMessage(lpData)) + if(_DW_DARK_MODE_SUPPORTED && _DW_IsColorSchemeChangeMessage(lpData)) { - _DW_DARK_MODE_ENABLED = _ShouldAppsUseDarkMode() && !IsHighContrast(); + _DW_DARK_MODE_ENABLED = _DW_ShouldAppsUseDarkMode() && !_DW_IsHighContrast(); - RefreshTitleBarThemeColor(hWnd); + _DW_RefreshTitleBarThemeColor(hWnd); _dw_set_child_window_theme(hWnd, 0); EnumChildWindows(hWnd, _dw_set_child_window_theme, 0); } @@ -281,7 +281,7 @@ { _dw_set_child_window_theme(hWnd, 0); EnumChildWindows(hWnd, _dw_set_child_window_theme, 0); - RefreshTitleBarThemeColor(hWnd); + _DW_RefreshTitleBarThemeColor(hWnd); } #endif SizeBrowseDialog(hWnd, fp);