diff options
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r-- | cocoa/ScintillaView.mm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 593722c1e..f878a7a6b 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -338,6 +338,17 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { //-------------------------------------------------------------------------------------------------- /** + * Gets called by the runtime when the effective appearance changes. + */ +- (void) viewDidChangeEffectiveAppearance { + if (mOwner.backend) { + mOwner.backend->UpdateBaseElements(); + } +} + +//-------------------------------------------------------------------------------------------------- + +/** * Gets called by the runtime when the view needs repainting. */ - (void) drawRect: (NSRect) rect { @@ -1454,11 +1465,18 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { name: NSWindowWillMoveNotification object: self.window]; + [center addObserver: self + selector: @selector(defaultsDidChange:) + name: NSSystemColorsDidChangeNotification + object: self.window]; + [scrollView.contentView setPostsBoundsChangedNotifications: YES]; [center addObserver: self selector: @selector(scrollerAction:) name: NSViewBoundsDidChangeNotification object: scrollView.contentView]; + + mBackend->UpdateBaseElements(); } return self; } @@ -1498,6 +1516,13 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { //-------------------------------------------------------------------------------------------------- +- (void) defaultsDidChange: (NSNotification *) note { +#pragma unused(note) + mBackend->UpdateBaseElements(); +} + +//-------------------------------------------------------------------------------------------------- + - (void) viewDidMoveToWindow { [super viewDidMoveToWindow]; |