diff --git a/CHANGELOG.md b/CHANGELOG.md index c81869bce..31e0b2519 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,9 @@ Tested on OS builds 22000.2416, 22621.2361, 22621.2506, and 23585.1001. * Changing the taskbar alignment requires restarting `explorer.exe` in order to take effect. * File Explorer: Added option to disable the modern navigation bar of Moment 4. (2dc1340) * File Explorer: Restored "Apply Mica" functionality on OS builds 22621+. (f62c532) -* Localization: Officially added Japanese translations. (Thanks @creeper-0910, @reindex-ot, and @Rukoto!) +* Localization: Officially added translations for the following languages: + * Chinese, Simplified (Thanks @zetaloop!) + * Japanese (Thanks @creeper-0910, @reindex-ot, and @Rukoto!) * GUI: Decoupled the Properties window into `ep_gui.dll` from the main DLL in order to reduce the main DLL size and to allow scalable localization. (f6f6d89, 639d7aa) * `rundll32 C:\Windows\dxgi.dll,ZZGUI` will continue to work as before. diff --git a/ExplorerPatcher-L10N b/ExplorerPatcher-L10N index 3895993c1..b358f5caf 160000 --- a/ExplorerPatcher-L10N +++ b/ExplorerPatcher-L10N @@ -1 +1 @@ -Subproject commit 3895993c18effe2f10f101aa2139f6ef2abfc9bc +Subproject commit b358f5caf8bae8314d2a5c1611eae31c48a07c39 diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 0a543c7ae..d252faad7 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -3906,7 +3906,7 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( { SetWindowSubclass(hWndParent, HideExplorerSearchBarSubClass, HideExplorerSearchBarSubClass, 0); } - if (bIsExplorerProcess && dwFileExplorerCommandUI != 0 && IsWindows11Version22H2OrHigher()) + if (bIsExplorerProcess && (dwFileExplorerCommandUI == 1 || dwFileExplorerCommandUI == 2 || dwFileExplorerCommandUI == 3) && IsWindows11Version22H2OrHigher()) { // Fix initial title bar style after disabling TIFE // If we don't do this, it will only fix itself once the user changes the system color scheme or toggling transparency effects @@ -3917,8 +3917,8 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( } if (ShouldAppsUseDarkMode) { - BOOL value = ShouldAppsUseDarkMode(); - DwmSetWindowAttribute(hWndParent, DWMWA_USE_IMMERSIVE_DARK_MODE, &value, sizeof(BOOL)); + BOOL bDarkMode = ShouldAppsUseDarkMode() && !IsHighContrast(); + DwmSetWindowAttribute(hWndParent, DWMWA_USE_IMMERSIVE_DARK_MODE, &bDarkMode, sizeof(BOOL)); } } } diff --git a/ExplorerPatcher/utility.h b/ExplorerPatcher/utility.h index 9bb815356..d77afbeae 100644 --- a/ExplorerPatcher/utility.h +++ b/ExplorerPatcher/utility.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "def.h" @@ -367,18 +368,16 @@ BOOL(WINAPI* SetWindowBand)(HWND hWnd, HWND hwndInsertAfter, DWORD dwBand); INT64(*SetWindowCompositionAttribute)(HWND, void*); -static void(*SetPreferredAppMode)(INT64 bAllowDark); +static void(*SetPreferredAppMode)(bool bAllowDark); -static void(*AllowDarkModeForWindow)(HWND hWnd, INT64 bAllowDark); +static void(*AllowDarkModeForWindow)(HWND hWnd, bool bAllowDark); -static BOOL(*ShouldAppsUseDarkMode)(); +static bool(*ShouldAppsUseDarkMode)(); -static BOOL(*ShouldSystemUseDarkMode)(); +static bool(*ShouldSystemUseDarkMode)(); static void(*GetThemeName)(void*, void*, void*); -static BOOL AppsShouldUseDarkMode() { return TRUE; } - void* ReadFromFile(wchar_t* wszFileName, DWORD* dwSize); int ComputeFileHash(LPCWSTR filename, LPSTR hash, DWORD dwHash); diff --git a/ep_gui/GUI.c b/ep_gui/GUI.c index 9e5eedb9c..4e3736561 100644 --- a/ep_gui/GUI.c +++ b/ep_gui/GUI.c @@ -11,7 +11,6 @@ void* GUI_FileMapping = NULL; DWORD GUI_FileSize = 0; BOOL g_darkModeEnabled = FALSE; static void(*RefreshImmersiveColorPolicyState)() = NULL; -// static BOOL(*ShouldAppsUseDarkMode)() = nullptr; // Already defined in utility.h DWORD dwTaskbarPosition = 3; BOOL gui_bOldTaskbar = TRUE;