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_threedface:
|
||||||
case eColorID_buttonface:
|
case eColorID_buttonface:
|
||||||
// 3-D face color
|
// 3-D face color
|
||||||
aColor = sButtonBackground;
|
aColor = sFrameBackground;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eColorID_buttontext:
|
case eColorID_buttontext:
|
||||||
@ -299,19 +299,19 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor)
|
|||||||
// 3-D highlighted edge color
|
// 3-D highlighted edge color
|
||||||
case eColorID_threedhighlight:
|
case eColorID_threedhighlight:
|
||||||
// 3-D highlighted outer edge color
|
// 3-D highlighted outer edge color
|
||||||
aColor = sButtonOuterLightBorder;
|
aColor = sFrameOuterLightBorder;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eColorID_threedlightshadow:
|
case eColorID_threedlightshadow:
|
||||||
// 3-D highlighted inner edge color
|
// 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;
|
break;
|
||||||
|
|
||||||
case eColorID_buttonshadow:
|
case eColorID_buttonshadow:
|
||||||
// 3-D shadow edge color
|
// 3-D shadow edge color
|
||||||
case eColorID_threedshadow:
|
case eColorID_threedshadow:
|
||||||
// 3-D shadow inner edge color
|
// 3-D shadow inner edge color
|
||||||
aColor = sButtonInnerDarkBorder;
|
aColor = sFrameInnerDarkBorder;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if (MOZ_WIDGET_GTK == 2)
|
#if (MOZ_WIDGET_GTK == 2)
|
||||||
@ -1121,10 +1121,10 @@ nsLookAndFeel::Init()
|
|||||||
|
|
||||||
style = gtk_widget_get_style(button);
|
style = gtk_widget_get_style(button);
|
||||||
if (style) {
|
if (style) {
|
||||||
sButtonBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
|
sFrameBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
|
||||||
sButtonOuterLightBorder =
|
sFrameOuterLightBorder =
|
||||||
GDK_COLOR_TO_NS_RGB(style->light[GTK_STATE_NORMAL]);
|
GDK_COLOR_TO_NS_RGB(style->light[GTK_STATE_NORMAL]);
|
||||||
sButtonInnerDarkBorder =
|
sFrameInnerDarkBorder =
|
||||||
GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]);
|
GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -1166,14 +1166,17 @@ nsLookAndFeel::Init()
|
|||||||
sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color);
|
sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color);
|
||||||
gtk_style_context_restore(style);
|
gtk_style_context_restore(style);
|
||||||
|
|
||||||
style = gtk_widget_get_style_context(button);
|
GtkWidget *frame = gtk_frame_new(nullptr);
|
||||||
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
|
gtk_container_add(GTK_CONTAINER(parent), frame);
|
||||||
sButtonBackground = GDK_RGBA_TO_NS_RGBA(color);
|
|
||||||
|
|
||||||
gtk_style_context_get_border_color(style, GTK_STATE_FLAG_PRELIGHT, &color);
|
style = gtk_widget_get_style_context(frame);
|
||||||
sButtonInnerDarkBorder = GDK_RGBA_TO_NS_RGBA(color);
|
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);
|
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
|
#endif
|
||||||
// Some themes have a unified menu bar, and support window dragging on it
|
// Some themes have a unified menu bar, and support window dragging on it
|
||||||
gboolean supports_menubar_drag = FALSE;
|
gboolean supports_menubar_drag = FALSE;
|
||||||
|
@ -62,11 +62,11 @@ protected:
|
|||||||
nscolor sMenuText;
|
nscolor sMenuText;
|
||||||
nscolor sMenuHover;
|
nscolor sMenuHover;
|
||||||
nscolor sMenuHoverText;
|
nscolor sMenuHoverText;
|
||||||
nscolor sButtonBackground;
|
|
||||||
nscolor sButtonText;
|
nscolor sButtonText;
|
||||||
nscolor sButtonHoverText;
|
nscolor sButtonHoverText;
|
||||||
nscolor sButtonOuterLightBorder;
|
nscolor sFrameBackground;
|
||||||
nscolor sButtonInnerDarkBorder;
|
nscolor sFrameOuterLightBorder;
|
||||||
|
nscolor sFrameInnerDarkBorder;
|
||||||
nscolor sOddCellBackground;
|
nscolor sOddCellBackground;
|
||||||
nscolor sNativeHyperLinkText;
|
nscolor sNativeHyperLinkText;
|
||||||
nscolor sComboBoxText;
|
nscolor sComboBoxText;
|
||||||
|
Loading…
Reference in New Issue
Block a user