Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: get foreground color from GtkMenuBar#menubar (3-1-x) #16222

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 5 additions & 8 deletions atom/browser/ui/views/menu_bar.cc
Expand Up @@ -5,7 +5,6 @@
#include "atom/browser/ui/views/menu_bar.h"

#include <memory>
#include <string>

#include "atom/browser/ui/views/menu_delegate.h"
#include "atom/browser/ui/views/submenu_button.h"
Expand Down Expand Up @@ -129,13 +128,11 @@ void MenuBar::RefreshColorCache(const ui::NativeTheme* theme) {
theme = ui::NativeTheme::GetInstanceForNativeUi();
if (theme) {
#if defined(USE_X11)
const std::string menubar_selector = "GtkMenuBar#menubar";
background_color_ = libgtkui::GetBgColor(menubar_selector);

enabled_color_ = theme->GetSystemColor(
ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor);
disabled_color_ = theme->GetSystemColor(
ui::NativeTheme::kColorId_DisabledMenuItemForegroundColor);
background_color_ = libgtkui::GetBgColor("GtkMenuBar#menubar");
enabled_color_ = libgtkui::GetFgColor(
"GtkMenuBar#menubar GtkMenuItem#menuitem GtkLabel");
disabled_color_ = libgtkui::GetFgColor(
"GtkMenuBar#menubar GtkMenuItem#menuitem:disabled GtkLabel");
#else
background_color_ =
theme->GetSystemColor(ui::NativeTheme::kColorId_MenuBackgroundColor);
Expand Down