Fix #3207 for the curve icon's size part. Also, reintroduce separation

between the Edit button(s) on one end and the Copy/paste/load/save
buttons on the other end.
This commit is contained in:
Hombre
2016-03-13 14:15:03 +01:00
parent 2783a06448
commit 5221d30ebc
4 changed files with 96 additions and 122 deletions

View File

@@ -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) void CurveEditorSubGroup::updateEditButton(CurveEditor* curve, Gtk::ToggleButton *button, sigc::connection &connection)
{ {
if (!curve->getEditProvider() || curve->getEditID() == EUID_None) { if (!curve->getEditProvider() || curve->getEditID() == EUID_None) {

View File

@@ -119,6 +119,8 @@ protected:
ColoredBar* leftBar; ColoredBar* leftBar;
ColoredBar* bottomBar; ColoredBar* bottomBar;
void initButton (Gtk::Button &button, const Glib::ustring &iconName, Gtk::Align align, bool separatorButton, const Glib::ustring &tooltip = {});
public: public:
virtual ~CurveEditorSubGroup(); virtual ~CurveEditorSubGroup();

View File

@@ -38,7 +38,10 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
editedAdjuster = NULL; editedAdjuster = NULL;
editedAdjusterValue = 0; 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; valLinear = (int)DCT_Linear;
valUnchanged = (int)DCT_Unchanged; valUnchanged = (int)DCT_Unchanged;
@@ -56,50 +59,35 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
customCurve->setType (DCT_Spline); customCurve->setType (DCT_Spline);
Gtk::Grid* custombbox = Gtk::manage (new Gtk::Grid ()); // curvebboxpos 0=above, 1=right, 2=below, 3=left 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) { if (options.curvebboxpos == 0 || options.curvebboxpos == 2) {
setExpandAlignProperties(custombbox, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); custombbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
custombbox->set_row_homogeneous(true); setExpandAlignProperties(custombbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
} else { } else {
setExpandAlignProperties(custombbox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); custombbox->set_orientation(Gtk::ORIENTATION_VERTICAL);
custombbox->set_column_homogeneous(true); setExpandAlignProperties(custombbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
} }
editPointCustom = Gtk::manage (new Gtk::ToggleButton ()); editPointCustom = Gtk::manage (new Gtk::ToggleButton ());
editPointCustom->add (*Gtk::manage (new RTImage ("gtk-edit.png"))); initButton(*editPointCustom, Glib::ustring("gtk-edit.png"), Gtk::ALIGN_START, false, Glib::ustring(M("CURVEEDITOR_EDITPOINT_HINT")));
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);
editCustom = Gtk::manage (new Gtk::ToggleButton()); editCustom = Gtk::manage (new Gtk::ToggleButton());
editCustom->add (*Gtk::manage (new RTImage ("editmodehand.png"))); initButton(*editCustom, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP")));
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);
editCustom->hide(); editCustom->hide();
copyCustom = Gtk::manage (new Gtk::Button ()); copyCustom = Gtk::manage (new Gtk::Button ());
copyCustom->add (*Gtk::manage (new RTImage ("edit-copy.png"))); initButton(*copyCustom, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true);
copyCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(copyCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
pasteCustom = Gtk::manage (new Gtk::Button ()); pasteCustom = Gtk::manage (new Gtk::Button ());
pasteCustom->add (*Gtk::manage (new RTImage ("edit-paste.png"))); initButton(*pasteCustom, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false);
pasteCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(pasteCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
loadCustom = Gtk::manage (new Gtk::Button ()); loadCustom = Gtk::manage (new Gtk::Button ());
loadCustom->add (*Gtk::manage (new RTImage ("gtk-open.png"))); initButton(*loadCustom, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false);
loadCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(loadCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
saveCustom = Gtk::manage (new Gtk::Button ()); saveCustom = Gtk::manage (new Gtk::Button ());
saveCustom->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); initButton(*saveCustom, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false);
saveCustom->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(saveCustom, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
custombbox->attach_next_to(*saveCustom, side, 1, 1); custombbox->attach_next_to(*editPointCustom, sideStart, 1, 1);
custombbox->attach_next_to(*loadCustom, side, 1, 1); custombbox->attach_next_to(*editCustom, sideStart, 1, 1);
custombbox->attach_next_to(*pasteCustom, side, 1, 1); custombbox->attach_next_to(*copyCustom, sideEnd, 1, 1);
custombbox->attach_next_to(*copyCustom, side, 1, 1); custombbox->attach_next_to(*pasteCustom, sideEnd, 1, 1);
custombbox->attach_next_to(*editPointCustom, side, 1, 1); custombbox->attach_next_to(*loadCustom, sideEnd, 1, 1);
custombbox->attach_next_to(*editCustom, side, 1, 1); custombbox->attach_next_to(*saveCustom, sideEnd, 1, 1);
customCoordAdjuster = Gtk::manage (new CoordinateAdjuster(customCurve, this)); customCoordAdjuster = Gtk::manage (new CoordinateAdjuster(customCurve, this));
@@ -148,50 +136,35 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
NURBSCurve->setType (DCT_NURBS); NURBSCurve->setType (DCT_NURBS);
Gtk::Grid* NURBSbbox = Gtk::manage (new Gtk::Grid ()); Gtk::Grid* NURBSbbox = Gtk::manage (new Gtk::Grid ());
NURBSbbox->set_orientation(Gtk::ORIENTATION_VERTICAL);
if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { if (options.curvebboxpos == 0 || options.curvebboxpos == 2) {
setExpandAlignProperties(NURBSbbox, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); NURBSbbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
NURBSbbox->set_row_homogeneous(true); setExpandAlignProperties(NURBSbbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
} else { } else {
setExpandAlignProperties(NURBSbbox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); NURBSbbox->set_orientation(Gtk::ORIENTATION_VERTICAL);
NURBSbbox->set_column_homogeneous(true); setExpandAlignProperties(NURBSbbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
} }
editPointNURBS = Gtk::manage (new Gtk::ToggleButton ()); editPointNURBS = Gtk::manage (new Gtk::ToggleButton ());
editPointNURBS->add (*Gtk::manage (new RTImage ("gtk-edit.png"))); initButton(*editPointNURBS, Glib::ustring("gtk-edit.png"), Gtk::ALIGN_START, false, Glib::ustring(M("CURVEEDITOR_EDITPOINT_HINT")));
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);
editNURBS = Gtk::manage (new Gtk::ToggleButton()); editNURBS = Gtk::manage (new Gtk::ToggleButton());
editNURBS->add (*Gtk::manage (new RTImage ("editmodehand.png"))); initButton(*editNURBS, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP")));
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);
editNURBS->hide(); editNURBS->hide();
copyNURBS = Gtk::manage (new Gtk::Button ()); copyNURBS = Gtk::manage (new Gtk::Button ());
copyNURBS->add (*Gtk::manage (new RTImage ("edit-copy.png"))); initButton(*copyNURBS, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true);
copyNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(copyNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
pasteNURBS = Gtk::manage (new Gtk::Button ()); pasteNURBS = Gtk::manage (new Gtk::Button ());
pasteNURBS->add (*Gtk::manage (new RTImage ("edit-paste.png"))); initButton(*pasteNURBS, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false);
pasteNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(pasteNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
loadNURBS = Gtk::manage (new Gtk::Button ()); loadNURBS = Gtk::manage (new Gtk::Button ());
loadNURBS->add (*Gtk::manage (new RTImage ("gtk-open.png"))); initButton(*loadNURBS, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false);
loadNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(loadNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
saveNURBS = Gtk::manage (new Gtk::Button ()); saveNURBS = Gtk::manage (new Gtk::Button ());
saveNURBS->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); initButton(*saveNURBS, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false);
saveNURBS->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(saveNURBS, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
NURBSbbox->attach_next_to(*saveNURBS, side, 1, 1); NURBSbbox->attach_next_to(*editPointNURBS, sideStart, 1, 1);
NURBSbbox->attach_next_to(*loadNURBS, side, 1, 1); NURBSbbox->attach_next_to(*editNURBS, sideStart, 1, 1);
NURBSbbox->attach_next_to(*pasteNURBS, side, 1, 1); NURBSbbox->attach_next_to(*copyNURBS, sideEnd, 1, 1);
NURBSbbox->attach_next_to(*copyNURBS, side, 1, 1); NURBSbbox->attach_next_to(*pasteNURBS, sideEnd, 1, 1);
NURBSbbox->attach_next_to(*editPointNURBS, side, 1, 1); NURBSbbox->attach_next_to(*loadNURBS, sideEnd, 1, 1);
NURBSbbox->attach_next_to(*editNURBS, side, 1, 1); NURBSbbox->attach_next_to(*saveNURBS, sideEnd, 1, 1);
NURBSCoordAdjuster = Gtk::manage (new CoordinateAdjuster(NURBSCurve, this)); NURBSCoordAdjuster = Gtk::manage (new CoordinateAdjuster(NURBSCurve, this));
@@ -240,47 +213,35 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt,
paramCurve->setType (DCT_Parametric); paramCurve->setType (DCT_Parametric);
Gtk::Grid* parambbox = Gtk::manage (new Gtk::Grid ()); Gtk::Grid* parambbox = Gtk::manage (new Gtk::Grid ());
parambbox->set_orientation(Gtk::ORIENTATION_VERTICAL);
if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { if (options.curvebboxpos == 0 || options.curvebboxpos == 2) {
setExpandAlignProperties(parambbox, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); parambbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
parambbox->set_row_homogeneous(true); setExpandAlignProperties(parambbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
} else { } else {
setExpandAlignProperties(parambbox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); parambbox->set_orientation(Gtk::ORIENTATION_VERTICAL);
parambbox->set_column_homogeneous(true); setExpandAlignProperties(parambbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
} }
shcSelector = Gtk::manage (new SHCSelector ()); shcSelector = Gtk::manage (new SHCSelector ());
shcSelector->set_name("CurveSHCSelector"); // To handle the 4px gap between the SHCSelector and the curve through CSS shcSelector->set_name("CurveSHCSelector"); // To handle the 4px gap between the SHCSelector and the curve through CSS
editParam = Gtk::manage (new Gtk::ToggleButton()); editParam = Gtk::manage (new Gtk::ToggleButton());
editParam->add (*Gtk::manage (new RTImage ("editmodehand.png"))); initButton(*editParam, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP")));
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);
editParam->hide(); editParam->hide();
copyParam = Gtk::manage (new Gtk::Button ()); copyParam = Gtk::manage (new Gtk::Button ());
copyParam->add (*Gtk::manage (new RTImage ("edit-copy.png"))); initButton(*copyParam, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true);
copyParam->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(copyParam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
pasteParam = Gtk::manage (new Gtk::Button ()); pasteParam = Gtk::manage (new Gtk::Button ());
pasteParam->add (*Gtk::manage (new RTImage ("edit-paste.png"))); initButton(*pasteParam, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false);
pasteParam->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(pasteParam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
loadParam = Gtk::manage (new Gtk::Button ()); loadParam = Gtk::manage (new Gtk::Button ());
loadParam->add (*Gtk::manage (new RTImage ("gtk-open.png"))); initButton(*loadParam, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false);
loadParam->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(loadParam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
saveParam = Gtk::manage (new Gtk::Button ()); saveParam = Gtk::manage (new Gtk::Button ());
saveParam->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); initButton(*saveParam, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false);
saveParam->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(saveParam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
parambbox->attach_next_to(*saveParam, side, 1, 1); parambbox->attach_next_to(*editParam, sideStart, 1, 1);
parambbox->attach_next_to(*loadParam, side, 1, 1); parambbox->attach_next_to(*copyParam, sideEnd, 1, 1);
parambbox->attach_next_to(*pasteParam, side, 1, 1); parambbox->attach_next_to(*pasteParam, sideEnd, 1, 1);
parambbox->attach_next_to(*copyParam, side, 1, 1); parambbox->attach_next_to(*loadParam, sideEnd, 1, 1);
parambbox->attach_next_to(*editParam, side, 1, 1); parambbox->attach_next_to(*saveParam, sideEnd, 1, 1);
saveParam->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::savePressed) ); saveParam->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::savePressed) );
loadParam->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::loadPressed) ); loadParam->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::loadPressed) );

View File

@@ -40,7 +40,8 @@ FlatCurveEditorSubGroup::FlatCurveEditorSubGroup (CurveEditorGroup* prt, Glib::u
valUnchanged = (int)FCT_Unchanged; valUnchanged = (int)FCT_Unchanged;
parent = prt; 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 // ControlPoints curve
CPointsCurveGrid = new Gtk::Grid (); CPointsCurveGrid = new Gtk::Grid ();
@@ -52,50 +53,34 @@ FlatCurveEditorSubGroup::FlatCurveEditorSubGroup (CurveEditorGroup* prt, Glib::u
CPointsCurve->setType (FCT_MinMaxCPoints); CPointsCurve->setType (FCT_MinMaxCPoints);
Gtk::Grid* CPointsbbox = Gtk::manage (new Gtk::Grid ()); // curvebboxpos 0=above, 1=right, 2=below, 3=left 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) { if (options.curvebboxpos == 0 || options.curvebboxpos == 2) {
setExpandAlignProperties(CPointsbbox, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); CPointsbbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
CPointsbbox->set_row_homogeneous(true); setExpandAlignProperties(CPointsbbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
} else { } else {
setExpandAlignProperties(CPointsbbox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); CPointsbbox->set_orientation(Gtk::ORIENTATION_VERTICAL);
CPointsbbox->set_column_homogeneous(true); setExpandAlignProperties(CPointsbbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
} }
editCPoints = Gtk::manage (new Gtk::ToggleButton()); editCPoints = Gtk::manage (new Gtk::ToggleButton());
editCPoints->add (*Gtk::manage (new RTImage ("editmodehand.png"))); initButton(*editCPoints, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP")));
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();
editPointCPoints = Gtk::manage (new Gtk::ToggleButton ()); editPointCPoints = Gtk::manage (new Gtk::ToggleButton ());
editPointCPoints->add (*Gtk::manage (new RTImage ("gtk-edit.png"))); initButton(*editPointCPoints, Glib::ustring("gtk-edit.png"), Gtk::ALIGN_START, false, Glib::ustring(M("CURVEEDITOR_EDITPOINT_HINT")));
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);
copyCPoints = Gtk::manage (new Gtk::Button ()); copyCPoints = Gtk::manage (new Gtk::Button ());
copyCPoints->add (*Gtk::manage (new RTImage ("edit-copy.png"))); initButton(*copyCPoints, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true);
copyCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(copyCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
pasteCPoints = Gtk::manage (new Gtk::Button ()); pasteCPoints = Gtk::manage (new Gtk::Button ());
pasteCPoints->add (*Gtk::manage (new RTImage ("edit-paste.png"))); initButton(*pasteCPoints, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false);
pasteCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(pasteCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
loadCPoints = Gtk::manage (new Gtk::Button ()); loadCPoints = Gtk::manage (new Gtk::Button ());
loadCPoints->add (*Gtk::manage (new RTImage ("gtk-open.png"))); initButton(*loadCPoints, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false);
loadCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(loadCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
saveCPoints = Gtk::manage (new Gtk::Button ()); saveCPoints = Gtk::manage (new Gtk::Button ());
saveCPoints->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); initButton(*saveCPoints, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false);
saveCPoints->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT);
setExpandAlignProperties(saveCPoints, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
CPointsbbox->attach_next_to(*saveCPoints, side, 1, 1); CPointsbbox->attach_next_to(*editPointCPoints, sideStart, 1, 1);
CPointsbbox->attach_next_to(*loadCPoints, side, 1, 1); CPointsbbox->attach_next_to(*editCPoints, sideStart, 1, 1);
CPointsbbox->attach_next_to(*pasteCPoints, side, 1, 1); CPointsbbox->attach_next_to(*copyCPoints, sideEnd, 1, 1);
CPointsbbox->attach_next_to(*copyCPoints, side, 1, 1); CPointsbbox->attach_next_to(*pasteCPoints, sideEnd, 1, 1);
CPointsbbox->attach_next_to(*editPointCPoints, side, 1, 1); CPointsbbox->attach_next_to(*loadCPoints, sideEnd, 1, 1);
CPointsbbox->attach_next_to(*editCPoints, side, 1, 1); CPointsbbox->attach_next_to(*saveCPoints, sideEnd, 1, 1);
{ {
std::vector<Axis> axis; std::vector<Axis> axis;