From 8e26f6e3953f3b0e0a891057110c8e24b806a99a Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 30 Jun 2010 09:40:04 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20tablesList's=20searchField=20width?= =?UTF-8?q?=20after=20collapsing=20tablesList's=20view=20=E2=80=A2=20set?= =?UTF-8?q?=20minimum=20width=20of=20right=20view=20(Structure,=20Content,?= =?UTF-8?q?=20etc.)=20in=20order=20to=20avoid=20irreversible=20GUI=20overl?= =?UTF-8?q?aps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPDatabaseDocument.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Source/SPDatabaseDocument.m') diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 3c83f611..a323d7d3 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -232,6 +232,9 @@ [taskProgressWindow setBackgroundColor:[NSColor clearColor]]; [taskProgressWindow setAlphaValue:0.0]; [taskProgressWindow setContentView:taskProgressLayer]; + + [contentViewSplitter setDelegate:self]; + } /** @@ -4446,6 +4449,16 @@ #pragma mark - #pragma mark SplitView delegate methods +- (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)dividerIndex +{ + + // Limit the right view of DBViewSplitter in order to avoid GUI element overlapping + if(splitView == contentViewSplitter) return proposedMax - 470; + + return proposedMax; + +} + /** * tells the splitView that it can collapse views */ @@ -4456,7 +4469,11 @@ - (void)splitViewDidResizeSubviews:(NSNotification *)notification { + // Fix tablesList search field frame after collapsing the tablesList + [listFilterField setFrameSize:NSMakeSize([[[contentViewSplitter subviews] objectAtIndex:0] frame].size.width - 8, [listFilterField frame].size.height)]; + [self updateChooseDatabaseToolbarItemWidth]; + } - (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(NSInteger)dividerIndex -- cgit v1.2.3