diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index 4726074de..721e9496a 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -397,6 +397,32 @@ CurveEditorSubGroup::~CurveEditorSubGroup() } } +void CurveEditorSubGroup::initButton (Gtk::Button &button, const Glib::ustring &iconName, Gtk::Align align, bool separatorButton, const Glib::ustring &tooltip) +{ + bool hExpand, vExpand; + if (separatorButton) { + hExpand = vExpand = true; + } else { + vExpand = options.curvebboxpos == 0 || options.curvebboxpos == 2; + hExpand = !vExpand; + } + Gtk::Align hAlign, vAlign; + if (align == Gtk::ALIGN_START) { + hAlign = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::ALIGN_START : Gtk::ALIGN_FILL; + vAlign = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::ALIGN_FILL : Gtk::ALIGN_START; + } else { + hAlign = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::ALIGN_END : Gtk::ALIGN_FILL; + vAlign = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::ALIGN_FILL : Gtk::ALIGN_END; + } + + button.add (*Gtk::manage (new RTImage (iconName))); + button.get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); + if (!tooltip.empty()) { + button.set_tooltip_text(M(tooltip)); + } + setExpandAlignProperties(&button, hExpand, vExpand, hAlign, vAlign); +} + void CurveEditorSubGroup::updateEditButton(CurveEditor* curve, Gtk::ToggleButton *button, sigc::connection &connection) { if (!curve->getEditProvider() || curve->getEditID() == EUID_None) { diff --git a/rtgui/curveeditorgroup.h b/rtgui/curveeditorgroup.h index abbe608d9..d659dcf2e 100644 --- a/rtgui/curveeditorgroup.h +++ b/rtgui/curveeditorgroup.h @@ -119,6 +119,8 @@ protected: ColoredBar* leftBar; ColoredBar* bottomBar; + void initButton (Gtk::Button &button, const Glib::ustring &iconName, Gtk::Align align, bool separatorButton, const Glib::ustring &tooltip = {}); + public: virtual ~CurveEditorSubGroup(); diff --git a/rtgui/diagonalcurveeditorsubgroup.cc b/rtgui/diagonalcurveeditorsubgroup.cc index 4cd47ec10..ff4e2e5ab 100644 --- a/rtgui/diagonalcurveeditorsubgroup.cc +++ b/rtgui/diagonalcurveeditorsubgroup.cc @@ -38,7 +38,10 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, editedAdjuster = NULL; editedAdjusterValue = 0; - Gtk::PositionType side = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_LEFT : Gtk::POS_TOP; + Gtk::PositionType sideStart = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_LEFT : Gtk::POS_TOP; + Gtk::PositionType sideEnd = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_RIGHT : Gtk::POS_BOTTOM; + bool vExpand = options.curvebboxpos == 0 || options.curvebboxpos == 2; + bool hExpand = !vExpand; valLinear = (int)DCT_Linear; valUnchanged = (int)DCT_Unchanged; @@ -56,50 +59,35 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, customCurve->setType (DCT_Spline); Gtk::Grid* custombbox = Gtk::manage (new Gtk::Grid ()); // curvebboxpos 0=above, 1=right, 2=below, 3=left - custombbox->set_orientation(Gtk::ORIENTATION_VERTICAL); if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { - setExpandAlignProperties(custombbox, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - custombbox->set_row_homogeneous(true); + custombbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + setExpandAlignProperties(custombbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); } else { - setExpandAlignProperties(custombbox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); - custombbox->set_column_homogeneous(true); + custombbox->set_orientation(Gtk::ORIENTATION_VERTICAL); + setExpandAlignProperties(custombbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); } editPointCustom = Gtk::manage (new Gtk::ToggleButton ()); - editPointCustom->add (*Gtk::manage (new RTImage ("gtk-edit.png"))); - editPointCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - editPointCustom->set_tooltip_text(M("CURVEEDITOR_EDITPOINT_HINT")); - setExpandAlignProperties(editPointCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + initButton(*editPointCustom, Glib::ustring("gtk-edit.png"), Gtk::ALIGN_START, false, Glib::ustring(M("CURVEEDITOR_EDITPOINT_HINT"))); editCustom = Gtk::manage (new Gtk::ToggleButton()); - editCustom->add (*Gtk::manage (new RTImage ("editmodehand.png"))); - editCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - editCustom->set_tooltip_text(M("EDIT_PIPETTE_TOOLTIP")); - setExpandAlignProperties(editCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + initButton(*editCustom, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP"))); editCustom->hide(); copyCustom = Gtk::manage (new Gtk::Button ()); - copyCustom->add (*Gtk::manage (new RTImage ("edit-copy.png"))); - copyCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(copyCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*copyCustom, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true); pasteCustom = Gtk::manage (new Gtk::Button ()); - pasteCustom->add (*Gtk::manage (new RTImage ("edit-paste.png"))); - pasteCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(pasteCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*pasteCustom, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false); loadCustom = Gtk::manage (new Gtk::Button ()); - loadCustom->add (*Gtk::manage (new RTImage ("gtk-open.png"))); - loadCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(loadCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*loadCustom, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false); saveCustom = Gtk::manage (new Gtk::Button ()); - saveCustom->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); - saveCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(saveCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*saveCustom, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false); - custombbox->attach_next_to(*saveCustom, side, 1, 1); - custombbox->attach_next_to(*loadCustom, side, 1, 1); - custombbox->attach_next_to(*pasteCustom, side, 1, 1); - custombbox->attach_next_to(*copyCustom, side, 1, 1); - custombbox->attach_next_to(*editPointCustom, side, 1, 1); - custombbox->attach_next_to(*editCustom, side, 1, 1); + custombbox->attach_next_to(*editPointCustom, sideStart, 1, 1); + custombbox->attach_next_to(*editCustom, sideStart, 1, 1); + custombbox->attach_next_to(*copyCustom, sideEnd, 1, 1); + custombbox->attach_next_to(*pasteCustom, sideEnd, 1, 1); + custombbox->attach_next_to(*loadCustom, sideEnd, 1, 1); + custombbox->attach_next_to(*saveCustom, sideEnd, 1, 1); customCoordAdjuster = Gtk::manage (new CoordinateAdjuster(customCurve, this)); @@ -148,50 +136,35 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, NURBSCurve->setType (DCT_NURBS); Gtk::Grid* NURBSbbox = Gtk::manage (new Gtk::Grid ()); - NURBSbbox->set_orientation(Gtk::ORIENTATION_VERTICAL); if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { - setExpandAlignProperties(NURBSbbox, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - NURBSbbox->set_row_homogeneous(true); + NURBSbbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + setExpandAlignProperties(NURBSbbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); } else { - setExpandAlignProperties(NURBSbbox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); - NURBSbbox->set_column_homogeneous(true); + NURBSbbox->set_orientation(Gtk::ORIENTATION_VERTICAL); + setExpandAlignProperties(NURBSbbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); } editPointNURBS = Gtk::manage (new Gtk::ToggleButton ()); - editPointNURBS->add (*Gtk::manage (new RTImage ("gtk-edit.png"))); - editPointNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - editPointNURBS->set_tooltip_text(M("CURVEEDITOR_EDITPOINT_HINT")); - setExpandAlignProperties(editPointNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + initButton(*editPointNURBS, Glib::ustring("gtk-edit.png"), Gtk::ALIGN_START, false, Glib::ustring(M("CURVEEDITOR_EDITPOINT_HINT"))); editNURBS = Gtk::manage (new Gtk::ToggleButton()); - editNURBS->add (*Gtk::manage (new RTImage ("editmodehand.png"))); - editNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - editNURBS->set_tooltip_text(M("EDIT_PIPETTE_TOOLTIP")); - setExpandAlignProperties(editNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + initButton(*editNURBS, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP"))); editNURBS->hide(); copyNURBS = Gtk::manage (new Gtk::Button ()); - copyNURBS->add (*Gtk::manage (new RTImage ("edit-copy.png"))); - copyNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(copyNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*copyNURBS, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true); pasteNURBS = Gtk::manage (new Gtk::Button ()); - pasteNURBS->add (*Gtk::manage (new RTImage ("edit-paste.png"))); - pasteNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(pasteNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*pasteNURBS, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false); loadNURBS = Gtk::manage (new Gtk::Button ()); - loadNURBS->add (*Gtk::manage (new RTImage ("gtk-open.png"))); - loadNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(loadNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*loadNURBS, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false); saveNURBS = Gtk::manage (new Gtk::Button ()); - saveNURBS->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); - saveNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(saveNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*saveNURBS, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false); - NURBSbbox->attach_next_to(*saveNURBS, side, 1, 1); - NURBSbbox->attach_next_to(*loadNURBS, side, 1, 1); - NURBSbbox->attach_next_to(*pasteNURBS, side, 1, 1); - NURBSbbox->attach_next_to(*copyNURBS, side, 1, 1); - NURBSbbox->attach_next_to(*editPointNURBS, side, 1, 1); - NURBSbbox->attach_next_to(*editNURBS, side, 1, 1); + NURBSbbox->attach_next_to(*editPointNURBS, sideStart, 1, 1); + NURBSbbox->attach_next_to(*editNURBS, sideStart, 1, 1); + NURBSbbox->attach_next_to(*copyNURBS, sideEnd, 1, 1); + NURBSbbox->attach_next_to(*pasteNURBS, sideEnd, 1, 1); + NURBSbbox->attach_next_to(*loadNURBS, sideEnd, 1, 1); + NURBSbbox->attach_next_to(*saveNURBS, sideEnd, 1, 1); NURBSCoordAdjuster = Gtk::manage (new CoordinateAdjuster(NURBSCurve, this)); @@ -240,47 +213,35 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, paramCurve->setType (DCT_Parametric); Gtk::Grid* parambbox = Gtk::manage (new Gtk::Grid ()); - parambbox->set_orientation(Gtk::ORIENTATION_VERTICAL); if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { - setExpandAlignProperties(parambbox, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - parambbox->set_row_homogeneous(true); + parambbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + setExpandAlignProperties(parambbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); } else { - setExpandAlignProperties(parambbox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); - parambbox->set_column_homogeneous(true); + parambbox->set_orientation(Gtk::ORIENTATION_VERTICAL); + setExpandAlignProperties(parambbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); } shcSelector = Gtk::manage (new SHCSelector ()); shcSelector->set_name("CurveSHCSelector"); // To handle the 4px gap between the SHCSelector and the curve through CSS editParam = Gtk::manage (new Gtk::ToggleButton()); - editParam->add (*Gtk::manage (new RTImage ("editmodehand.png"))); - editParam->set_tooltip_text(M("EDIT_PIPETTE_TOOLTIP")); - editParam->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(editParam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + initButton(*editParam, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP"))); editParam->hide(); copyParam = Gtk::manage (new Gtk::Button ()); - copyParam->add (*Gtk::manage (new RTImage ("edit-copy.png"))); - copyParam->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(copyParam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*copyParam, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true); pasteParam = Gtk::manage (new Gtk::Button ()); - pasteParam->add (*Gtk::manage (new RTImage ("edit-paste.png"))); - pasteParam->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(pasteParam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*pasteParam, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false); loadParam = Gtk::manage (new Gtk::Button ()); - loadParam->add (*Gtk::manage (new RTImage ("gtk-open.png"))); - loadParam->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(loadParam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*loadParam, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false); saveParam = Gtk::manage (new Gtk::Button ()); - saveParam->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); - saveParam->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(saveParam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*saveParam, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false); - parambbox->attach_next_to(*saveParam, side, 1, 1); - parambbox->attach_next_to(*loadParam, side, 1, 1); - parambbox->attach_next_to(*pasteParam, side, 1, 1); - parambbox->attach_next_to(*copyParam, side, 1, 1); - parambbox->attach_next_to(*editParam, side, 1, 1); + parambbox->attach_next_to(*editParam, sideStart, 1, 1); + parambbox->attach_next_to(*copyParam, sideEnd, 1, 1); + parambbox->attach_next_to(*pasteParam, sideEnd, 1, 1); + parambbox->attach_next_to(*loadParam, sideEnd, 1, 1); + parambbox->attach_next_to(*saveParam, sideEnd, 1, 1); saveParam->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::savePressed) ); loadParam->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::loadPressed) ); diff --git a/rtgui/flatcurveeditorsubgroup.cc b/rtgui/flatcurveeditorsubgroup.cc index 48ebbcec1..4c8388d36 100644 --- a/rtgui/flatcurveeditorsubgroup.cc +++ b/rtgui/flatcurveeditorsubgroup.cc @@ -40,7 +40,8 @@ FlatCurveEditorSubGroup::FlatCurveEditorSubGroup (CurveEditorGroup* prt, Glib::u valUnchanged = (int)FCT_Unchanged; parent = prt; - Gtk::PositionType side = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_LEFT : Gtk::POS_TOP; + Gtk::PositionType sideStart = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_LEFT : Gtk::POS_TOP; + Gtk::PositionType sideEnd = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_RIGHT : Gtk::POS_BOTTOM; // ControlPoints curve CPointsCurveGrid = new Gtk::Grid (); @@ -52,50 +53,34 @@ FlatCurveEditorSubGroup::FlatCurveEditorSubGroup (CurveEditorGroup* prt, Glib::u CPointsCurve->setType (FCT_MinMaxCPoints); Gtk::Grid* CPointsbbox = Gtk::manage (new Gtk::Grid ()); // curvebboxpos 0=above, 1=right, 2=below, 3=left - CPointsbbox->set_orientation(Gtk::ORIENTATION_VERTICAL); if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { - setExpandAlignProperties(CPointsbbox, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - CPointsbbox->set_row_homogeneous(true); + CPointsbbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + setExpandAlignProperties(CPointsbbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); } else { - setExpandAlignProperties(CPointsbbox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); - CPointsbbox->set_column_homogeneous(true); + CPointsbbox->set_orientation(Gtk::ORIENTATION_VERTICAL); + setExpandAlignProperties(CPointsbbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); } editCPoints = Gtk::manage (new Gtk::ToggleButton()); - editCPoints->add (*Gtk::manage (new RTImage ("editmodehand.png"))); - editCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(editCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - editCPoints->set_tooltip_text(M("EDIT_PIPETTE_TOOLTIP")); - editCPoints->hide(); + initButton(*editCPoints, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP"))); editPointCPoints = Gtk::manage (new Gtk::ToggleButton ()); - editPointCPoints->add (*Gtk::manage (new RTImage ("gtk-edit.png"))); - editPointCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - editPointCPoints->set_tooltip_text(M("CURVEEDITOR_EDITPOINT_HINT")); - setExpandAlignProperties(editPointCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + initButton(*editPointCPoints, Glib::ustring("gtk-edit.png"), Gtk::ALIGN_START, false, Glib::ustring(M("CURVEEDITOR_EDITPOINT_HINT"))); copyCPoints = Gtk::manage (new Gtk::Button ()); - copyCPoints->add (*Gtk::manage (new RTImage ("edit-copy.png"))); - copyCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(copyCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*copyCPoints, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true); pasteCPoints = Gtk::manage (new Gtk::Button ()); - pasteCPoints->add (*Gtk::manage (new RTImage ("edit-paste.png"))); - pasteCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(pasteCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*pasteCPoints, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false); loadCPoints = Gtk::manage (new Gtk::Button ()); - loadCPoints->add (*Gtk::manage (new RTImage ("gtk-open.png"))); - loadCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(loadCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*loadCPoints, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false); saveCPoints = Gtk::manage (new Gtk::Button ()); - saveCPoints->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); - saveCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); - setExpandAlignProperties(saveCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END); + initButton(*saveCPoints, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false); - CPointsbbox->attach_next_to(*saveCPoints, side, 1, 1); - CPointsbbox->attach_next_to(*loadCPoints, side, 1, 1); - CPointsbbox->attach_next_to(*pasteCPoints, side, 1, 1); - CPointsbbox->attach_next_to(*copyCPoints, side, 1, 1); - CPointsbbox->attach_next_to(*editPointCPoints, side, 1, 1); - CPointsbbox->attach_next_to(*editCPoints, side, 1, 1); + CPointsbbox->attach_next_to(*editPointCPoints, sideStart, 1, 1); + CPointsbbox->attach_next_to(*editCPoints, sideStart, 1, 1); + CPointsbbox->attach_next_to(*copyCPoints, sideEnd, 1, 1); + CPointsbbox->attach_next_to(*pasteCPoints, sideEnd, 1, 1); + CPointsbbox->attach_next_to(*loadCPoints, sideEnd, 1, 1); + CPointsbbox->attach_next_to(*saveCPoints, sideEnd, 1, 1); { std::vector axis;