diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp index a0950962c30f..7d49c8aaa005 100644 --- a/widget/gtk/nsLookAndFeel.cpp +++ b/widget/gtk/nsLookAndFeel.cpp @@ -243,9 +243,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) break; case eColorID_graytext: // disabled text in windows, menus, etc. case eColorID_inactivecaptiontext: // text in inactive window caption - gtk_style_context_get_color(mBackgroundStyle, - GTK_STATE_FLAG_INSENSITIVE, &gdk_color); - aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); + aColor = sMenuTextInactive; break; case eColorID_inactivecaption: // inactive window caption @@ -1029,6 +1027,8 @@ nsLookAndFeel::Init() style = gtk_widget_get_style_context(accel_label); gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); sMenuText = GDK_RGBA_TO_NS_RGBA(color); + gtk_style_context_get_color(style, GTK_STATE_FLAG_INSENSITIVE, &color); + sMenuTextInactive = GDK_RGBA_TO_NS_RGBA(color); style = gtk_widget_get_style_context(menu); gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); diff --git a/widget/gtk/nsLookAndFeel.h b/widget/gtk/nsLookAndFeel.h index 7686cca222ec..0da43f444beb 100644 --- a/widget/gtk/nsLookAndFeel.h +++ b/widget/gtk/nsLookAndFeel.h @@ -59,6 +59,7 @@ protected: nscolor sMenuBarText; nscolor sMenuBarHoverText; nscolor sMenuText; + nscolor sMenuTextInactive; nscolor sMenuHover; nscolor sMenuHoverText; nscolor sButtonText;