From c7ed7ecd5aa26dfb14066ff06f38ee6a11277066 Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 28 Feb 2015 16:00:41 +0000 Subject: [PATCH] CtrlLib: Transparent MenuBar fix git-svn-id: svn://ultimatepp.org/upp/trunk@8219 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlLib/MenuItem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/CtrlLib/MenuItem.cpp b/uppsrc/CtrlLib/MenuItem.cpp index a2cd673c4..b07973a65 100644 --- a/uppsrc/CtrlLib/MenuItem.cpp +++ b/uppsrc/CtrlLib/MenuItem.cpp @@ -181,7 +181,7 @@ void MenuItemBase::PaintTopItem(Draw& w, int state) { Size isz = GetTextSize(text, StdFont()); Color txt = opaque ? style->topitemtext[0] : GetLabelTextColor(this); Color hltxt = opaque2 ? style->topitemtext[state] : GetLabelTextColor(this); - if(!opaque) { // Fix issues when text color is not compatible with transparent background (e.g. Ubuntu Ambience) + if(!opaque && state != 2) { // Fix issues when text color is not compatible with transparent background (e.g. Ubuntu Ambience) int g = Grayscale(bg); if(abs(g - Grayscale(txt)) < 70) txt = IsDark(bg) ? White() : Black();