From 412b09885523847f4f9b0eb8bf898dcf72688952 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 21 Dec 2010 01:40:09 +0000 Subject: - 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 --- Interfaces/English.lproj/ConnectionView.xib | 2 +- Interfaces/English.lproj/DBView.xib | 882 ++++++++++++++-------------- Source/SPConnectionController.m | 2 +- Source/SPTableContent.m | 29 + 4 files changed, 475 insertions(+), 440 deletions(-) diff --git a/Interfaces/English.lproj/ConnectionView.xib b/Interfaces/English.lproj/ConnectionView.xib index a1919fc0..7c9d6306 100644 --- a/Interfaces/English.lproj/ConnectionView.xib +++ b/Interfaces/English.lproj/ConnectionView.xib @@ -363,7 +363,7 @@ - {202, 23} + {{0, 1}, {202, 23}} YES YES diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index c3c79414..1b6dd208 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -23,7 +23,7 @@ YES - + YES @@ -348,7 +348,7 @@ - {214, 23} + {{0, 1}, {214, 23}} YES YES @@ -615,7 +615,7 @@ 4352 - {214, 354} + {214, 352} YES @@ -681,7 +681,7 @@ 1 - {214, 354} + {214, 352} @@ -709,7 +709,7 @@ 0.99047619104385376 - {214, 354} + {214, 352} 528 @@ -719,12 +719,12 @@ QSAAAEEgAABBmAAAQZgAAA - {{0, 27}, {214, 354}} + {{0, 27}, {214, 352}} NSView - {214, 381} + {214, 379} 2 @@ -757,7 +757,7 @@ NO - {214, 381} + {214, 379} NSView @@ -791,7 +791,7 @@ YES name - 211 + 213 43 1000 @@ -834,7 +834,7 @@ 45 - 1377828864 + 1379926016 2 @@ -998,12 +998,12 @@ QSAAAEEgAABBmAAAQZgAAA - {{0, 382}, {214, 145}} + {{0, 380}, {214, 145}} NSView - {{0, 22}, {214, 527}} + {{0, 24}, {214, 525}} 2 @@ -1065,7 +1065,7 @@ source - + 256 YES @@ -2536,7 +2536,6 @@ {{10, 7}, {706, 544}} - Structure @@ -2545,7 +2544,7 @@ content - + 256 YES @@ -2866,55 +2865,134 @@ - + + + 289 + {{654, 10}, {32, 25}} + + YES + + 67239424 + 134217728 + + + + -2042347265 + 35 + + NSImage + button_right + + + + 400 + 75 + + + + + 289 + {{592, 10}, {32, 25}} + + YES + + 67239424 + 134217728 + + + + -2042347265 + 35 + + NSImage + button_left + + + + 400 + 75 + + + + + 289 + {{623, 10}, {32, 25}} + + YES + + 67239424 + 134217728 + + + + -934526721 + 268435491 + + NSImage + button_pagination + + + j + 400 + 75 + + + + + 265 + {{734, 507}, {160, 16}} + + YES + + 67239424 + 134479872 + ShowFilterTable_Dummy_Button + + LucidaGrande + 9 + 3614 + + + -2038284033 + 268435585 + + f + 200 + 25 + + + 266 YES - - - 290 + + + 256 YES - - - 264 - {{7, 6}, {43, 14}} - - YES - - 67239488 - 272761856 - Search: - - - - - - - - - 266 - {{51, 3}, {160, 20}} - + + + 265 + {{216, 0}, {95, 25}} + YES - + -1539178944 133120 - - - -2038284033 + + + -2038415105 36 - 400 75 - - - field + + + is 1048576 2147483647 @@ -2922,16 +3000,16 @@ _popUpItemAction: - + YES - + OtherViews YES - + 3 @@ -2940,28 +3018,29 @@ 1 - - - 265 - {{216, 0}, {95, 25}} - + + + 266 + {{50, 3}, {160, 20}} + YES - + -1539178944 133120 - - - -2038415105 + + + -2038284033 36 + 400 75 - - - is + + + field 1048576 2147483647 @@ -2969,16 +3048,16 @@ _popUpItemAction: - + YES - + OtherViews YES - + 3 @@ -2987,21 +3066,37 @@ 1 + + + 264 + {{7, 6}, {43, 14}} + + YES + + 67239488 + 272761856 + Search: + + + + + + {313, 27} - + NSView - - - 290 + + + 256 YES - + 266 {{5, 4}, {278, 19}} - + YES 879885888 @@ -3061,10 +3156,10 @@ - + -2147483379 {{129, 6}, {28, 14}} - + YES 68288064 @@ -3077,10 +3172,10 @@ - + -2147483378 {{5, 4}, {112, 19}} - + YES 343014976 @@ -3138,10 +3233,10 @@ - + -2147483381 {{170, 4}, {111, 19}} - + YES 343014976 @@ -3202,113 +3297,17 @@ {{322, 0}, {284, 27}} - + NSView {{6, 509}, {606, 27}} YES - TableFilterSplitter - - - - 289 - {{654, 10}, {32, 25}} - - YES - - 67239424 - 134217728 - - - - -2042347265 - 35 - - NSImage - button_right - - - - 400 - 75 - - - - - 289 - {{592, 10}, {32, 25}} - - YES - - 67239424 - 134217728 - - - - -2042347265 - 35 - - NSImage - button_left - - - - 400 - 75 - - - - - 289 - {{623, 10}, {32, 25}} - - YES - - 67239424 - 134217728 - - - - -934526721 - 268435491 - - NSImage - button_pagination - - - j - 400 - 75 - - - - - 265 - {{734, 507}, {160, 16}} - - YES - - 67239424 - 134479872 - ShowFilterTable_Dummy_Button - - LucidaGrande - 9 - 3614 - - - -2038284033 - 268435585 - - f - 200 - 25 - {{10, 7}, {706, 544}} + Content @@ -3630,7 +3629,7 @@ 4352 - {694, 206} + {694, 205} YES @@ -3692,7 +3691,7 @@ 0 - {{1, 17}, {694, 206}} + {{1, 17}, {694, 205}} @@ -3735,7 +3734,7 @@ - {{0, -1}, {696, 224}} + {{0, -1}, {696, 223}} 562 @@ -3749,7 +3748,7 @@ 268 - {{156, 222}, {98, 22}} + {{156, 221}, {98, 22}} YES @@ -3862,7 +3861,7 @@ 264 - {{38, 222}, {108, 22}} + {{38, 221}, {108, 22}} YES @@ -3976,7 +3975,7 @@ 268 - {{-10, 221}, {48, 25}} + {{-10, 220}, {48, 25}} YES @@ -4316,7 +4315,7 @@ 265 - {{563, 224}, {124, 17}} + {{563, 223}, {124, 17}} YES @@ -4337,7 +4336,7 @@ 265 - {{404, 224}, {151, 17}} + {{404, 223}, {151, 17}} YES @@ -4369,7 +4368,7 @@ NeXT TIFF v4.0 pasteboard type - {{32, 222}, {664, 23}} + {{32, 221}, {664, 23}} YES @@ -4384,16 +4383,16 @@ YES - {{0, 151}, {696, 245}} + {{0, 151}, {696, 244}} NSView - {696, 396} + {696, 395} - {696, 396} + {696, 395} NSView @@ -4415,7 +4414,7 @@ 2322 - {{0, -1}, {887, 14}} + {887, 13} @@ -4593,12 +4592,12 @@ - {{0, 397}, {696, 111}} + {{0, 396}, {696, 111}} NSView - {{6, 33}, {696, 508}} + {{6, 34}, {696, 507}} 2 @@ -6436,14 +6435,14 @@ - + 134217731 YES YES YES - + @@ -13751,14 +13750,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA 6302 - - - delegate - - - - 6306 - spHistoryControllerInstance @@ -16576,6 +16567,14 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA 7733 + + + delegate + + + + 7780 + @@ -20122,7 +20121,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA - @@ -20132,6 +20130,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA + @@ -20183,16 +20182,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA - - 6303 - - - YES - - - - - 858 @@ -20212,260 +20201,103 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA YES - - - - - - 5176 - - - YES - - - - - - 5175 - - - YES - - - - - - 261 - - - YES - - - - - - 5201 - - - YES - - - - - - 5178 - - - YES - - - - - - 7533 - - - YES - - - - - - 7534 - - - - - 5181 - - - - - 5202 - - - - - 3759 - - - - - 5184 - - - - - 5183 - - - - - 5182 - - - - - 5180 - - - - - 6305 - - - YES - - - - - - - - - 6304 - - - YES - - - - - - - - 156 - - - YES - - - - - - 146 - - - YES - - - - - - 3971 - - - YES - - - - - - 3972 - - - - - 3754 - - - YES - - - - - - 147 - - - YES - - - - - - 144 - - - - - 3755 - - - YES - + - + - 157 - + 5176 + YES - + - + - 154 - - + 5175 + + + YES + + + - 6371 - + 261 + YES - + - + - 6369 - + 5201 + YES - + - + - 6364 - + 5178 + YES - + - + - 3963 - + 7533 + YES - + - + - 3964 - - + 7534 + + - 6365 - - + 5181 + + - 6370 - - + 5202 + + - 6372 - - + 3759 + + + + + 5184 + + + + + 5183 + + + + + 5182 + + + + + 5180 + + 3920 @@ -23162,6 +22994,173 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA + + 7777 + + + YES + + + + + + + 7778 + + + YES + + + + + + + + 7779 + + + YES + + + + + + + + + 3971 + + + YES + + + + + + 3972 + + + + + 146 + + + YES + + + + + + 3754 + + + YES + + + + + + 147 + + + YES + + + + + + 144 + + + + + 156 + + + YES + + + + + + 3755 + + + YES + + + + + + 157 + + + YES + + + + + + 154 + + + + + 6371 + + + YES + + + + + + 6372 + + + + + 6369 + + + YES + + + + + + 6370 + + + + + 6364 + + + YES + + + + + + 6365 + + + + + 3963 + + + YES + + + + + + 3964 + + + @@ -23837,9 +23836,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA 6293.IBSegmentedControlTracker.RoundRobinState 6293.IBSegmentedControlTracker.WasGrowing 6294.IBPluginDependency - 6303.IBPluginDependency - 6304.IBPluginDependency - 6305.IBPluginDependency 6340.IBPluginDependency 6341.IBPluginDependency 6343.IBPluginDependency @@ -24477,6 +24473,9 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA 7727.IBPluginDependency 7728.IBPluginDependency 7729.IBPluginDependency + 7777.IBPluginDependency + 7778.IBPluginDependency + 7779.IBPluginDependency 858.IBPluginDependency 858.ImportedFromIB2 959.IBEditorWindowLastContentRect @@ -25405,9 +25404,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -25802,7 +25798,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{58, 273}, {943, 549}} + {{81, 307}, {943, 549}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -26276,6 +26272,9 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA com.brandonwalkin.BWToolkit com.brandonwalkin.BWToolkit com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{265, 489}, {405, 267}} com.apple.InterfaceBuilder.CocoaPlugin @@ -26313,7 +26312,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA - 7733 + 7780 @@ -26388,6 +26387,13 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA Frameworks/PSMTabBar/PSMTabBarControl.h + + NSObject + + IBProjectSource + Source/SPConnectionController.h + + NSObject diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index e22719de..a4adcf92 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -112,7 +112,7 @@ [databaseConnectionView setHidden:YES]; [connectionView setFrame:[databaseConnectionView frame]]; [databaseConnectionSuperview addSubview:connectionView]; - [connectionSplitView setPosition:[[tableDocument valueForKey:@"dbTablesTableView"] frame].size.width-6 ofDividerAtIndex:0]; + [connectionSplitView setPosition:[[tableDocument valueForKey:@"dbTablesTableView"] frame].size.width ofDividerAtIndex:0]; [connectionSplitView setDelegate:self]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(scrollViewFrameChanged:) name:NSViewFrameDidChangeNotification object:nil]; 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 -- cgit v1.2.3