diff options
author | trav90 <travawine@protonmail.ch> | 2018-04-06 07:41:32 -0500 |
---|---|---|
committer | trav90 <travawine@protonmail.ch> | 2018-04-06 07:52:43 -0500 |
commit | 3203c21a801b034e7d8c8ce2e4cd802adc37b1fc (patch) | |
tree | 6cafee2a1b745bf2e6224f7db2b389b5d8f388bd /widget/gtk/nsLookAndFeel.cpp | |
parent | 0f83951b6b67e9c1a1e4c30b107639671a02d567 (diff) | |
download | uxp-3203c21a801b034e7d8c8ce2e4cd802adc37b1fc.tar.gz |
[GTK3] Use WidgetCache to get colors at nsLookAndFeel
Diffstat (limited to 'widget/gtk/nsLookAndFeel.cpp')
-rw-r--r-- | widget/gtk/nsLookAndFeel.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp index 53430dfbb8..775b529248 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); |