[OS/2] Bug 368864: now really make menu selection visible on Warp3, r=mkaply

This commit is contained in:
mozilla@weilbacher.org 2007-12-28 15:34:22 -08:00
Родитель 1f499f92d1
Коммит dcade0edc0
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -220,7 +220,8 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
idx = SYSCLR_BUTTONDEFAULT;
break;
case eColor__moz_menuhover:
if (SYSCLR_MENUHILITEBGND == SYSCLR_MENUHILITE) {
if (WinQuerySysColor(HWND_DESKTOP, SYSCLR_MENUHILITEBGND, 0) ==
WinQuerySysColor(HWND_DESKTOP, SYSCLR_MENU, 0)) {
// 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
@ -232,7 +233,8 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
break;
case eColor__moz_menuhovertext:
case eColor__moz_menubarhovertext:
if (SYSCLR_MENUHILITEBGND == SYSCLR_MENUHILITE) {
if (WinQuerySysColor(HWND_DESKTOP, SYSCLR_MENUHILITEBGND, 0) ==
WinQuerySysColor(HWND_DESKTOP, SYSCLR_MENU, 0)) {
// white text to be readable on dark grey
aColor = NS_RGB( 255, 255, 255);
return res;