mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: use GetAuraColor to get theme dependant menu bg color (#19505)
This commit is contained in:
committed by
John Kleinschmidt
parent
60d36e1b74
commit
855bd92f6e
@@ -12,6 +12,7 @@
|
||||
#include "atom/common/keyboard_util.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/base/models/menu_model.h"
|
||||
#include "ui/native_theme/common_theme.h"
|
||||
#include "ui/views/background.h"
|
||||
#include "ui/views/layout/box_layout.h"
|
||||
#include "ui/views/widget/widget.h"
|
||||
@@ -297,12 +298,9 @@ void MenuBar::RefreshColorCache() {
|
||||
"GtkMenuBar#menubar GtkMenuItem#menuitem:disabled GtkLabel");
|
||||
#else
|
||||
background_color_ =
|
||||
theme->GetSystemColor(ui::NativeTheme::kColorId_MenuBackgroundColor);
|
||||
ui::GetAuraColor(ui::NativeTheme::kColorId_MenuBackgroundColor, theme);
|
||||
#endif
|
||||
}
|
||||
#if defined(OS_WIN)
|
||||
background_color_ = color_utils::GetSysSkColor(COLOR_MENUBAR);
|
||||
#endif
|
||||
}
|
||||
|
||||
void MenuBar::OnThemeChanged() {
|
||||
|
||||
Reference in New Issue
Block a user