зеркало из https://github.com/mozilla/pjs.git
r=mkaply, sr=dbaron Add a lookandfeel color for button default so it can be different than 3D shadow
This commit is contained in:
Родитель
baeebe3872
Коммит
d4874ee0d0
|
@ -243,7 +243,10 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
break;
|
||||
case eColor__moz_dragtargetzone:
|
||||
aColor = NS_RGB(0x63, 0x63, 0xCE);
|
||||
break;
|
||||
break;
|
||||
case eColor__moz_buttondefault:
|
||||
aColor = NS_RGB(0x77, 0x77, 0x77);
|
||||
break;
|
||||
case eColor_LAST_COLOR:
|
||||
default:
|
||||
aColor = NS_RGB(0xff, 0xff, 0xff);
|
||||
|
|
|
@ -247,6 +247,10 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
|
|||
case eColor__moz_dragtargetzone:
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_SELECTED]);
|
||||
break;
|
||||
case eColor__moz_buttondefault:
|
||||
// default button border color
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->black);
|
||||
break;
|
||||
default:
|
||||
/* default color is BLACK */
|
||||
aColor = 0;
|
||||
|
|
|
@ -251,6 +251,10 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
|
|||
case eColor__moz_dragtargetzone:
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_SELECTED]);
|
||||
break;
|
||||
case eColor__moz_buttondefault:
|
||||
// default button border color
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->black);
|
||||
break;
|
||||
default:
|
||||
/* default color is BLACK */
|
||||
aColor = 0;
|
||||
|
|
|
@ -324,6 +324,9 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
//get this colour by querying variation table, ows. default to Platinum/Lavendar
|
||||
res = GetMacAccentColor(eColorOffset_mac_accentdarkestshadow, aColor, NS_RGB(0x00,0x00,0x55));
|
||||
break;
|
||||
case eColor__moz_buttondefault:
|
||||
res = GetMacBrushColor(kThemeBrushButtonActiveDarkShadow, aColor, NS_RGB(0x77,0x77,0x77));
|
||||
break;
|
||||
default:
|
||||
NS_WARNING("Someone asked nsILookAndFeel for a color I don't know about");
|
||||
aColor = NS_RGB(0xff,0xff,0xff);
|
||||
|
|
|
@ -157,7 +157,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = SYSCLR_SCROLLBAR;
|
||||
break;
|
||||
case eColor_threeddarkshadow:
|
||||
idx = SYSCLR_BUTTONDEFAULT;
|
||||
idx = SYSCLR_BUTTONDARK;
|
||||
break;
|
||||
case eColor_threedface:
|
||||
idx = SYSCLR_BUTTONMIDDLE;
|
||||
|
@ -192,6 +192,9 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
case eColor__moz_dialogtext:
|
||||
idx = SYSCLR_WINDOWTEXT;
|
||||
break;
|
||||
case eColor__moz_buttondefault:
|
||||
idx = SYSCLR_BUTTONDEFAULT;
|
||||
break;
|
||||
default:
|
||||
idx = SYSCLR_WINDOW;
|
||||
break;
|
||||
|
|
|
@ -212,6 +212,10 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
aColor = PH_TO_NS_RGB(Pg_LGREY);
|
||||
break;
|
||||
|
||||
case eColor__moz_buttondefault:
|
||||
aColor = PH_TO_NS_RGB(Pg_DGREY);
|
||||
break;
|
||||
|
||||
default:
|
||||
aColor = PH_TO_NS_RGB(Pg_WHITE);
|
||||
break;
|
||||
|
|
|
@ -190,11 +190,14 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = COLOR_WINDOWTEXT;
|
||||
break;
|
||||
case eColor__moz_dragtargetzone:
|
||||
idx = COLOR_HIGHLIGHTTEXT;
|
||||
break;
|
||||
idx = COLOR_HIGHLIGHTTEXT;
|
||||
break;
|
||||
case eColor__moz_buttondefault:
|
||||
idx = COLOR_3DDKSHADOW;
|
||||
break;
|
||||
default:
|
||||
idx = COLOR_WINDOW;
|
||||
break;
|
||||
idx = COLOR_WINDOW;
|
||||
break;
|
||||
}
|
||||
|
||||
DWORD color = ::GetSysColor(idx);
|
||||
|
|
|
@ -197,6 +197,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
aColor = NS_RGB(0x00, 0x00, 0x00);
|
||||
break;
|
||||
|
||||
case eColor__moz_buttondefault:
|
||||
// default button border color
|
||||
aColor = NS_RGB(0x00, 0x00, 0x00);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* default color is BLACK */
|
||||
aColor = 0;
|
||||
|
|
|
@ -170,6 +170,7 @@ char* nsXPLookAndFeel::sColorPrefs[] =
|
|||
"ui.window",
|
||||
"ui.windowframe",
|
||||
"ui.windowtext",
|
||||
"ui.-moz-buttondefault",
|
||||
"ui.-moz-field",
|
||||
"ui.-moz-fieldtext",
|
||||
"ui.-moz-dialog",
|
||||
|
|
Загрузка…
Ссылка в новой задаче