fix: read GTK dark theme setting on Linux (#23678)

This commit is contained in:
Cheng Zhao 2020-05-22 07:41:25 +09:00 committed by GitHub
parent 82924679fe
commit fdf40ce07a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 4 deletions

View file

@ -59,6 +59,10 @@ class ViewsDelegate;
class ViewsDelegateMac;
#endif
#if defined(USE_X11)
class DarkThemeObserver;
#endif
class ElectronBrowserMainParts : public content::BrowserMainParts {
public:
explicit ElectronBrowserMainParts(const content::MainFunctionParams& params);
@ -129,6 +133,8 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
#if defined(USE_X11)
std::unique_ptr<ui::GtkUiDelegate> gtk_ui_delegate_;
// Used to notify the native theme of changes to dark mode.
std::unique_ptr<DarkThemeObserver> dark_theme_observer_;
#endif
std::unique_ptr<views::LayoutProvider> layout_provider_;