diff options
author | rowanbeentje <rowan@beent.je> | 2010-07-17 22:19:03 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-07-17 22:19:03 +0000 |
commit | 8a5c8b954e00302cf5de32edcaf12c0b7b3eed82 (patch) | |
tree | 371712798726ca1ba674a77a0e6c9a12e40fff3a /Source/SPTableStructure.m | |
parent | 8f5362b01faf105b6ff8d1cafaccf5a72560d7e9 (diff) | |
download | sequelpro-8a5c8b954e00302cf5de32edcaf12c0b7b3eed82.tar.gz sequelpro-8a5c8b954e00302cf5de32edcaf12c0b7b3eed82.tar.bz2 sequelpro-8a5c8b954e00302cf5de32edcaf12c0b7b3eed82.zip |
Tweak structure view index collapsing:
- Make the minimum index view size a little smaller
- Add a button to reveal the indexes subview when it is collapsed. This button is hidden when te index view is not collapsed.
This addresses Issue #746
Diffstat (limited to 'Source/SPTableStructure.m')
-rw-r--r-- | Source/SPTableStructure.m | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 957ea21c..0c51f083 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -1549,12 +1549,12 @@ would result in a position change. - (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset { - return proposedMax - 150; + return proposedMax - 130; } - (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset { - return proposedMin + 150; + return proposedMin + 130; } - (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(NSInteger)dividerIndex @@ -1562,6 +1562,23 @@ would result in a position change. return [structureGrabber convertRect:[structureGrabber bounds] toView:splitView]; } +- (void)splitViewDidResizeSubviews:(NSNotification *)aNotification +{ + if ([aNotification object] == tablesIndexesSplitView) { + NSView *indexesView = [[tablesIndexesSplitView subviews] objectAtIndex:1]; + if ([tablesIndexesSplitView isSubviewCollapsed:indexesView]) { + [indexesShowButton setHidden:NO]; + } else { + [indexesShowButton setHidden:YES]; + } + } +} + +- (IBAction)unhideIndexesView:(id)sender +{ + [tablesIndexesSplitView setPosition:[tablesIndexesSplitView frame].size.height-130 ofDividerAtIndex:0]; +} + #pragma mark - #pragma mark Private API methods |