summaryrefslogtreecommitdiffstats
path: root/widget/gtk/nsLookAndFeel.cpp
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2018-04-06 07:41:32 -0500
committertrav90 <travawine@protonmail.ch>2018-04-06 07:52:43 -0500
commit3203c21a801b034e7d8c8ce2e4cd802adc37b1fc (patch)
tree6cafee2a1b745bf2e6224f7db2b389b5d8f388bd /widget/gtk/nsLookAndFeel.cpp
parent0f83951b6b67e9c1a1e4c30b107639671a02d567 (diff)
downloadUXP-3203c21a801b034e7d8c8ce2e4cd802adc37b1fc.tar
UXP-3203c21a801b034e7d8c8ce2e4cd802adc37b1fc.tar.gz
UXP-3203c21a801b034e7d8c8ce2e4cd802adc37b1fc.tar.lz
UXP-3203c21a801b034e7d8c8ce2e4cd802adc37b1fc.tar.xz
UXP-3203c21a801b034e7d8c8ce2e4cd802adc37b1fc.zip
[GTK3] Use WidgetCache to get colors at nsLookAndFeel
Diffstat (limited to 'widget/gtk/nsLookAndFeel.cpp')
-rw-r--r--widget/gtk/nsLookAndFeel.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp
index 53430dfbb..775b52924 100644
--- a/widget/gtk/nsLookAndFeel.cpp
+++ b/widget/gtk/nsLookAndFeel.cpp
@@ -1161,16 +1161,10 @@ nsLookAndFeel::Init()
style = ClaimStyleContext(MOZ_GTK_TOOLTIP);
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
sInfoBackground = GDK_RGBA_TO_NS_RGBA(color);
- {
- GtkStyleContext* boxStyle =
- CreateStyleForWidget(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0),
- style);
- GtkStyleContext* labelStyle =
- CreateStyleForWidget(gtk_label_new(nullptr), boxStyle);
- gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_NORMAL, &color);
- g_object_unref(labelStyle);
- g_object_unref(boxStyle);
- }
+ ReleaseStyleContext(style);
+
+ style = ClaimStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL);
+ gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
sInfoText = GDK_RGBA_TO_NS_RGBA(color);
ReleaseStyleContext(style);