aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTableStructure.h5
-rw-r--r--Source/SPTableStructure.m21
2 files changed, 24 insertions, 2 deletions
diff --git a/Source/SPTableStructure.h b/Source/SPTableStructure.h
index 5c50ec85..f81078b1 100644
--- a/Source/SPTableStructure.h
+++ b/Source/SPTableStructure.h
@@ -51,6 +51,8 @@
IBOutlet id removeIndexButton;
IBOutlet id refreshIndexesButton;
IBOutlet id indexesTableView;
+ IBOutlet NSSplitView *tablesIndexesSplitView;
+ IBOutlet NSButton *indexesShowButton;
MCPConnection *mySQLConnection;
MCPResult *tableSourceResult;
@@ -99,4 +101,7 @@
- (void)startDocumentTaskForTab:(NSNotification *)aNotification;
- (void)endDocumentTaskForTab:(NSNotification *)aNotification;
+// Split view interaction
+- (IBAction)unhideIndexesView:(id)sender;
+
@end
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