Commit 7e775c71 authored by David Fuhrmann's avatar David Fuhrmann Committed by 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)
parent 43b1fd99
...@@ -2253,11 +2253,26 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -2253,11 +2253,26 @@ static VLCMainWindow *_o_sharedInstance = nil;
return proposedMax; 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 - (BOOL)splitView:(NSSplitView *)splitView canCollapseSubview:(NSView *)subview
{ {
return ([subview isEqual:o_left_split_view]); 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 -
#pragma mark Side Bar Data handling #pragma mark Side Bar Data handling
/* taken under BSD-new from the PXSourceList sample project, adapted for VLC */ /* taken under BSD-new from the PXSourceList sample project, adapted for VLC */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment