diff --git a/rtgui/coordinateadjuster.cc b/rtgui/coordinateadjuster.cc index 3a06409bf..4d08daeae 100644 --- a/rtgui/coordinateadjuster.cc +++ b/rtgui/coordinateadjuster.cc @@ -122,8 +122,6 @@ void CoordinateAdjuster::createWidgets(const std::vector &axis) axisAdjusters.resize(axis.size()); - set_spacing(3); - AxisAdjuster *currAdjuster = NULL; for (unsigned int i = 0; i < count; ++i) { @@ -133,8 +131,17 @@ void CoordinateAdjuster::createWidgets(const std::vector &axis) currAdjuster->rangeLowerBound = currAxis->rangeLowerBound; currAdjuster->rangeUpperBound = currAxis->rangeUpperBound; - pack_start(*(currAdjuster->label), Gtk::PACK_SHRINK, 0); - pack_start(*(currAdjuster->spinButton), Gtk::PACK_SHRINK, 0); + Gtk::Grid *box = Gtk::manage (new Gtk::Grid()); + box->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + box->set_column_spacing(3); + + setExpandAlignProperties(currAdjuster->label, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties(currAdjuster->spinButton, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + + box->attach_next_to(*(currAdjuster->spinButton), Gtk::POS_LEFT, 1, 1); + box->attach_next_to(*(currAdjuster->label), Gtk::POS_LEFT, 1, 1); + + add(*box); } } diff --git a/rtgui/coordinateadjuster.h b/rtgui/coordinateadjuster.h index 8f00f8ae7..7edba5392 100644 --- a/rtgui/coordinateadjuster.h +++ b/rtgui/coordinateadjuster.h @@ -70,7 +70,7 @@ public: * * The position of the Axis in the vector will be used in the communication between the Adjuster and the Provider to identify the Axis */ -class CoordinateAdjuster : public Gtk::HBox +class CoordinateAdjuster : public Gtk::FlowBox { public: