[vlc-commits] macosx: advanced prefs: fix size calculation of some widgets
David Fuhrmann
git at videolan.org
Sat Feb 3 15:08:34 CET 2018
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Fri Feb 2 18:24:27 2018 +0100| [fcae63f1113612340771fb48e3292c70acb29430] | committer: David Fuhrmann
macosx: advanced prefs: fix size calculation of some widgets
The right text field was not resized properly.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fcae63f1113612340771fb48e3292c70acb29430
---
modules/gui/macosx/prefs_widgets.m | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index dd6fe3ffe8..224f6da26d 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -1522,7 +1522,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
/* build the textfield */
ADD_TEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2,
- 28, 49, toolTip, @"")
+ 28, 70, toolTip, @"")
[o_textfield setIntValue: p_item->value.i];
[o_textfield setAutoresizingMask:NSViewMaxXMargin ];
[o_textfield setDelegate: self];
@@ -1533,7 +1533,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
[self addSubview: o_textfield];
/* build the mintextfield */
- ADD_LABEL(o_textfield_min, mainFrame, 12, -30, @"-8888", @"")
+ ADD_LABEL(o_textfield_min, mainFrame, 12, -30, @"-88888", @"")
[o_textfield_min setIntValue: p_item->min.i];
[o_textfield_min setAutoresizingMask:NSViewMaxXMargin ];
[o_textfield_min setAlignment:NSRightTextAlignment];
@@ -1541,17 +1541,19 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
/* build the maxtextfield */
ADD_LABEL(o_textfield_max, mainFrame,
- mainFrame.size.width - 31, -30, @"8888", @"")
+ mainFrame.size.width - 50, -30, @"88888", @"")
[o_textfield_max setIntValue: p_item->max.i];
[o_textfield_max setAutoresizingMask:NSViewMinXMargin ];
[self addSubview: o_textfield_max];
+ [o_textfield_max sizeToFit];
+ [o_textfield_min sizeToFit];
+
/* build the slider */
ADD_SLIDER(o_slider, mainFrame, [o_textfield_min frame].origin.x +
- [o_textfield_min frame].size.width + 6, -1, mainFrame.size.width -
- [o_textfield_max frame].size.width -
- [o_textfield_max frame].size.width - 14 -
- [o_textfield_min frame].origin.x, toolTip,
+ [o_textfield_min frame].size.width + 6, -1,
+ [o_textfield_max frame].origin.x -
+ ([o_textfield_min frame].origin.x + [o_textfield_min frame].size.width) - 14, toolTip,
p_item->min.i, p_item->max.i)
[o_slider setIntValue: p_item->value.i];
[o_slider setAutoresizingMask:NSViewWidthSizable ];
More information about the vlc-commits
mailing list