Fix GTK menubar item color (#15878)
Use menubar item color (not menu item color). Closes #15194
This commit is contained in:
parent
515525cfc6
commit
2e91bf1e15
2 changed files with 14 additions and 8 deletions
|
@ -7,7 +7,6 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "atom/browser/ui/views/submenu_button.h"
|
#include "atom/browser/ui/views/submenu_button.h"
|
||||||
#include "atom/common/keyboard_util.h"
|
#include "atom/common/keyboard_util.h"
|
||||||
|
@ -268,13 +267,11 @@ void MenuBar::RefreshColorCache(const ui::NativeTheme* theme) {
|
||||||
theme = ui::NativeTheme::GetInstanceForNativeUi();
|
theme = ui::NativeTheme::GetInstanceForNativeUi();
|
||||||
if (theme) {
|
if (theme) {
|
||||||
#if defined(USE_X11)
|
#if defined(USE_X11)
|
||||||
const std::string menubar_selector = "GtkMenuBar#menubar";
|
background_color_ = libgtkui::GetBgColor("GtkMenuBar#menubar");
|
||||||
background_color_ = libgtkui::GetBgColor(menubar_selector);
|
enabled_color_ = libgtkui::GetFgColor(
|
||||||
|
"GtkMenuBar#menubar GtkMenuItem#menuitem GtkLabel");
|
||||||
enabled_color_ = theme->GetSystemColor(
|
disabled_color_ = libgtkui::GetFgColor(
|
||||||
ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor);
|
"GtkMenuBar#menubar GtkMenuItem#menuitem:disabled GtkLabel");
|
||||||
disabled_color_ = theme->GetSystemColor(
|
|
||||||
ui::NativeTheme::kColorId_DisabledMenuItemForegroundColor);
|
|
||||||
#else
|
#else
|
||||||
background_color_ =
|
background_color_ =
|
||||||
theme->GetSystemColor(ui::NativeTheme::kColorId_MenuBackgroundColor);
|
theme->GetSystemColor(ui::NativeTheme::kColorId_MenuBackgroundColor);
|
||||||
|
|
|
@ -39,6 +39,15 @@ index d9f245070249f5f153bd8fe11e0a5e718c7d3629..a0f033c3e3f7f3996897f5f969b2a209
|
||||||
|
|
||||||
// Gets the transient parent aura window for |dialog|.
|
// Gets the transient parent aura window for |dialog|.
|
||||||
aura::Window* GetAuraTransientParent(GtkWidget* dialog);
|
aura::Window* GetAuraTransientParent(GtkWidget* dialog);
|
||||||
|
@@ -180,7 +181,7 @@ void ApplyCssToContext(GtkStyleContext* context, const std::string& css);
|
||||||
|
|
||||||
|
// Get the 'color' property from the style context created by
|
||||||
|
// GetStyleContextFromCss(|css_selector|).
|
||||||
|
-SkColor GetFgColor(const std::string& css_selector);
|
||||||
|
+LIBGTKUI_EXPORT SkColor GetFgColor(const std::string& css_selector);
|
||||||
|
|
||||||
|
ScopedCssProvider GetCssProvider(const std::string& css);
|
||||||
|
|
||||||
@@ -193,7 +194,7 @@ void RenderBackground(const gfx::Size& size,
|
@@ -193,7 +194,7 @@ void RenderBackground(const gfx::Size& size,
|
||||||
// Renders a background from the style context created by
|
// Renders a background from the style context created by
|
||||||
// GetStyleContextFromCss(|css_selector|) into a 24x24 bitmap and
|
// GetStyleContextFromCss(|css_selector|) into a 24x24 bitmap and
|
||||||
|
|
Loading…
Reference in a new issue