Bug 1250704 - use style from WidgetStyleCache for tooltip colors. r=stransky

MozReview-Commit-ID: 9xzL8ckxTRQ

--HG--
extra : transplant_source : %CB_%B9f%FD%10/%CD%5D%AF%85e%BE%A1%25psL%0A%0A
This commit is contained in:
Karl Tomlinson 2016-06-07 16:11:51 +12:00
parent 34f103fe45
commit dc092e5197

View File

@ -31,6 +31,7 @@
#if MOZ_WIDGET_GTK != 2
#include <cairo-gobject.h>
#include "WidgetStyleCache.h"
#endif
using mozilla::LookAndFeel;
@ -1135,15 +1136,15 @@ nsLookAndFeel::Init()
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
sMozWindowText = GDK_RGBA_TO_NS_RGBA(color);
gtk_style_context_restore(style);
g_object_unref(style);
// tooltip foreground and background
gtk_style_context_add_class(style, GTK_STYLE_CLASS_TOOLTIP);
gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND);
style = ClaimStyleContext(MOZ_GTK_TOOLTIP);
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
sInfoBackground = GDK_RGBA_TO_NS_RGBA(color);
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
sInfoText = GDK_RGBA_TO_NS_RGBA(color);
g_object_unref(style);
ReleaseStyleContext(style);
// menu foreground & menu background
GtkWidget *accel_label = gtk_accel_label_new("M");