aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerDelegate.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-12-20 02:01:49 +0000
committerrowanbeentje <rowan@beent.je>2010-12-20 02:01:49 +0000
commitb3b8f0ff04486a982175f70ba72a623a5fff9ad7 (patch)
treeb7b08d3a237964de454b76d3a678d9e4ee240773 /Source/SPConnectionControllerDelegate.m
parent2a6c654d165c207281d10295ebcc40b3cae864ea (diff)
downloadsequelpro-b3b8f0ff04486a982175f70ba72a623a5fff9ad7.tar.gz
sequelpro-b3b8f0ff04486a982175f70ba72a623a5fff9ad7.tar.bz2
sequelpro-b3b8f0ff04486a982175f70ba72a623a5fff9ad7.zip
Address Issue #857:
- Replace master connection and database view split views with full BWSplitViews so controls appear in Interface Builder; use those settings to apply which panes resize, and any max/min constraints - Remove split view delegate code which is no longer necessary after these changes - Fix a bug marking the master database view split view thumb as applying to all DatabaseDocument splits views, fixing cursor issues - Update Connection Controller/BWToolkit split view delegate setup to fix resizing issues
Diffstat (limited to 'Source/SPConnectionControllerDelegate.m')
-rw-r--r--Source/SPConnectionControllerDelegate.m27
1 files changed, 6 insertions, 21 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index 6bb0ee47..665119da 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -110,33 +110,18 @@
#pragma mark -
#pragma mark SplitView delegate methods
-/**
- * When the split view is resized, trigger a resize in the hidden table
- * width as well, to keep the connection view and connected view in synch.
- * Use this rather than splitViewDidResizeSubviews: as the latter is not
- * forwarded by the BWAnchoredButtonBar.
- */
-- (CGFloat)splitView:(NSSplitView *)splitView constrainSplitPosition:(CGFloat)proposedPosition ofSubviewAt:(NSInteger)dividerIndex
-{
- [databaseConnectionView setPosition:[[[connectionSplitView subviews] objectAtIndex:0] frame].size.width ofDividerAtIndex:0];
-
- return proposedPosition;
-}
-
-/**
- * Return the maximum possible size of the splitview.
- */
-- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset
+- (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(NSInteger)dividerIndex
{
- return (proposedMax - 445);
+ return [connectionSplitViewButtonBar splitView:splitView additionalEffectiveRectOfDividerAtIndex:dividerIndex];
}
/**
- * Return the minimum possible size of the splitview.
+ * When the split view is resized, trigger a resize in the hidden table
+ * width as well, to keep the connection view and connected view in synch.
*/
-- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset
+- (void)splitViewDidResizeSubviews:(NSNotification *)aNotification
{
- return (proposedMin + 80);
+ [databaseConnectionView setPosition:[[[connectionSplitView subviews] objectAtIndex:0] frame].size.width ofDividerAtIndex:0];
}
#pragma mark -