backport: fix:menubar item fgcolor (3-0-x) (#16221)
This commit is contained in:
parent
48fe0649cb
commit
7ba432113f
1 changed files with 5 additions and 8 deletions
|
@ -5,7 +5,6 @@
|
||||||
#include "atom/browser/ui/views/menu_bar.h"
|
#include "atom/browser/ui/views/menu_bar.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "atom/browser/ui/views/menu_delegate.h"
|
#include "atom/browser/ui/views/menu_delegate.h"
|
||||||
#include "atom/browser/ui/views/submenu_button.h"
|
#include "atom/browser/ui/views/submenu_button.h"
|
||||||
|
@ -129,13 +128,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);
|
||||||
|
|
Loading…
Reference in a new issue