Skip to content

Commit

Permalink
[OS/2] Bug 368864: try to make menu selection visible on Warp3, r=mkaply
Browse files Browse the repository at this point in the history
  • Loading branch information
p2ww committed Dec 14, 2007
1 parent 3f4f452 commit f9ff548
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions widget/src/os2/nsLookAndFeel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,25 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
idx = SYSCLR_BUTTONDEFAULT;
break;
case eColor__moz_menuhover:
idx = SYSCLR_MENUHILITEBGND;
if (SYSCLR_MENUHILITEBGND == SYSCLR_MENUHILITE) {
// if this happens, we would paint menu selections unreadable
// (we are most likely on Warp3), so let's fake a dark grey
// background for the selected menu item
aColor = NS_RGB( 132, 130, 132);
return res;
} else {
idx = SYSCLR_MENUHILITEBGND;
}
break;
case eColor__moz_menuhovertext:
case eColor__moz_menubarhovertext:
idx = SYSCLR_MENUHILITE;
if (SYSCLR_MENUHILITEBGND == SYSCLR_MENUHILITE) {
// white text to be readable on dark grey
aColor = NS_RGB( 255, 255, 255);
return res;
} else {
idx = SYSCLR_MENUHILITE;
}
break;
default:
idx = SYSCLR_WINDOW;
Expand Down

0 comments on commit f9ff548

Please sign in to comment.