From 84fdbe2ab1489786031973997f8413cd2f137375 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 26 Jul 2009 12:40:34 +0000 Subject: - Tweak table information panel to show scrollbars if it's resized to a position that would hide content - Store collapse state of table information panel in preferences - Apply a double fix for BWSplitView/NSSplitView+BWAnchoredButtonBar not informing delegates of resizes - correctly inform original BWSplitView delegates of resizes, and allow BWAnchoredButtonBar registered delegates to recieve the original split view resize notifications. This fixes database menu resizing in synch with splitview resizing for improved/consistent look and feel. --- Frameworks/BWToolkitFramework.framework/BWAnchoredButtonBar.m | 7 +++++++ Frameworks/BWToolkitFramework.framework/BWSplitView.m | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'Frameworks') diff --git a/Frameworks/BWToolkitFramework.framework/BWAnchoredButtonBar.m b/Frameworks/BWToolkitFramework.framework/BWAnchoredButtonBar.m index 48f20cdb..0c49c84a 100644 --- a/Frameworks/BWToolkitFramework.framework/BWAnchoredButtonBar.m +++ b/Frameworks/BWToolkitFramework.framework/BWAnchoredButtonBar.m @@ -262,6 +262,13 @@ static float scaleFactor = 0.0f; #pragma mark NSSplitView Delegate Methods +// Forward resize events to the delegate if set and supported +- (void) splitViewDidResizeSubviews:(NSNotification *)aNotification +{ + if ([splitViewDelegate respondsToSelector:@selector(splitViewDidResizeSubviews:)]) + [splitViewDelegate splitViewDidResizeSubviews:aNotification]; +} + // Add the resize handle rect to the split view hot zone - (NSRect)splitView:(NSSplitView *)aSplitView additionalEffectiveRectOfDividerAtIndex:(NSInteger)dividerIndex { diff --git a/Frameworks/BWToolkitFramework.framework/BWSplitView.m b/Frameworks/BWToolkitFramework.framework/BWSplitView.m index 08164931..a3c20dbf 100644 --- a/Frameworks/BWToolkitFramework.framework/BWSplitView.m +++ b/Frameworks/BWToolkitFramework.framework/BWSplitView.m @@ -683,6 +683,12 @@ static float scaleFactor = 1.0f; } [self setNeedsDisplay:YES]; + + // Tell the original delegate to update if appropriate + if (![secondaryDelegate isKindOfClass:NSClassFromString(@"BWAnchoredButtonBar")] && + [secondaryDelegate respondsToSelector:@selector(splitViewDidResizeSubviews:)]) { + [secondaryDelegate splitViewDidResizeSubviews:aNotification]; + } } #pragma mark - Resize Subviews Delegate Method and Helper Methods -- cgit v1.2.3