Skip to content

Commit ac30362

Browse files
authored
Merge 632ecf7 into 40d8f5b
2 parents 40d8f5b + 632ecf7 commit ac30362

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ static void ComputeTaskbarColors( int *data )
16241624
{
16251625
bool bDefLook;
16261626
int look=GetSettingInt(L"TaskbarLook",bDefLook);
1627-
if (GetWinVersion()<WIN_VER_WIN10 || look==TASKBAR_AEROGLASS || (look==TASKBAR_TRANSPARENT && g_TaskbarTexture))
1627+
if (GetWinVersion()<WIN_VER_WIN10 || !IsAppThemed() || look==TASKBAR_AEROGLASS || (look==TASKBAR_TRANSPARENT && g_TaskbarTexture))
16281628
{
16291629
memset(data,0,16);
16301630
}
@@ -1872,6 +1872,7 @@ static LRESULT CALLBACK SubclassTaskBarProc( HWND hWnd, UINT uMsg, WPARAM wParam
18721872
ComputeTaskbarColors(data);
18731873
WINCOMPATTRDATA attrData={0x13,&data,sizeof(data)};
18741874
SetWindowCompositionAttribute(hWnd,&attrData);
1875+
UpdateTaskBars(TASKBAR_UPDATE_TEXTURE);
18751876
return res;
18761877
}
18771878
if ((uMsg==WM_DWMCOLORIZATIONCOLORCHANGED || uMsg==WM_SETTINGCHANGE) && taskBar && taskBar->bCustomLook && SetWindowCompositionAttribute && GetWinVersion()<WIN_VER_WIN10)
@@ -1932,7 +1933,7 @@ static LRESULT CALLBACK SubclassTaskBarProc( HWND hWnd, UINT uMsg, WPARAM wParam
19321933
WINCOMPATTRDATA attrData={0x13,&data,sizeof(data)};
19331934
SetWindowCompositionAttribute(hWnd,&attrData);
19341935
}
1935-
if (g_TaskbarTexture && IsAppThemed())
1936+
if (g_TaskbarTexture)
19361937
{
19371938
// draw taskbar background (behind start button and separators)
19381939
PAINTSTRUCT ps;
@@ -2383,12 +2384,19 @@ void UpdateTaskBars( TUpdateTaskbar update )
23832384
}
23842385
}
23852386
}
2386-
else if (GetWinVersion()<WIN_VER_WIN10 && (!bDefColor || !bDefOpacity))
2387+
else if ((GetWinVersion()<WIN_VER_WIN10 && (!bDefColor || !bDefOpacity)) || !IsAppThemed())
23872388
{
23882389
if (bDefColor && GetWinVersion()>WIN_VER_WIN7)
23892390
{
2390-
color=GetSystemGlassColor8();
2391-
color=((color&0xFF)<<16)|(color&0xFF00)|((color>>16)&0xFF);
2391+
if (IsAppThemed())
2392+
{
2393+
color=GetSystemGlassColor8();
2394+
color=((color&0xFF)<<16)|(color&0xFF00)|((color>>16)&0xFF);
2395+
}
2396+
else
2397+
{
2398+
color=GetSysColor(COLOR_BTNFACE);
2399+
}
23922400
}
23932401
BITMAPINFO bi={0};
23942402
bi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
@@ -3012,7 +3020,10 @@ static void InitStartMenuDLL( void )
30123020
if (GetWinVersion()<=WIN_VER_WIN81)
30133021
g_DrawThemeBackgroundHook=SetIatHook(module,"uxtheme.dll","DrawThemeBackground",DrawThemeBackground2);
30143022
g_DrawThemeTextHook=SetIatHook(module,"uxtheme.dll","DrawThemeText",DrawThemeText2);
3015-
g_DrawThemeTextExHook=SetIatHook(module,"uxtheme.dll","DrawThemeTextEx",DrawThemeTextEx2);
3023+
if (IsAppThemed())
3024+
{
3025+
g_DrawThemeTextExHook=SetIatHook(module,"uxtheme.dll","DrawThemeTextEx",DrawThemeTextEx2);
3026+
}
30163027
g_DrawThemeTextCtlHook=SetIatHook(GetModuleHandle(L"comctl32.dll"),"uxtheme.dll","DrawThemeText",DrawThemeText2);
30173028
if (GetWinVersion()>=WIN_VER_WIN10)
30183029
g_SetWindowCompositionAttributeHook=SetIatHook(module,"user32.dll","SetWindowCompositionAttribute",SetWindowCompositionAttribute2);

0 commit comments

Comments
 (0)