aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-12-21 01:40:09 +0000
committerrowanbeentje <rowan@beent.je>2010-12-21 01:40:09 +0000
commit412b09885523847f4f9b0eb8bf898dcf72688952 (patch)
tree282ccf64d4a51f8cc79f27de94eef21ae99e1c05 /Source/SPTableContent.m
parentd23a09dbbc88a0e10d36b05bbacbca8c1dec3147 (diff)
downloadsequelpro-412b09885523847f4f9b0eb8bf898dcf72688952.tar.gz
sequelpro-412b09885523847f4f9b0eb8bf898dcf72688952.tar.bz2
sequelpro-412b09885523847f4f9b0eb8bf898dcf72688952.zip
- Fix split view overlap on the custom query view cuasing lines on scrolling/resize; this addresses Issue #929
- Fix split view overlap on the tables list/info pane causing lines on scrolling/resize; this addresses Issue #740 - Add custom resize behaviour for the table content splitview, addressing Issue #543 - Make button bars at the bottom of the window a consistent height - Fix bug with new splitview setup causing tables pane to become narrower with each launch
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r--Source/SPTableContent.m29
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 82282b5d..8e2bde89 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -4164,16 +4164,45 @@
return NO;
}
+// Set a minimum size for the filter text area
- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset
{
return (proposedMax - 180);
}
+// Set a minimum size for the field list and action area
- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset
{
return (proposedMin + 200);
}
+// Improve default resizing and resize only the filter text area by default
+- (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize:(NSSize)oldSize
+{
+ NSSize newSize = [sender frame].size;
+ NSView *leftView = [[sender subviews] objectAtIndex:0];
+ NSView *rightView = [[sender subviews] objectAtIndex:1];
+ float dividerThickness = [sender dividerThickness];
+ NSRect leftFrame = [leftView frame];
+ NSRect rightFrame = [rightView frame];
+
+ // Resize height of both views
+ leftFrame.size.height = newSize.height;
+ rightFrame.size.height = newSize.height;
+
+ // Only resize the right view's width - unless the constraint has been reached
+ if (rightFrame.size.width > 180 || newSize.width > oldSize.width) {
+ rightFrame.size.width = newSize.width - leftFrame.size.width - dividerThickness;
+ } else {
+ leftFrame.size.width = newSize.width - rightFrame.size.width - dividerThickness;
+ }
+ rightFrame.origin.x = leftFrame.size.width + dividerThickness;
+
+ [leftView setFrame:leftFrame];
+ [rightView setFrame:rightFrame];
+}
+
+
#pragma mark -
#pragma mark Task interaction