@@ -2200,6 +2200,21 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect )
22002200 else
22012201 iconSize.cx =iconSize.cy =0 ;
22022202
2203+ COLORREF color, shadowColor;
2204+ {
2205+ bool bHotColor = (bHot && !bSplit) || stateLeft > 0 ;
2206+ if (item.id == MENU_EMPTY || item.id == MENU_EMPTY_TOP )
2207+ {
2208+ color = settings.textColors [bHotColor ? 3 : 2 ];
2209+ shadowColor = settings.textShadowColors [bHotColor ? 3 : 2 ];
2210+ }
2211+ else
2212+ {
2213+ color = settings.textColors [bHotColor ? 1 : 0 ];
2214+ shadowColor = settings.textShadowColors [bHotColor ? 1 : 0 ];
2215+ }
2216+ }
2217+
22032218 // draw icon
22042219 if (drawType==MenuSkin::PROGRAMS_BUTTON || drawType==MenuSkin::PROGRAMS_BUTTON_NEW )
22052220 {
@@ -2256,15 +2271,21 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect )
22562271 const CItemManager::IconInfo *pIcon=(settings.iconSize ==MenuSkin::ICON_SIZE_LARGE )?item.pItemInfo ->largeIcon :item.pItemInfo ->smallIcon ;
22572272 if (pIcon && pIcon->bitmap )
22582273 {
2274+ HBITMAP temp = ColorizeMonochromeImage (pIcon->bitmap , color);
2275+ HBITMAP bitmap = temp ? temp : pIcon->bitmap ;
2276+
22592277 BITMAP info;
2260- GetObject (pIcon-> bitmap ,sizeof (info),&info);
2261- HGDIOBJ bmp0=SelectObject (hdc2,pIcon-> bitmap );
2278+ GetObject (bitmap,sizeof (info),&info);
2279+ HGDIOBJ bmp0=SelectObject (hdc2,bitmap);
22622280 if (bmp0)
22632281 {
22642282 BLENDFUNCTION func={AC_SRC_OVER ,0 ,255 ,AC_SRC_ALPHA };
22652283 AlphaBlend (hdc,iconX,iconY,iconSize.cx ,iconSize.cy ,hdc2,0 ,0 ,info.bmWidth ,info.bmHeight ,func);
22662284 SelectObject (hdc2,bmp0);
22672285 }
2286+
2287+ if (temp)
2288+ DeleteObject (temp);
22682289 }
22692290 }
22702291 else if (item.id ==MENU_SHUTDOWN_BUTTON && s_bHasUpdates && s_Skin.Shutdown_bitmap .GetBitmap ())
@@ -2287,18 +2308,6 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect )
22872308
22882309 // draw text
22892310 SelectObject (hdc,settings.font );
2290- COLORREF color, shadowColor;
2291- bool bHotColor=(bHot && !bSplit) || stateLeft>0 ;
2292- if (item.id ==MENU_EMPTY || item.id ==MENU_EMPTY_TOP )
2293- {
2294- color=settings.textColors [bHotColor?3 :2 ];
2295- shadowColor=settings.textShadowColors [bHotColor?3 :2 ];
2296- }
2297- else
2298- {
2299- color=settings.textColors [bHotColor?1 :0 ];
2300- shadowColor=settings.textShadowColors [bHotColor?1 :0 ];
2301- }
23022311 RECT rc={itemRect.left +settings.iconPadding .left +settings.iconPadding .right +settings.textPadding .left ,itemRect.top +settings.textPadding .top ,
23032312 itemRect.right -settings.arrPadding .cx -settings.arrPadding .cy -settings.textPadding .right ,itemRect.bottom -settings.textPadding .bottom };
23042313 if (item.id ==MENU_SHUTDOWN_BUTTON )
0 commit comments