Commit fcae63f1 authored by David Fuhrmann's avatar David Fuhrmann

macosx: advanced prefs: fix size calculation of some widgets

The right text field was not resized properly.
parent 9d69f178
...@@ -1522,7 +1522,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \ ...@@ -1522,7 +1522,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
/* build the textfield */ /* build the textfield */
ADD_TEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2, 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 setIntValue: p_item->value.i];
[o_textfield setAutoresizingMask:NSViewMaxXMargin ]; [o_textfield setAutoresizingMask:NSViewMaxXMargin ];
[o_textfield setDelegate: self]; [o_textfield setDelegate: self];
...@@ -1533,7 +1533,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \ ...@@ -1533,7 +1533,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
[self addSubview: o_textfield]; [self addSubview: o_textfield];
/* build the mintextfield */ /* 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 setIntValue: p_item->min.i];
[o_textfield_min setAutoresizingMask:NSViewMaxXMargin ]; [o_textfield_min setAutoresizingMask:NSViewMaxXMargin ];
[o_textfield_min setAlignment:NSRightTextAlignment]; [o_textfield_min setAlignment:NSRightTextAlignment];
...@@ -1541,17 +1541,19 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \ ...@@ -1541,17 +1541,19 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
/* build the maxtextfield */ /* build the maxtextfield */
ADD_LABEL(o_textfield_max, mainFrame, 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 setIntValue: p_item->max.i];
[o_textfield_max setAutoresizingMask:NSViewMinXMargin ]; [o_textfield_max setAutoresizingMask:NSViewMinXMargin ];
[self addSubview: o_textfield_max]; [self addSubview: o_textfield_max];
[o_textfield_max sizeToFit];
[o_textfield_min sizeToFit];
/* build the slider */ /* build the slider */
ADD_SLIDER(o_slider, mainFrame, [o_textfield_min frame].origin.x + ADD_SLIDER(o_slider, mainFrame, [o_textfield_min frame].origin.x +
[o_textfield_min frame].size.width + 6, -1, mainFrame.size.width - [o_textfield_min frame].size.width + 6, -1,
[o_textfield_max frame].size.width - [o_textfield_max frame].origin.x -
[o_textfield_max frame].size.width - 14 - ([o_textfield_min frame].origin.x + [o_textfield_min frame].size.width) - 14, toolTip,
[o_textfield_min frame].origin.x, toolTip,
p_item->min.i, p_item->max.i) p_item->min.i, p_item->max.i)
[o_slider setIntValue: p_item->value.i]; [o_slider setIntValue: p_item->value.i];
[o_slider setAutoresizingMask:NSViewWidthSizable ]; [o_slider setAutoresizingMask:NSViewWidthSizable ];
......
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