From e2758ec37688b00e55ba50ea3db0bba9abe66604 Mon Sep 17 00:00:00 2001 From: Anixx Date: Sat, 24 Jan 2026 12:26:25 +0200 Subject: [PATCH] Support for unthemed taskbar (#2369) * Support for unthemed taskbar See this discussion: https://github.com/Open-Shell/Open-Shell-Menu/discussions/2367 * Refactor color handling in StartMenuDLL --- Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp | 23 +++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp b/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp index 9f26f22..9111cb4 100644 --- a/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp +++ b/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp @@ -1624,7 +1624,7 @@ static void ComputeTaskbarColors( int *data ) { bool bDefLook; int look=GetSettingInt(L"TaskbarLook",bDefLook); - if (GetWinVersion()bCustomLook && SetWindowCompositionAttribute && GetWinVersion()WIN_VER_WIN7) { - color=GetSystemGlassColor8(); - color=((color&0xFF)<<16)|(color&0xFF00)|((color>>16)&0xFF); + if (IsAppThemed()) + { + color=GetSystemGlassColor8(); + color=((color&0xFF)<<16)|(color&0xFF00)|((color>>16)&0xFF); + } + else + { + color=GetSysColor(COLOR_BTNFACE); + } } BITMAPINFO bi={0}; bi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER); @@ -3012,7 +3020,10 @@ static void InitStartMenuDLL( void ) if (GetWinVersion()<=WIN_VER_WIN81) g_DrawThemeBackgroundHook=SetIatHook(module,"uxtheme.dll","DrawThemeBackground",DrawThemeBackground2); g_DrawThemeTextHook=SetIatHook(module,"uxtheme.dll","DrawThemeText",DrawThemeText2); - g_DrawThemeTextExHook=SetIatHook(module,"uxtheme.dll","DrawThemeTextEx",DrawThemeTextEx2); + if (IsAppThemed()) + { + g_DrawThemeTextExHook=SetIatHook(module,"uxtheme.dll","DrawThemeTextEx",DrawThemeTextEx2); + } g_DrawThemeTextCtlHook=SetIatHook(GetModuleHandle(L"comctl32.dll"),"uxtheme.dll","DrawThemeText",DrawThemeText2); if (GetWinVersion()>=WIN_VER_WIN10) g_SetWindowCompositionAttributeHook=SetIatHook(module,"user32.dll","SetWindowCompositionAttribute",SetWindowCompositionAttribute2);