From 3f019c92b73c1197d5087ffddf817a1e2be7f1f9 Mon Sep 17 00:00:00 2001 From: DrSlony Date: Wed, 8 Jul 2015 09:42:24 +0200 Subject: [PATCH] Exposure and Contrast by Detail Levels buttons made to stretch and fit, no issue. --- rtgui/dirpyrequalizer.cc | 12 ++++++------ rtgui/tonecurve.cc | 16 +++++++++------- rtgui/tonecurve.h | 1 + 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/rtgui/dirpyrequalizer.cc b/rtgui/dirpyrequalizer.cc index 0b1b98b64..d6f888788 100644 --- a/rtgui/dirpyrequalizer.cc +++ b/rtgui/dirpyrequalizer.cc @@ -41,19 +41,19 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", setEnabledTooltipMarkup(M("TP_SHARPENING_TOOLTIP")); - Gtk::HBox * buttonBox1 = Gtk::manage (new Gtk::HBox()); - pack_start(*buttonBox1, Gtk::PACK_SHRINK, 2); + Gtk::HBox * buttonBox1 = Gtk::manage (new Gtk::HBox(true, 10)); + pack_start(*buttonBox1); Gtk::Button * lumacontrastMinusButton = Gtk::manage (new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS"))); - buttonBox1->pack_start(*lumacontrastMinusButton, Gtk::PACK_SHRINK, 2); + buttonBox1->pack_start(*lumacontrastMinusButton); lumacontrastMinusPressedConn = lumacontrastMinusButton->signal_pressed().connect( sigc::mem_fun(*this, &DirPyrEqualizer::lumacontrastMinusPressed)); Gtk::Button * lumaneutralButton = Gtk::manage (new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL"))); - buttonBox1->pack_start(*lumaneutralButton, Gtk::PACK_SHRINK, 2); + buttonBox1->pack_start(*lumaneutralButton); lumaneutralPressedConn = lumaneutralButton->signal_pressed().connect( sigc::mem_fun(*this, &DirPyrEqualizer::lumaneutralPressed)); - + Gtk::Button * lumacontrastPlusButton = Gtk::manage (new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS"))); - buttonBox1->pack_start(*lumacontrastPlusButton, Gtk::PACK_SHRINK, 2); + buttonBox1->pack_start(*lumacontrastPlusButton); lumacontrastPlusPressedConn = lumacontrastPlusButton->signal_pressed().connect( sigc::mem_fun(*this, &DirPyrEqualizer::lumacontrastPlusPressed)); buttonBox1->show_all_children(); diff --git a/rtgui/tonecurve.cc b/rtgui/tonecurve.cc index 84079224f..61ee388d4 100644 --- a/rtgui/tonecurve.cc +++ b/rtgui/tonecurve.cc @@ -37,17 +37,20 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA //----------- Auto Levels ---------------------------------- abox = Gtk::manage (new Gtk::HBox ()); abox->set_border_width (2); + abox->set_spacing (10); autolevels = Gtk::manage (new Gtk::ToggleButton (M("TP_EXPOSURE_AUTOLEVELS"))); autolevels->set_tooltip_markup (M("TP_EXPOSURE_AUTOLEVELS_TIP")); autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) ); + lclip = Gtk::manage (new Gtk::Label (M("TP_EXPOSURE_CLIP"))); + lclip->set_tooltip_text (M("TP_EXPOSURE_CLIP_TIP")); + sclip = Gtk::manage (new MySpinButton ()); sclip->set_range (0.0, 0.99); - sclip->set_increments (0.01, 0.01); + sclip->set_increments (0.01, 0.10); sclip->set_value (0.02); sclip->set_digits (2); - sclip->set_tooltip_text (M("TP_EXPOSURE_CLIP_TIP")); sclip->signal_value_changed().connect( sigc::mem_fun(*this, &ToneCurve::clip_changed) ); neutral = Gtk::manage (new Gtk::Button (M("TP_NEUTRAL"))); @@ -55,12 +58,11 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &ToneCurve::neutral_pressed) ); neutral->show(); - abox->pack_start (*autolevels); + abox->pack_start (*autolevels, true, true, 0); // pack_end is used for these controls as autolevels is replaceable using pack_start in batchmode - abox->pack_end (*neutral); - abox->pack_end (*Gtk::manage (new Gtk::Label (" "))); //spacer - abox->pack_end (*sclip); - abox->pack_end (*Gtk::manage (new Gtk::Label (M("TP_EXPOSURE_CLIP")))); + abox->pack_end (*neutral, true, true, 0); + abox->pack_end (*sclip, false, false, 0); + abox->pack_end (*lclip, false, false, 0); pack_start (*abox); //-------------- Highlight Reconstruction ----------------- diff --git a/rtgui/tonecurve.h b/rtgui/tonecurve.h index 830ae6f7d..3a6c7afe3 100644 --- a/rtgui/tonecurve.h +++ b/rtgui/tonecurve.h @@ -41,6 +41,7 @@ class ToneCurve : public ToolParamBlock, public AdjusterListener, public Foldabl Gtk::HBox* hlrbox; Gtk::ToggleButton* autolevels; + Gtk::Label* lclip; MySpinButton* sclip; Gtk::Button* neutral; Adjuster* expcomp;