From 5e5a86f513d61615d32cd7cf6ec50287e0231418 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Tue, 9 Jun 2020 16:29:57 -0700 Subject: [PATCH] Add icons for perspective control line buttons --- rtdata/images/svg/draw-horizontal.svg | 117 ++++++++++++++++++++++++++ rtdata/images/svg/draw-vertical.svg | 117 ++++++++++++++++++++++++++ rtdata/images/svg/draw.svg | 112 ++++++++++++++++++++++++ rtgui/perspective.cc | 11 ++- 4 files changed, 355 insertions(+), 2 deletions(-) create mode 100644 rtdata/images/svg/draw-horizontal.svg create mode 100644 rtdata/images/svg/draw-vertical.svg create mode 100644 rtdata/images/svg/draw.svg diff --git a/rtdata/images/svg/draw-horizontal.svg b/rtdata/images/svg/draw-horizontal.svg new file mode 100644 index 000000000..ae8fa8c44 --- /dev/null +++ b/rtdata/images/svg/draw-horizontal.svg @@ -0,0 +1,117 @@ + + + + + + + + + + image/svg+xml + + + + + Lawrence + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + + + + + diff --git a/rtdata/images/svg/draw-vertical.svg b/rtdata/images/svg/draw-vertical.svg new file mode 100644 index 000000000..4613d95c6 --- /dev/null +++ b/rtdata/images/svg/draw-vertical.svg @@ -0,0 +1,117 @@ + + + + + + + + + + image/svg+xml + + + + + Lawrence + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + + + + + diff --git a/rtdata/images/svg/draw.svg b/rtdata/images/svg/draw.svg new file mode 100644 index 000000000..308e15654 --- /dev/null +++ b/rtdata/images/svg/draw.svg @@ -0,0 +1,112 @@ + + + + + + + + + + image/svg+xml + + + + + Lawrence + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + + + + diff --git a/rtgui/perspective.cc b/rtgui/perspective.cc index 1b1672914..1d72011fa 100644 --- a/rtgui/perspective.cc +++ b/rtgui/perspective.cc @@ -40,6 +40,10 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" EvPerspRender = mapper->newEvent(TRANSFORM); lens_geom_listener = nullptr; + Gtk::Image* ipers_draw_horiz = Gtk::manage (new RTImage ("draw-horizontal.png")); + Gtk::Image* ipers_draw_vert = Gtk::manage (new RTImage ("draw-vertical.png")); + Gtk::Image* ipers_draw = new RTImage ("draw.png"); + Gtk::Image* ipersHL = Gtk::manage (new RTImage ("perspective-horizontal-left-small.png")); Gtk::Image* ipersHR = Gtk::manage (new RTImage ("perspective-horizontal-right-small.png")); Gtk::Image* ipersVL = Gtk::manage (new RTImage ("perspective-vertical-bottom-small.png")); @@ -110,22 +114,25 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" // Begin control lines interface. lines_button_h = Gtk::manage (new Gtk::ToggleButton()); + lines_button_h->set_image(*ipers_draw_horiz); lines_button_h->signal_toggled().connect(sigc::bind(sigc::mem_fun( *this, &::PerspCorrection::linesButtonPressed), lines_button_h)); lines_button_v = Gtk::manage (new Gtk::ToggleButton()); + lines_button_v->set_image(*ipers_draw_vert); lines_button_v->signal_toggled().connect(sigc::bind(sigc::mem_fun( *this, &::PerspCorrection::linesButtonPressed), lines_button_v)); lines_button_edit = Gtk::manage (new Gtk::ToggleButton()); + lines_button_edit->set_image(*ipers_draw); lines_button_edit->signal_toggled().connect(sigc::mem_fun( *this, &::PerspCorrection::linesEditButtonPressed)); lines = new ControlLineManager(); lines->callbacks = new LinesCallbacks(this, lines); - img_ctrl_lines_apply = NULL; - img_ctrl_lines_edit = NULL; + img_ctrl_lines_apply = new RTImage ("tick.png"); + img_ctrl_lines_edit = ipers_draw; Gtk::HBox* control_lines_box = Gtk::manage (new Gtk::HBox()); control_lines_box->pack_start(*lines_button_v);