Bug 1161056 - Gtk3 - use sMozWindowBackground colors for combobox background. r=karlt

--HG--
extra : rebase_source : 695ccb6a3ac30d3a1dc2512f68fc74468b9e779a
This commit is contained in:
Martin Stransky 2015-05-05 09:08:00 -04:00
Родитель cc52a79034
Коммит c6e6e47ede
1 изменённых файлов: 4 добавлений и 5 удалений

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

@ -101,6 +101,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor)
case eColorID_window:
case eColorID_windowframe:
case eColorID__moz_dialog:
case eColorID__moz_combobox:
aColor = sMozWindowBackground;
break;
case eColorID_WindowForeground:
@ -404,9 +405,11 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor)
case eColorID__moz_comboboxtext:
aColor = sComboBoxText;
break;
#if (MOZ_WIDGET_GTK == 2)
case eColorID__moz_combobox:
aColor = sComboBoxBackground;
break;
#endif
case eColorID__moz_menubartext:
aColor = sMenuBarText;
break;
@ -1148,15 +1151,11 @@ nsLookAndFeel::Init()
gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color);
sButtonHoverText = GDK_RGBA_TO_NS_RGBA(color);
// Combobox label and background colors
// Combobox text color
style = gtk_widget_get_style_context(comboboxLabel);
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
sComboBoxText = GDK_RGBA_TO_NS_RGBA(color);
style = gtk_widget_get_style_context(combobox);
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
sComboBoxBackground = GDK_RGBA_TO_NS_RGBA(color);
// Menubar text and hover text colors
style = gtk_widget_get_style_context(menuBar);
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);