mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 827075 - Implement the -moz-menubar color and make it return the correct background color on gtk; r=roc
This commit is contained in:
parent
32a7997d2a
commit
ac66f2835b
@ -117,6 +117,7 @@ CSS_KEY(-moz-malayalam, _moz_malayalam)
|
||||
CSS_KEY(-moz-max-content, _moz_max_content)
|
||||
CSS_KEY(-moz-menuhover, _moz_menuhover)
|
||||
CSS_KEY(-moz-menuhovertext, _moz_menuhovertext)
|
||||
CSS_KEY(-moz-menubar, _moz_menubar)
|
||||
CSS_KEY(-moz-menubartext, _moz_menubartext)
|
||||
CSS_KEY(-moz-menubarhovertext, _moz_menubarhovertext)
|
||||
CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline)
|
||||
|
@ -854,6 +854,7 @@ const int32_t nsCSSProps::kColorKTable[] = {
|
||||
eCSSKeyword__moz_mac_secondaryhighlight, LookAndFeel::eColorID__moz_mac_secondaryhighlight,
|
||||
eCSSKeyword__moz_menuhover, LookAndFeel::eColorID__moz_menuhover,
|
||||
eCSSKeyword__moz_menuhovertext, LookAndFeel::eColorID__moz_menuhovertext,
|
||||
eCSSKeyword__moz_menubar, LookAndFeel::eColorID__moz_menubar,
|
||||
eCSSKeyword__moz_menubartext, LookAndFeel::eColorID__moz_menubartext,
|
||||
eCSSKeyword__moz_menubarhovertext, LookAndFeel::eColorID__moz_menubarhovertext,
|
||||
eCSSKeyword__moz_oddtreerow, LookAndFeel::eColorID__moz_oddtreerow,
|
||||
|
@ -114,6 +114,8 @@ public:
|
||||
eColorID__moz_menuhover,
|
||||
// used to menu item text, when mouse is over
|
||||
eColorID__moz_menuhovertext,
|
||||
// used to menu bar background
|
||||
eColorID__moz_menubar,
|
||||
// used to menu bar item text
|
||||
eColorID__moz_menubartext,
|
||||
// used to menu bar item text, when mouse is over
|
||||
|
@ -217,6 +217,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
aColor = mSystemColors.colorForeground;
|
||||
break;
|
||||
case eColorID_menu:
|
||||
case eColorID__moz_menubar:
|
||||
// menu background
|
||||
aColor = mSystemColors.colorBackground;
|
||||
break;
|
||||
|
@ -189,6 +189,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
aColor = NS_RGB(0xDA,0xDA,0xDA);
|
||||
break;
|
||||
case eColorID_menu:
|
||||
case eColorID__moz_menubar:
|
||||
aColor = GetColorFromNSColor([NSColor alternateSelectedControlTextColor]);
|
||||
break;
|
||||
case eColorID_infobackground:
|
||||
|
@ -174,6 +174,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
aColor = TEXT_NORMAL_COLOR;
|
||||
break;
|
||||
case eColorID_menu:
|
||||
case eColorID__moz_menubar:
|
||||
// menu background
|
||||
aColor = BG_NORMAL_COLOR;
|
||||
break;
|
||||
|
@ -37,6 +37,7 @@ using mozilla::LookAndFeel;
|
||||
|
||||
nscolor nsLookAndFeel::sInfoText = 0;
|
||||
nscolor nsLookAndFeel::sInfoBackground = 0;
|
||||
nscolor nsLookAndFeel::sMenuBar = 0;
|
||||
nscolor nsLookAndFeel::sMenuBarText = 0;
|
||||
nscolor nsLookAndFeel::sMenuBarHoverText = 0;
|
||||
nscolor nsLookAndFeel::sMenuText = 0;
|
||||
@ -311,6 +312,9 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor)
|
||||
case eColorID__moz_combobox:
|
||||
aColor = sComboBoxBackground;
|
||||
break;
|
||||
case eColorID__moz_menubar:
|
||||
aColor = sMenuBar;
|
||||
break;
|
||||
case eColorID__moz_menubartext:
|
||||
aColor = sMenuBarText;
|
||||
break;
|
||||
@ -885,6 +889,7 @@ nsLookAndFeel::InitLookAndFeel()
|
||||
|
||||
style = gtk_widget_get_style(menuBar);
|
||||
if (style) {
|
||||
sMenuBar = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
|
||||
sMenuBarText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_NORMAL]);
|
||||
sMenuBarHoverText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_SELECTED]);
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ protected:
|
||||
static nscolor sInfoBackground;
|
||||
static nscolor sInfoText;
|
||||
static nscolor sMenuBackground;
|
||||
static nscolor sMenuBar;
|
||||
static nscolor sMenuBarText;
|
||||
static nscolor sMenuBarHoverText;
|
||||
static nscolor sMenuText;
|
||||
|
@ -151,6 +151,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
idx = SYSCLR_WINDOWTEXT;
|
||||
break;
|
||||
case eColorID_menu:
|
||||
case eColorID__moz_menubar:
|
||||
idx = SYSCLR_MENU;
|
||||
break;
|
||||
case eColorID_menutext:
|
||||
|
@ -182,6 +182,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
break;
|
||||
|
||||
case eColorID_menu:
|
||||
case eColorID__moz_menubar:
|
||||
aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Window));
|
||||
break;
|
||||
|
||||
|
@ -205,6 +205,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
idx = COLOR_INFOTEXT;
|
||||
break;
|
||||
case eColorID_menu:
|
||||
case eColorID__moz_menubar:
|
||||
idx = COLOR_MENU;
|
||||
break;
|
||||
case eColorID_menutext:
|
||||
|
@ -194,6 +194,7 @@ const char nsXPLookAndFeel::sColorPrefs[][38] =
|
||||
"ui.-moz_buttonhovertext",
|
||||
"ui.-moz_menuhover",
|
||||
"ui.-moz_menuhovertext",
|
||||
"ui.-moz_menubar",
|
||||
"ui.-moz_menubartext",
|
||||
"ui.-moz_menubarhovertext",
|
||||
"ui.-moz_eventreerow",
|
||||
|
Loading…
Reference in New Issue
Block a user