Commit 0f4b97b0 authored by David Fuhrmann's avatar David Fuhrmann

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.
parent 6f1af24d
...@@ -2458,11 +2458,26 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -2458,11 +2458,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