fix: reposition traffic lights on theme change (#22534)
This commit is contained in:
parent
b3e1134a1a
commit
3c19aee73c
2 changed files with 15 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "shell/browser/native_window.h"
|
||||
#include "ui/native_theme/native_theme_observer.h"
|
||||
#include "ui/views/controls/native/native_view_host.h"
|
||||
|
||||
@class ElectronNSWindow;
|
||||
|
@ -26,7 +27,7 @@ namespace electron {
|
|||
|
||||
class RootViewMac;
|
||||
|
||||
class NativeWindowMac : public NativeWindow {
|
||||
class NativeWindowMac : public NativeWindow, public ui::NativeThemeObserver {
|
||||
public:
|
||||
NativeWindowMac(const gin_helper::Dictionary& options, NativeWindow* parent);
|
||||
~NativeWindowMac() override;
|
||||
|
@ -152,6 +153,7 @@ class NativeWindowMac : public NativeWindow {
|
|||
// Custom traffic light positioning
|
||||
void RepositionTrafficLights();
|
||||
void SetExitingFullScreen(bool flag);
|
||||
void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override;
|
||||
|
||||
enum class TitleBarStyle {
|
||||
NORMAL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue