From 885308c2c8215430551ae1dab91a8026c9a9fb2f Mon Sep 17 00:00:00 2001 From: Philippe Hupe Date: Wed, 26 Oct 2011 19:49:27 +0200 Subject: [PATCH] The reset icon can be correctly displayed to its expected size. A new icon (a down arrow) has been added for the Curve editor button. Patch optimised by Hombre (issue 1027, comments 16 and 17) --- rtdata/images/popuparrow.png | Bin 0 -> 235 bytes rtgui/adjuster.cc | 9 ++++++--- rtgui/popupcommon.cc | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 rtdata/images/popuparrow.png diff --git a/rtdata/images/popuparrow.png b/rtdata/images/popuparrow.png new file mode 100644 index 0000000000000000000000000000000000000000..235c4a7f5266d0d1f4d50a5be268479981a932ae GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0vp^AT}EZ8<7018Tf%(sn?m0MiLz;8Ne6h(J-W%^^y$H>-#ex=JnP?mbN^hG z4ZY6sZb4V(9Tc7(G0C>=Aa{xAl%ua(RDaIB|MSX&sgJ*k|6-fhA2IETj;}=22eCAE YMKQlsCx6NZ0Ig;4boFyt=akR{0Dz!U6#xJL literal 0 HcmV?d00001 diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index d585c1720..4a90bd72b 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -25,6 +25,8 @@ #include #include +#define MIN_RESET_BUTTON_HEIGHT 17 + extern Glib::ustring argv0; Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, bool editedcb) { @@ -72,8 +74,8 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep hbox->pack_end (*spin, Gtk::PACK_SHRINK, 0); - reset->set_size_request (-1, spin->get_height()); - + reset->set_size_request (-1, spin->get_height() > MIN_RESET_BUTTON_HEIGHT ? spin->get_height(): MIN_RESET_BUTTON_HEIGHT); + slider = Gtk::manage (new MyHScale ()); slider->set_draw_value (false); @@ -137,7 +139,8 @@ Adjuster::Adjuster (Gtk::Image *imgIcon, double vmin, double vmax, double vstep, spin->set_has_frame(false); spin->set_name("FramelessSpinButton"); - reset->set_size_request (-1, spin->get_height()); + reset->set_size_request (-1, spin->get_height() > MIN_RESET_BUTTON_HEIGHT ? spin->get_height(): MIN_RESET_BUTTON_HEIGHT); + slider = Gtk::manage (new MyHScale ()); slider->set_draw_value (false); diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc index aad280e06..c85b9a813 100644 --- a/rtgui/popupcommon.cc +++ b/rtgui/popupcommon.cc @@ -93,8 +93,8 @@ bool PopUpCommon::addEntry (Glib::ustring fileName, Glib::ustring label) { // When there is at least 1 choice, we add the arrow button if (images.size() == 1) { Gtk::Button* arrowButton = Gtk::manage( new Gtk::Button() ); - Gtk::Arrow* arrowObject = Gtk::manage( new Gtk::Arrow(Gtk::ARROW_DOWN, Gtk::SHADOW_NONE) ); - arrowButton->add(*arrowObject); //menuSymbol); + RTImage* arrowImage = Gtk::manage( new RTImage("popuparrow.png") ); + arrowButton->add(*arrowImage); //menuSymbol); arrowButton->set_relief (Gtk::RELIEF_NONE); arrowButton->set_border_width (0); buttonGroup->pack_start(*arrowButton,Gtk::PACK_SHRINK, 0);