Commit 8d776d68 authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

macosx: Limit min and max width of prefs split view

(cherry picked from commit 9d69f178)
Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <felix@feepk.net>
parent b4a8557a
...@@ -87,6 +87,9 @@ ...@@ -87,6 +87,9 @@
<real value="250"/> <real value="250"/>
<real value="250"/> <real value="250"/>
</holdingPriorities> </holdingPriorities>
<connections>
<outlet property="delegate" destination="-2" id="7cX-do-6Lz"/>
</connections>
</splitView> </splitView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1541"> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1541">
<rect key="frame" x="691" y="12" width="70" height="32"/> <rect key="frame" x="691" y="12" width="70" height="32"/>
......
...@@ -22,12 +22,14 @@ ...@@ -22,12 +22,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
@class VLCTreeMainItem; @class VLCTreeMainItem;
/***************************************************************************** /*****************************************************************************
* VLCPrefs interface * VLCPrefs interface
*****************************************************************************/ *****************************************************************************/
@interface VLCPrefs : NSWindowController @interface VLCPrefs : NSWindowController<NSSplitViewDelegate>
@property (readwrite, weak) IBOutlet NSTextField *titleLabel; @property (readwrite, weak) IBOutlet NSTextField *titleLabel;
@property (readwrite, weak) IBOutlet NSOutlineView *tree; @property (readwrite, weak) IBOutlet NSOutlineView *tree;
......
...@@ -277,6 +277,28 @@ ...@@ -277,6 +277,28 @@
return (item == nil) ? @"" : [item name]; 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 @end
#pragma mark - #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