From f70ed78b65b9acda2569ed5ee4e8f0d7847ed615 Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Wed, 27 Dec 2017 21:34:05 +0100 Subject: Fix scroll bars. --- frontends/cocoa/ScrollableView.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontends/cocoa/ScrollableView.m b/frontends/cocoa/ScrollableView.m index 130fce201..6f20bfe28 100644 --- a/frontends/cocoa/ScrollableView.m +++ b/frontends/cocoa/ScrollableView.m @@ -38,17 +38,14 @@ - (void)adjustFrame { - NSSize frameSize = [[self superview] frame].size; + NSSize frameSize = self.enclosingScrollView.contentSize; [self setFrameSize:NSMakeSize(MAX(self.minimumSize.width, frameSize.width), MAX(self.minimumSize.height, frameSize.height))]; } - (void)frameChangeNotification:(NSNotification *)note { - // TODO: Correctly handle window resizing. - // Removing this call is a quick hack to avoid an endless layout loop due to appearing/disappearing - // scroll bars. - //[self adjustFrame]; + [self adjustFrame]; } - (void)viewDidMoveToSuperview -- cgit v1.2.3