Solving issue 1027: Numerical input boxes in right editing pane too narrow

This commit is contained in:
Hombre
2011-10-17 21:33:35 +02:00
parent 08ce23eec3
commit c7b5ff71fc
2 changed files with 6 additions and 1 deletions

View File

@@ -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);
} }

View File

@@ -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;