diff options
author | Max <post@wickenrode.com> | 2014-11-29 00:44:02 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2014-11-29 00:44:02 +0100 |
commit | a8598d0fb4bab81a3c654f99d2e6eebc7d818086 (patch) | |
tree | 78d1fffa25a05e0163812dd7be00c731ae7f7103 /Source/SPDatabaseDocument.m | |
parent | 065d72ceb7e8213348490815f6f90ecf4de56061 (diff) | |
download | sequelpro-a8598d0fb4bab81a3c654f99d2e6eebc7d818086.tar.gz sequelpro-a8598d0fb4bab81a3c654f99d2e6eebc7d818086.tar.bz2 sequelpro-a8598d0fb4bab81a3c654f99d2e6eebc7d818086.zip |
Change some split view width calculations.
* Attempt to fix the "<SPSplitView: ...>: the delegate <SPSplitView: ...> was sent -splitView:resizeSubviewsWithOldSize: and left the subview frames in an inconsistent state:" message that has been plaguing my console for some time.
* This commit also adds a minimum width on the main area to prevent some strange UI bugs.
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index b8d6dd83..505164c3 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -4314,7 +4314,8 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase"; */ - (void)tabDidResize { - + // Coax the main split view into actually checking its constraints + [contentViewSplitter setPosition:[[[contentViewSplitter subviews] objectAtIndex:0] bounds].size.width ofDividerAtIndex:0]; // If the task interface is visible, and this tab is frontmost, re-center the task child window if (_isWorkingLevel && [parentWindowController selectedTableDocument] == self) [self centerTaskWindow]; } @@ -5766,6 +5767,10 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase"; - (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMaximumPosition ofSubviewAt:(NSInteger)dividerIndex { + //the right side of the SP window must be at least 505px wide or the UI will break! + if(dividerIndex == 0) { + return proposedMaximumPosition - 505; + } return proposedMaximumPosition; } |