Commit 9d69f178 authored by David Fuhrmann's avatar David Fuhrmann

macosx: Limit min and max width of prefs split view

parent d42a6191
......@@ -87,6 +87,9 @@
<real value="250"/>
<real value="250"/>
</holdingPriorities>
<connections>
<outlet property="delegate" destination="-2" id="7cX-do-6Lz"/>
</connections>
</splitView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1541">
<rect key="frame" x="691" y="12" width="70" height="32"/>
......
......@@ -22,12 +22,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
@class VLCTreeMainItem;
/*****************************************************************************
* VLCPrefs interface
*****************************************************************************/
@interface VLCPrefs : NSWindowController
@interface VLCPrefs : NSWindowController<NSSplitViewDelegate>
@property (readwrite, weak) IBOutlet NSTextField *titleLabel;
@property (readwrite, weak) IBOutlet NSOutlineView *tree;
......
......@@ -277,6 +277,28 @@
return (item == nil) ? @"" : [item name];
}
#pragma mark -
#pragma mark split view delegate
- (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)dividerIndex
{
return 300.;
}
- (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)dividerIndex
{
return 100.;
}
- (BOOL)splitView:(NSSplitView *)splitView canCollapseSubview:(NSView *)subview
{
return NO;
}
- (BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)subview
{
return [splitView.subviews objectAtIndex:0] != subview;
}
@end
#pragma mark -
......
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