mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 978172 - [GTK3] Fix doorhanger border. r=karlt
This commit is contained in:
parent
bf0ec1282a
commit
592956bbf2
@ -287,7 +287,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor)
|
||||
case eColorID_threedface:
|
||||
case eColorID_buttonface:
|
||||
// 3-D face color
|
||||
aColor = sButtonBackground;
|
||||
aColor = sFrameBackground;
|
||||
break;
|
||||
|
||||
case eColorID_buttontext:
|
||||
@ -299,19 +299,19 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor)
|
||||
// 3-D highlighted edge color
|
||||
case eColorID_threedhighlight:
|
||||
// 3-D highlighted outer edge color
|
||||
aColor = sButtonOuterLightBorder;
|
||||
aColor = sFrameOuterLightBorder;
|
||||
break;
|
||||
|
||||
case eColorID_threedlightshadow:
|
||||
// 3-D highlighted inner edge color
|
||||
aColor = sButtonBackground; // always same as background in GTK code
|
||||
aColor = sFrameBackground; // always same as background in GTK code
|
||||
break;
|
||||
|
||||
case eColorID_buttonshadow:
|
||||
// 3-D shadow edge color
|
||||
case eColorID_threedshadow:
|
||||
// 3-D shadow inner edge color
|
||||
aColor = sButtonInnerDarkBorder;
|
||||
aColor = sFrameInnerDarkBorder;
|
||||
break;
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
@ -1121,10 +1121,10 @@ nsLookAndFeel::Init()
|
||||
|
||||
style = gtk_widget_get_style(button);
|
||||
if (style) {
|
||||
sButtonBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
|
||||
sButtonOuterLightBorder =
|
||||
sFrameBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
|
||||
sFrameOuterLightBorder =
|
||||
GDK_COLOR_TO_NS_RGB(style->light[GTK_STATE_NORMAL]);
|
||||
sButtonInnerDarkBorder =
|
||||
sFrameInnerDarkBorder =
|
||||
GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]);
|
||||
}
|
||||
#else
|
||||
@ -1166,14 +1166,17 @@ nsLookAndFeel::Init()
|
||||
sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color);
|
||||
gtk_style_context_restore(style);
|
||||
|
||||
style = gtk_widget_get_style_context(button);
|
||||
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
||||
sButtonBackground = GDK_RGBA_TO_NS_RGBA(color);
|
||||
GtkWidget *frame = gtk_frame_new(nullptr);
|
||||
gtk_container_add(GTK_CONTAINER(parent), frame);
|
||||
|
||||
gtk_style_context_get_border_color(style, GTK_STATE_FLAG_PRELIGHT, &color);
|
||||
sButtonInnerDarkBorder = GDK_RGBA_TO_NS_RGBA(color);
|
||||
style = gtk_widget_get_style_context(frame);
|
||||
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
||||
sFrameBackground = GDK_RGBA_TO_NS_RGBA(color);
|
||||
|
||||
// TODO GTK3 - update sFrameOuterLightBorder
|
||||
// for GTK_BORDER_STYLE_INSET/OUTSET/GROVE/RIDGE border styles (Bug 978172).
|
||||
gtk_style_context_get_border_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
||||
sButtonOuterLightBorder = GDK_RGBA_TO_NS_RGBA(color);
|
||||
sFrameInnerDarkBorder = sFrameOuterLightBorder = GDK_RGBA_TO_NS_RGBA(color);
|
||||
#endif
|
||||
// Some themes have a unified menu bar, and support window dragging on it
|
||||
gboolean supports_menubar_drag = FALSE;
|
||||
|
@ -62,11 +62,11 @@ protected:
|
||||
nscolor sMenuText;
|
||||
nscolor sMenuHover;
|
||||
nscolor sMenuHoverText;
|
||||
nscolor sButtonBackground;
|
||||
nscolor sButtonText;
|
||||
nscolor sButtonHoverText;
|
||||
nscolor sButtonOuterLightBorder;
|
||||
nscolor sButtonInnerDarkBorder;
|
||||
nscolor sFrameBackground;
|
||||
nscolor sFrameOuterLightBorder;
|
||||
nscolor sFrameInnerDarkBorder;
|
||||
nscolor sOddCellBackground;
|
||||
nscolor sNativeHyperLinkText;
|
||||
nscolor sComboBoxText;
|
||||
|
Loading…
Reference in New Issue
Block a user