vlc/vlc-2.0 | branch: master | David Fuhrmann <[email protected]> | Tue Jun 26 22:50:05 2012 +0200| [7e775c71d8a7f627cec41cc023ba3411a63cd2cb] | committer: Felix Paul Kühne
macosx: improve resize behaviour of splitview Now, the sidebar will not will not resized while resizing the window. Also, this commit sets a min width for the the sidebar. But it can still be hidden, just drag the slider to the left. (cherry picked from commit 0f4b97b08a1805c6c72f94dbfcbebb61bf956bb8) > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=7e775c71d8a7f627cec41cc023ba3411a63cd2cb --- modules/gui/macosx/MainWindow.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m index 0c3a679..3473ef0 100644 --- a/modules/gui/macosx/MainWindow.m +++ b/modules/gui/macosx/MainWindow.m @@ -2253,11 +2253,26 @@ static VLCMainWindow *_o_sharedInstance = nil; return proposedMax; } +- (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)dividerIndex +{ + if (dividerIndex == 0) + return 100.; + else + return proposedMin; +} + - (BOOL)splitView:(NSSplitView *)splitView canCollapseSubview:(NSView *)subview { return ([subview isEqual:o_left_split_view]); } +- (BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)subview +{ + if ([subview isEqual:o_left_split_view]) + return NO; + return YES; +} + #pragma mark - #pragma mark Side Bar Data handling /* taken under BSD-new from the PXSourceList sample project, adapted for VLC */ _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
