Solving issue 1027: Numerical input boxes in right editing pane too narrow
This commit is contained in:
@@ -214,6 +214,12 @@ void Adjuster::setLimits (double vmin, double vmax, double vstep, double vdefaul
|
|||||||
slider->set_range (vmin, vmax);
|
slider->set_range (vmin, vmax);
|
||||||
slider->set_value (shapeValue(vdefault));
|
slider->set_value (shapeValue(vdefault));
|
||||||
//defaultVal = shapeValue (vdefault);
|
//defaultVal = shapeValue (vdefault);
|
||||||
|
|
||||||
|
double maxAbs = fmax(fabs(vmin), fabs(vmax));
|
||||||
|
int digits2;
|
||||||
|
for (digits2=0; maxAbs/pow(double(10),digits2)>=1.0; digits2++);
|
||||||
|
spin->set_width_chars(digits+digits2+(vmin<0?1:0)+(digits>0?1:0));
|
||||||
|
|
||||||
sliderChange.block (false);
|
sliderChange.block (false);
|
||||||
spinChange.block (false);
|
spinChange.block (false);
|
||||||
}
|
}
|
||||||
|
@@ -306,7 +306,6 @@ bool MyComboBox::on_scroll_event (GdkEventScroll* event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MySpinButton::MySpinButton () {
|
MySpinButton::MySpinButton () {
|
||||||
set_size_request(50, -1);
|
|
||||||
Gtk::Border border;
|
Gtk::Border border;
|
||||||
border.bottom = 0;
|
border.bottom = 0;
|
||||||
border.top = 0;
|
border.top = 0;
|
||||||
|
Reference in New Issue
Block a user