From bb95dd7a1ba692fc12713eefc7fdfad4a42857a7 Mon Sep 17 00:00:00 2001 From: Pandagrapher Date: Fri, 8 May 2020 12:34:10 +0200 Subject: [PATCH] Improves Locallab tools advice tooltips management Other: - GUI widgets cleanup --- rtdata/languages/default | 8 +- rtgui/editorpanel.cc | 7 + rtgui/editorpanel.h | 1 + rtgui/filecatalog.cc | 13 - rtgui/filecatalog.h | 1 - rtgui/locallab.cc | 16 + rtgui/locallab.h | 3 + rtgui/locallabtools.cc | 647 ++++++++++++--------------------------- rtgui/locallabtools.h | 45 +-- rtgui/locallabtools2.cc | 497 +++++++++++------------------- rtgui/preferences.cc | 2 - rtgui/rtwindow.cc | 2 +- rtgui/toolpanelcoord.cc | 6 + rtgui/toolpanelcoord.h | 2 +- 14 files changed, 448 insertions(+), 802 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index c96424e0d..950090441 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1672,7 +1672,7 @@ PREFERENCES_SHOWBASICEXIF;Show basic Exif info PREFERENCES_SHOWDATETIME;Show date and time PREFERENCES_SHOWFILMSTRIPTOOLBAR;Show Filmstrip toolbar PREFERENCES_SHOWEXPOSURECOMPENSATION;Append exposure compensation -PREFERENCES_SHOWTOOLTIP;Show Local Adjustements Tooltips +PREFERENCES_SHOWTOOLTIP;Show Local Adjustements advice tooltips PREFERENCES_SHTHRESHOLD;Threshold for clipped shadows PREFERENCES_SINGLETAB;Single Editor Tab Mode PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs @@ -2375,7 +2375,7 @@ TP_LOCALLAB_CURVNONE;Disable curves TP_LOCALLAB_DARKRETI;Darkness TP_LOCALLAB_DEHAFRA;Dehaze TP_LOCALLAB_DEHAZ;Strength -TP_LOCALLAB_DEHAZ_TOOLTIP;Negative values add haze +TP_LOCALLAB_DEHAZ_TOOLTIP;Negative values adds haze TP_LOCALLAB_DELTAD;Delta balance TP_LOCALLAB_DELTAEC;Mask ΔE Image TP_LOCALLAB_DENOIS;Ψ Denoise @@ -2629,7 +2629,7 @@ TP_LOCALLAB_SENSIDEN;Scope TP_LOCALLAB_SENSIEXCLU;Scope TP_LOCALLAB_SENSIEXCLU_TOOLTIP;Adjust color to include in exclusion! TP_LOCALLAB_SENSIH;Scope -TP_LOCALLAB_SENSIH_TOOLTIP; Adjust scope of action:\nSmall values limit action to colors very similar to those under the center spot.\nHigh values let the tool act upon a wider range of colors.\nValues smaller than 20 lead to a better algorithm. +TP_LOCALLAB_SENSIH_TOOLTIP;Adjust scope of action:\nSmall values limit action to colors very similar to those under the center spot.\nHigh values let the tool act upon a wider range of colors.\nValues smaller than 20 lead to a better algorithm. TP_LOCALLAB_SENSILOG;Scope TP_LOCALLAB_SENSIS;Scope TP_LOCALLAB_SENSIS_TOOLTIP;Adjust scope of action:\nSmall values limit action to colors very similar to those under the center spot.\nHigh values let the tool act upon a wider range of colors.\nValues smaller than 20 lead to a better algorithm. @@ -2662,7 +2662,7 @@ TP_LOCALLAB_SHOWFOURIER;Fourier ƒ(dct) TP_LOCALLAB_SHOWLAPLACE;∆ Laplacian (first) TP_LOCALLAB_SHOWLC;6 - Mask and modifications TP_LOCALLAB_SHOWMASK;Show mask -TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display modifications.\nBeware, you can only view one modification (color and light or Exposure or Shadows-Highlight or TM or CBDL or Retinex MSR or Blur).\n\nUse Mask is before algorihtm shape detection +TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display mask modifications.\nBeware, you can only view one tool mask at the same time.\n\nNote: Use Mask is before algorihtm shape detection. TP_LOCALLAB_SHOWMASKSOFT_TOOLTIP;Show process Fourier:\nShows the different stages of the process.\nLaplace - builds the second derivative according to the threshold (first step).\nFourier -shows the transformed Laplacian with DCT.\nPoisson - show solution of Poisson DCE.\nNormalize - show result without normalization luminance. TP_LOCALLAB_SHOWMNONE;None TP_LOCALLAB_SHOWMODIF;Show modifications without mask diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 93e704d57..669dd491a 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -957,6 +957,13 @@ void EditorPanel::writeToolExpandedStatus (std::vector &tpOpen) } } +void EditorPanel::updateShowtooltipVisibility (bool showtooltip) +{ + if (tpc) { + tpc->updateShowtooltipVisibility (showtooltip); + } +} + void EditorPanel::showTopPanel (bool show) { if (tbTopPanel_1->get_active() != show) { diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 8993fea07..826793507 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -79,6 +79,7 @@ public: void writeOptions(); void writeToolExpandedStatus (std::vector &tpOpen); + void updateShowtooltipVisibility (bool showtooltip); void showTopPanel (bool show); bool isRealized() diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 8249b7c34..102c17daf 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -1976,19 +1976,6 @@ void FileCatalog::updateFBQueryTB (bool singleRow) hbToolBar1->unreference(); } -void FileCatalog::updateShowtooltipVisibility (bool showtooltip) -{ - if (showtooltip) { - showToolBar(); - } else { - hideToolBar(); - } - - refreshHeight(); -} - - - void FileCatalog::updateFBToolBarVisibility (bool showFilmStripToolBar) { if (showFilmStripToolBar) { diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index 5f3623c2c..194153921 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -258,7 +258,6 @@ public: bool Query_key_pressed(GdkEventKey *event); void updateFBQueryTB (bool singleRow); void updateFBToolBarVisibility (bool showFilmStripToolBar); - void updateShowtooltipVisibility (bool showtooltip); void tbLeftPanel_1_toggled (); void tbLeftPanel_1_visible (bool visible); diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 5c104b547..5d3171613 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -20,11 +20,15 @@ * 2019 Pierre Cabrera */ #include "locallab.h" + +#include "options.h" #include "../rtengine/procparams.h" using namespace rtengine; using namespace procparams; +extern Options options; + /* ==== LocallabToolList ==== */ LocallabToolList::LocallabToolList(): // Tool list GUI elements @@ -209,6 +213,11 @@ Locallab::Locallab(): // Show all widgets show_all(); + // Update Locallab tools advice tooltips visibility based on saved option + for (auto tool : locallabTools) { + tool->updateAdviceTooltips(options.showtooltip); + } + // By default, if no photo is loaded, all Locallab tools are removed and it's not possible to add them // (to be necessary called after "show_all" function) setParamEditable(false); @@ -1085,6 +1094,13 @@ void Locallab::openAllTools() } } +void Locallab::updateShowtooltipVisibility(bool showtooltip) +{ + for (auto tool : locallabTools) { + tool->updateAdviceTooltips(showtooltip); + } +} + void Locallab::addTool(Gtk::Box* where, LocallabTool* tool) { tool->getExpander()->setLevel(3); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index c9f812a78..d4a269f78 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -183,6 +183,9 @@ public: void foldAllButOne(LocallabTool* except); void openAllTools(); + // Locallab tools advice tooltips management function + void updateShowtooltipVisibility(bool showtooltip); + private: // Locallab tools management functions void addTool(Gtk::Box* where, LocallabTool* tool); diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index e432b9788..f360d944f 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -130,8 +130,6 @@ LocallabTool::LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustr // LocallabTool generic widgets complexity(Gtk::manage(new MyComboBoxText())) { - const bool showtooltip = options.showtooltip; - // Create expander title bar Gtk::HBox* const titleBox = Gtk::manage(new Gtk::HBox()); Gtk::Label* const titleLabel = Gtk::manage(new Gtk::Label()); @@ -160,12 +158,8 @@ LocallabTool::LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustr titleBox->pack_end(*separator, Gtk::PACK_SHRINK, 0); if (need100Percent) { - RTImage* titleImage = Gtk::manage(new RTImage("one-to-one-small.png")); - - if (showtooltip) { - titleImage->set_tooltip_text(M("TP_GENERAL_11SCALE_TOOLTIP")); - } - + RTImage* const titleImage = Gtk::manage(new RTImage("one-to-one-small.png")); + titleImage->set_tooltip_text(M("TP_GENERAL_11SCALE_TOOLTIP")); titleBox->pack_end(*titleImage, Gtk::PACK_SHRINK, 0); } @@ -474,17 +468,11 @@ LocallabColor::LocallabColor(): const LocallabParams::LocallabSpot defSpot; - const bool showtooltip = options.showtooltip; - // Parameter Color & Light specific widgets curvactivConn = curvactiv->signal_toggled().connect(sigc::mem_fun(*this, &LocallabColor::curvactivChanged)); lightness->setAdjusterListener(this); - if (showtooltip) { - lightness->set_tooltip_text(M("TP_LOCALLAB_EXPCOLOR_TOOLTIP")); - } - contrast->setAdjusterListener(this); chroma->setAdjusterListener(this); @@ -500,10 +488,6 @@ LocallabColor::LocallabColor(): sensi->setAdjusterListener(this); - if (showtooltip) { - sensi->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); - } - structcol->setAdjusterListener(this); blurcolde->setAdjusterListener(this); @@ -517,57 +501,31 @@ LocallabColor::LocallabColor(): strcol->setAdjusterListener(this); - if (showtooltip) { - strcol->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); - } - strcolab->setAdjusterListener(this); - - if (showtooltip) { - strcolab->set_tooltip_text(M("TP_LOCALLAB_GRADSTRAB_TOOLTIP")); - } + strcolab->set_tooltip_text(M("TP_LOCALLAB_GRADSTRAB_TOOLTIP")); strcolh->setAdjusterListener(this); - - if (showtooltip) { - strcolh->set_tooltip_text(M("TP_LOCALLAB_GRADSTRHUE_TOOLTIP")); - } + strcolh->set_tooltip_text(M("TP_LOCALLAB_GRADSTRHUE_TOOLTIP")); angcol->setAdjusterListener(this); - - if (showtooltip) { - angcol->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); - } + angcol->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); setExpandAlignProperties(expcurvcol, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); qualitycurveMethod->append(M("TP_LOCALLAB_CURVNONE")); qualitycurveMethod->append(M("TP_LOCALLAB_CURVCURR")); qualitycurveMethod->set_active(0); - - if (showtooltip) { - qualitycurveMethod->set_tooltip_markup(M("TP_LOCALLAB_CURVEMETHOD_TOOLTIP")); - } - qualitycurveMethodConn = qualitycurveMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabColor::qualitycurveMethodChanged)); llCurveEditorG->setCurveListener(this); llshape->setResetCurve(DiagonalCurveType(defSpot.llcurve.at(0)), defSpot.llcurve); - - if (showtooltip) { - llshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); - } - + llshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); llshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); llshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); ccshape->setResetCurve(DiagonalCurveType(defSpot.cccurve.at(0)), defSpot.cccurve); - - if (showtooltip) { - ccshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); - } - + ccshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); ccshape->setBottomBarColorProvider(this, 4); ccshape->setLeftBarColorProvider(this, 1); @@ -576,20 +534,12 @@ LocallabColor::LocallabColor(): clCurveEditorG->setCurveListener(this); clshape->setResetCurve(DiagonalCurveType(defSpot.clcurve.at(0)), defSpot.clcurve); - - if (showtooltip) { - clshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); - } - + clshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); clshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); clshape->setLeftBarColorProvider(this, 1); lcshape->setResetCurve(DiagonalCurveType(defSpot.lccurve.at(0)), defSpot.lccurve); - - if (showtooltip) { - lcshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); - } - + lcshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); lcshape->setBottomBarColorProvider(this, 4); lcshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); @@ -599,11 +549,7 @@ LocallabColor::LocallabColor(): LHshape->setIdentityValue(0.); LHshape->setResetCurve(FlatCurveType(defSpot.LHcurve.at(0)), defSpot.LHcurve); - - if (showtooltip) { - LHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); - } - + LHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); LHshape->setCurveColorProvider(this, 3); LHshape->setBottomBarBgGradient(six_shape); @@ -613,11 +559,7 @@ LocallabColor::LocallabColor(): HHshape->setIdentityValue(0.); HHshape->setResetCurve(FlatCurveType(defSpot.HHcurve.at(0)), defSpot.HHcurve); - - if (showtooltip) { - HHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); - } - + HHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); HHshape->setCurveColorProvider(this, 3); HHshape->setBottomBarBgGradient(six_shape); @@ -633,11 +575,7 @@ LocallabColor::LocallabColor(): toneMethodConn = toneMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabColor::toneMethodChanged)); rgbshape->setResetCurve(DiagonalCurveType(defSpot.rgbcurve.at(0)), defSpot.rgbcurve); - - if (showtooltip) { - rgbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); - } - + rgbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); rgbshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); rgbshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); @@ -683,28 +621,12 @@ LocallabColor::LocallabColor(): opacol->setAdjusterListener(this); - if (showtooltip) { - opacol->set_tooltip_text(M("TP_LOCALLAB_MERGEOPA_TOOLTIP")); - } - conthrcol->setAdjusterListener(this); - if (showtooltip) { - conthrcol->set_tooltip_text(M("TP_LOCALLAB_MERGEOPA_TOOLTIP")); - } - - if (showtooltip) { - gridmerFrame->set_tooltip_text(M("TP_LOCALLAB_GRIDFRAME_TOOLTIP")); - } - merlucol->setAdjusterListener(this); setExpandAlignProperties(expmaskcol, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - if (showtooltip) { - expmaskcol->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); - } - showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmaskcolMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); @@ -712,21 +634,13 @@ LocallabColor::LocallabColor(): showmaskcolMethod->append(M("TP_LOCALLAB_SHOWSTRUC")); showmaskcolMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmaskcolMethod->set_active(0); - - if (showtooltip) { - showmaskcolMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskcolMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskcolMethodConn = showmaskcolMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabColor::showmaskcolMethodChanged)); showmaskcolMethodinv->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskcolMethodinv->append(M("TP_LOCALLAB_SHOWMASK")); showmaskcolMethodinv->set_active(0); - - if (showtooltip) { - showmaskcolMethodinv->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskcolMethodinv->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskcolMethodConninv = showmaskcolMethodinv->signal_changed().connect(sigc::mem_fun(*this, &LocallabColor::showmaskcolMethodChangedinv)); enaColorMaskConn = enaColorMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabColor::enaColorMaskChanged)); @@ -735,33 +649,14 @@ LocallabColor::LocallabColor(): CCmaskshape->setIdentityValue(0.); CCmaskshape->setResetCurve(FlatCurveType(defSpot.CCmaskcurve.at(0)), defSpot.CCmaskcurve); - - if (showtooltip) { - CCmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - CCmaskshape->setBottomBarColorProvider(this, 1); LLmaskshape->setIdentityValue(0.); LLmaskshape->setResetCurve(FlatCurveType(defSpot.LLmaskcurve.at(0)), defSpot.LLmaskcurve); - - if (showtooltip) { - LLmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - LLmaskshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); - if (showtooltip) { - LLmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmaskshape->setIdentityValue(0.); HHmaskshape->setResetCurve(FlatCurveType(defSpot.HHmaskcurve.at(0)), defSpot.HHmaskcurve); - - if (showtooltip) { - HHmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmaskshape->setCurveColorProvider(this, 2); HHmaskshape->setBottomBarColorProvider(this, 2); @@ -786,16 +681,8 @@ LocallabColor::LocallabColor(): radmaskcol->setLogScale(10, -10); radmaskcol->setAdjusterListener(this); - if (showtooltip) { - radmaskcol->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - lapmaskcol->setAdjusterListener(this); - if (showtooltip) { - lapmaskcol->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - chromaskcol->setAdjusterListener(this); gammaskcol->setAdjusterListener(this); @@ -808,11 +695,7 @@ LocallabColor::LocallabColor(): HHhmaskshape->setIdentityValue(0.); HHhmaskshape->setResetCurve(FlatCurveType(defSpot.HHhmaskcurve.at(0)), defSpot.HHhmaskcurve); - - if (showtooltip) { - HHhmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); - } - + HHhmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); HHhmaskshape->setCurveColorProvider(this, 2); HHhmaskshape->setBottomBarColorProvider(this, 2); @@ -821,11 +704,6 @@ LocallabColor::LocallabColor(): mask2CurveEditorG->setCurveListener(this); Lmaskshape->setResetCurve(DiagonalCurveType(defSpot.Lmaskcurve.at(0)), defSpot.Lmaskcurve); - - if (showtooltip) { - Lmaskshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); - } - Lmaskshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); Lmaskshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); @@ -835,11 +713,6 @@ LocallabColor::LocallabColor(): LLmaskcolshapewav->setIdentityValue(0.); LLmaskcolshapewav->setResetCurve(FlatCurveType(defSpot.LLmaskcolcurvewav.at(0)), defSpot.LLmaskcolcurvewav); - - if (showtooltip) { - LLmaskcolshapewav->setTooltip(M("TP_LOCALLAB_LMASK_LEVEL_TOOLTIP")); - } - LLmaskcolshapewav->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); mask2CurveEditorGwav->curveListComplete(); @@ -987,6 +860,43 @@ void LocallabColor::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, colorMaskinv = showmaskcolMethodinv->get_active_row_number(); } +void LocallabColor::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + lightness->set_tooltip_text(M("TP_LOCALLAB_EXPCOLOR_TOOLTIP")); + sensi->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); + strcol->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); + qualitycurveMethod->set_tooltip_markup(M("TP_LOCALLAB_CURVEMETHOD_TOOLTIP")); + opacol->set_tooltip_text(M("TP_LOCALLAB_MERGEOPA_TOOLTIP")); + conthrcol->set_tooltip_text(M("TP_LOCALLAB_MERGEOPA_TOOLTIP")); + gridmerFrame->set_tooltip_text(M("TP_LOCALLAB_GRIDFRAME_TOOLTIP")); + expmaskcol->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + CCmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + radmaskcol->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + lapmaskcol->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + Lmaskshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + LLmaskcolshapewav->setTooltip(M("TP_LOCALLAB_LMASK_LEVEL_TOOLTIP")); + } else { + lightness->set_tooltip_text(""); + sensi->set_tooltip_text(""); + strcol->set_tooltip_text(""); + qualitycurveMethod->set_tooltip_text(""); + opacol->set_tooltip_text(""); + conthrcol->set_tooltip_text(""); + gridmerFrame->set_tooltip_text(""); + expmaskcol->set_tooltip_text(""); + CCmaskshape->setTooltip(""); + LLmaskshape->setTooltip(""); + HHmaskshape->setTooltip(""); + radmaskcol->set_tooltip_text(""); + lapmaskcol->set_tooltip_text(""); + Lmaskshape->setTooltip(""); + LLmaskcolshapewav->setTooltip(""); + } +} + void LocallabColor::setDefaultExpanderVisibility() { expgradcol->set_expanded(false); @@ -2232,7 +2142,6 @@ LocallabExposure::LocallabExposure(): linear(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LINEAR"), 0., 1., 0.01, 0.3))), balanexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANEXP"), 0.5, 1.5, 0.01, 1.0))), gamm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMM"), 0.2, 1.3, 0.01, 0.4))), - ctboxexpmethod(Gtk::manage(new Gtk::HBox())), exnoiseMethod(Gtk::manage(new MyComboBoxText())), fatFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_FATFRA")))), fatamount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATAMOUNT"), 1., 100., 1., 1.))), @@ -2280,28 +2189,14 @@ LocallabExposure::LocallabExposure(): { const LocallabParams::LocallabSpot defSpot; - const bool showtooltip = options.showtooltip; - // Parameter Exposure specific widgets - if (showtooltip) { - exp->set_tooltip_text(M("TP_LOCALLAB_EXPOSURE_TOOLTIP")); - } - expMethod->append(M("TP_LOCALLAB_STD")); expMethod->append(M("TP_LOCALLAB_PDE")); expMethod->set_active(0); expMethodConn = expMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabExposure::expMethodChanged)); - if (showtooltip) { - expMethod->set_tooltip_text(M("TP_LOCALLAB_EXPMETHOD_TOOLTIP")); - } - pdeFrame->set_label_align(0.025, 0.5); - if (showtooltip) { - pdeFrame->set_tooltip_text(M("TP_LOCALLAB_PDEFRAME_TOOLTIP")); - } - laplacexp->setAdjusterListener(this); linear->setAdjusterListener(this); @@ -2316,16 +2211,8 @@ LocallabExposure::LocallabExposure(): exnoiseMethod->set_active(0); exnoiseMethodConn = exnoiseMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabExposure::exnoiseMethodChanged)); - if (showtooltip) { - exnoiseMethod->set_tooltip_text(M("TP_LOCALLAB_EXPMETHOD_TOOLTIP")); - } - fatFrame->set_label_align(0.025, 0.5); - if (showtooltip) { - fatFrame->set_tooltip_text(M("TP_LOCALLAB_FATFRAME_TOOLTIP")); - } - fatamount->setAdjusterListener(this); fatdetail->setAdjusterListener(this); @@ -2336,10 +2223,6 @@ LocallabExposure::LocallabExposure(): sensiex->setAdjusterListener(this); - if (showtooltip) { - sensiex->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); - } - structexp->setAdjusterListener(this); blurexpde->setAdjusterListener(this); @@ -2363,11 +2246,6 @@ LocallabExposure::LocallabExposure(): curveEditorG->setCurveListener(this); shapeexpos->setResetCurve(DiagonalCurveType(defSpot.excurve.at(0)), defSpot.excurve); - - if (showtooltip) { - shapeexpos->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_TONES_TOOLTIP")); - } - shapeexpos->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1}}); shapeexpos->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1}}); @@ -2377,15 +2255,8 @@ LocallabExposure::LocallabExposure(): strexp->setAdjusterListener(this); - if (showtooltip) { - strexp->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); - } - angexp->setAdjusterListener(this); - - if (showtooltip) { - angexp->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); - } + angexp->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); softradiusexp->setLogScale(10, -10); softradiusexp->setAdjusterListener(this); @@ -2394,10 +2265,6 @@ LocallabExposure::LocallabExposure(): setExpandAlignProperties(expmaskexp, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - if (showtooltip) { - expmaskexp->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); - } - showmaskexpMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskexpMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmaskexpMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); @@ -2405,21 +2272,13 @@ LocallabExposure::LocallabExposure(): showmaskexpMethod->append(M("TP_LOCALLAB_SHOWSTRUCEX")); showmaskexpMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmaskexpMethod->set_active(0); - - if (showtooltip) { - showmaskexpMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskexpMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskexpMethodConn = showmaskexpMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabExposure::showmaskexpMethodChanged)); showmaskexpMethodinv->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskexpMethodinv->append(M("TP_LOCALLAB_SHOWMASK")); showmaskexpMethodinv->set_active(0); - - if (showtooltip) { - showmaskexpMethodinv->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskexpMethodinv->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskexpMethodConninv = showmaskexpMethodinv->signal_changed().connect(sigc::mem_fun(*this, &LocallabExposure::showmaskexpMethodChangedinv)); enaExpMaskConn = enaExpMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabExposure::enaExpMaskChanged)); @@ -2430,29 +2289,14 @@ LocallabExposure::LocallabExposure(): CCmaskexpshape->setIdentityValue(0.); CCmaskexpshape->setResetCurve(FlatCurveType(defSpot.CCmaskexpcurve.at(0)), defSpot.CCmaskexpcurve); - - if (showtooltip) { - CCmaskexpshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - CCmaskexpshape->setBottomBarColorProvider(this, 1); LLmaskexpshape->setIdentityValue(0.); LLmaskexpshape->setResetCurve(FlatCurveType(defSpot.LLmaskexpcurve.at(0)), defSpot.LLmaskexpcurve); - - if (showtooltip) { - LLmaskexpshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - LLmaskexpshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1}}); HHmaskexpshape->setIdentityValue(0.); HHmaskexpshape->setResetCurve(FlatCurveType(defSpot.HHmaskexpcurve.at(0)), defSpot.HHmaskexpcurve); - - if (showtooltip) { - HHmaskexpshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmaskexpshape->setCurveColorProvider(this, 2); HHmaskexpshape->setBottomBarColorProvider(this, 2); @@ -2463,16 +2307,8 @@ LocallabExposure::LocallabExposure(): radmaskexp->setLogScale(10, -10); radmaskexp->setAdjusterListener(this); - if (showtooltip) { - radmaskexp->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - lapmaskexp->setAdjusterListener(this); - if (showtooltip) { - lapmaskexp->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - chromaskexp->setAdjusterListener(this); gammaskexp->setAdjusterListener(this); @@ -2483,24 +2319,12 @@ LocallabExposure::LocallabExposure(): strmaskexp->setAdjusterListener(this); - if (showtooltip) { - strmaskexp->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); - } - angmaskexp->setAdjusterListener(this); - - if (showtooltip) { - angmaskexp->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); - } + angmaskexp->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); mask2expCurveEditorG->setCurveListener(this); Lmaskexpshape->setResetCurve(DiagonalCurveType(defSpot.Lmaskexpcurve.at(0)), defSpot.Lmaskexpcurve); - - if (showtooltip) { - Lmaskexpshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); - } - Lmaskexpshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1}}); Lmaskexpshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1}}); @@ -2513,6 +2337,7 @@ LocallabExposure::LocallabExposure(): pdeBox->pack_start(*linear); pdeBox->pack_start(*balanexp); pdeBox->pack_start(*gamm); + Gtk::HBox* const ctboxexpmethod = Gtk::manage(new Gtk::HBox()); Gtk::Label* const labelexpmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_NOISEMETH") + ":")); ctboxexpmethod->pack_start(*labelexpmethod, Gtk::PACK_SHRINK, 4); ctboxexpmethod->pack_start(*exnoiseMethod); @@ -2594,6 +2419,45 @@ void LocallabExposure::getMaskView(int &colorMask, int &colorMaskinv, int &expMa expMaskinv = showmaskexpMethodinv->get_active_row_number(); } +void LocallabExposure::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + exp->set_tooltip_text(M("TP_LOCALLAB_EXPOSURE_TOOLTIP")); + expMethod->set_tooltip_text(M("TP_LOCALLAB_EXPMETHOD_TOOLTIP")); + pdeFrame->set_tooltip_text(M("TP_LOCALLAB_PDEFRAME_TOOLTIP")); + exnoiseMethod->set_tooltip_text(M("TP_LOCALLAB_EXPMETHOD_TOOLTIP")); + fatFrame->set_tooltip_text(M("TP_LOCALLAB_FATFRAME_TOOLTIP")); + sensiex->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); + shapeexpos->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_TONES_TOOLTIP")); + strexp->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); + expmaskexp->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + CCmaskexpshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmaskexpshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmaskexpshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + radmaskexp->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + lapmaskexp->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + strmaskexp->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); + Lmaskexpshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + } else { + exp->set_tooltip_text(""); + expMethod->set_tooltip_text(""); + pdeFrame->set_tooltip_text(""); + exnoiseMethod->set_tooltip_text(""); + fatFrame->set_tooltip_text(""); + sensiex->set_tooltip_text(""); + shapeexpos->setTooltip(""); + strexp->set_tooltip_text(""); + expmaskexp->set_tooltip_text(""); + CCmaskexpshape->setTooltip(""); + LLmaskexpshape->setTooltip(""); + HHmaskexpshape->setTooltip(""); + radmaskexp->set_tooltip_text(""); + lapmaskexp->set_tooltip_text(""); + strmaskexp->set_tooltip_text(""); + Lmaskexpshape->setTooltip(""); + } +} + void LocallabExposure::setDefaultExpanderVisibility() { exptoolexp->set_expanded(false); @@ -3353,7 +3217,6 @@ LocallabShadow::LocallabShadow(): sh_radius(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_RADIUS"), 0, 100, 1, 40))), sensihs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), blurSHde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), - gamFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GAMFRA")))), gamSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMSH"), 0.25, 15.0, 0.01, 2.4))), sloSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOSH"), 0.0, 150.0, 0.01, 12.92))), expgradsh(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_EXPGRAD")))), @@ -3382,13 +3245,7 @@ LocallabShadow::LocallabShadow(): { const LocallabParams::LocallabSpot defSpot; - const bool showtooltip = options.showtooltip; - // Parameter Shadow highlight specific widgets - if (showtooltip) { - exp->set_tooltip_text(M("TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP")); - } - shMethod->append(M("TP_LOCALLAB_SH1")); shMethod->append(M("TP_LOCALLAB_SH2")); shMethod->set_active(0); @@ -3414,8 +3271,6 @@ LocallabShadow::LocallabShadow(): blurSHde->setAdjusterListener(this); - gamFrame->set_label_align(0.025, 0.5); - gamSH->setAdjusterListener(this); sloSH->setAdjusterListener(this); @@ -3424,46 +3279,26 @@ LocallabShadow::LocallabShadow(): strSH->setAdjusterListener(this); - if (showtooltip) { - strSH->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); - } - angSH->setAdjusterListener(this); - - if (showtooltip) { - angSH->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); - } + angSH->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); inversshConn = inverssh->signal_toggled().connect(sigc::mem_fun(*this, &LocallabShadow::inversshChanged)); setExpandAlignProperties(expmasksh, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - if (showtooltip) { - expmasksh->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); - } - showmaskSHMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskSHMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmaskSHMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); showmaskSHMethod->append(M("TP_LOCALLAB_SHOWMASK")); showmaskSHMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmaskSHMethod->set_active(0); - - if (showtooltip) { - showmaskSHMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskSHMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskSHMethodConn = showmaskSHMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabShadow::showmaskSHMethodChanged)); showmaskSHMethodinv->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskSHMethodinv->append(M("TP_LOCALLAB_SHOWMASK")); - showmaskSHMethodinv->set_active(0); - - if (showtooltip) { - showmaskSHMethodinv->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskSHMethodinv->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskSHMethodConninv = showmaskSHMethodinv->signal_changed().connect(sigc::mem_fun(*this, &LocallabShadow::showmaskSHMethodChangedinv)); enaSHMaskConn = enaSHMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabShadow::enaSHMaskChanged)); @@ -3472,29 +3307,14 @@ LocallabShadow::LocallabShadow(): CCmaskSHshape->setIdentityValue(0.); CCmaskSHshape->setResetCurve(FlatCurveType(defSpot.CCmaskSHcurve.at(0)), defSpot.CCmaskSHcurve); - - if (showtooltip) { - CCmaskSHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - CCmaskSHshape->setBottomBarColorProvider(this, 1); LLmaskSHshape->setIdentityValue(0.); LLmaskSHshape->setResetCurve(FlatCurveType(defSpot.LLmaskSHcurve.at(0)), defSpot.LLmaskSHcurve); - - if (showtooltip) { - LLmaskSHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - LLmaskSHshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); HHmaskSHshape->setIdentityValue(0.); HHmaskSHshape->setResetCurve(FlatCurveType(defSpot.HHmaskSHcurve.at(0)), defSpot.HHmaskSHcurve); - - if (showtooltip) { - HHmaskSHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmaskSHshape->setCurveColorProvider(this, 2); HHmaskSHshape->setBottomBarColorProvider(this, 2); @@ -3505,16 +3325,8 @@ LocallabShadow::LocallabShadow(): radmaskSH->setLogScale(10, -10); radmaskSH->setAdjusterListener(this); - if (showtooltip) { - radmaskSH->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - lapmaskSH->setAdjusterListener(this); - if (showtooltip) { - lapmaskSH->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - chromaskSH->setAdjusterListener(this); gammaskSH->setAdjusterListener(this); @@ -3524,11 +3336,6 @@ LocallabShadow::LocallabShadow(): mask2SHCurveEditorG->setCurveListener(this); LmaskSHshape->setResetCurve(DiagonalCurveType(defSpot.LmaskSHcurve.at(0)), defSpot.LmaskSHcurve); - - if (showtooltip) { - LmaskSHshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); - } - LmaskSHshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); LmaskSHshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); @@ -3555,6 +3362,8 @@ LocallabShadow::LocallabShadow(): pack_start(*sh_radius); pack_start(*sensihs); pack_start(*blurSHde); + Gtk::Frame* const gamFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GAMFRA"))); + gamFrame->set_label_align(0.025, 0.5); ToolParamBlock* const gammBox = Gtk::manage(new ToolParamBlock()); gammBox->pack_start(*gamSH); gammBox->pack_start(*sloSH); @@ -3611,6 +3420,31 @@ void LocallabShadow::getMaskView(int &colorMask, int &colorMaskinv, int &expMask shMaskinv = showmaskSHMethodinv->get_active_row_number(); } +void LocallabShadow::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + exp->set_tooltip_text(M("TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP")); + strSH->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); + expmasksh->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + CCmaskSHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmaskSHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmaskSHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + radmaskSH->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + lapmaskSH->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + LmaskSHshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + } else { + exp->set_tooltip_text(""); + strSH->set_tooltip_text(""); + expmasksh->set_tooltip_text(""); + CCmaskSHshape->setTooltip(""); + LLmaskSHshape->setTooltip(""); + HHmaskSHshape->setTooltip(""); + radmaskSH->set_tooltip_text(""); + lapmaskSH->set_tooltip_text(""); + LmaskSHshape->setTooltip(""); + } +} + void LocallabShadow::setDefaultExpanderVisibility() { expgradsh->set_expanded(false); @@ -4246,23 +4080,14 @@ LocallabVibrance::LocallabVibrance(): const LocallabParams::LocallabSpot defSpot; - const bool showtooltip = options.showtooltip; - // Parameter Vibrance specific widgets saturated->setAdjusterListener(this); pastels->setAdjusterListener(this); - if (showtooltip) { - warm->set_tooltip_text(M("TP_LOCALLAB_WARM_TOOLTIP")); - } - warm->setAdjusterListener(this); - if (showtooltip) { - psThreshold->set_tooltip_markup(M("TP_VIBRANCE_PSTHRESHOLD_TOOLTIP")); - } - + psThreshold->set_tooltip_markup(M("TP_VIBRANCE_PSTHRESHOLD_TOOLTIP")); psThreshold->setAdjusterListener(this); pskinsConn = protectSkins->signal_toggled().connect(sigc::mem_fun(*this, &LocallabVibrance::protectskins_toggled)); @@ -4275,10 +4100,7 @@ LocallabVibrance::LocallabVibrance(): curveEditorGG->setCurveListener(this); - if (showtooltip) { - skinTonesCurve->setTooltip(M("TP_VIBRANCE_CURVEEDITOR_SKINTONES_TOOLTIP")); - } - + skinTonesCurve->setTooltip(M("TP_VIBRANCE_CURVEEDITOR_SKINTONES_TOOLTIP")); std::vector mskinTonesCurve; // -0.1 rad < Hue < 1.6 rad Color::hsv2rgb01(0.92f, 0.45f, 0.6f, R, G, B); @@ -4297,47 +4119,26 @@ LocallabVibrance::LocallabVibrance(): setExpandAlignProperties(expgradvib, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - if (showtooltip) { - strvib->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); - } - strvib->setAdjusterListener(this); - if (showtooltip) { - strvibab->set_tooltip_text(M("TP_LOCALLAB_GRADSTRAB_TOOLTIP")); - } - + strvibab->set_tooltip_text(M("TP_LOCALLAB_GRADSTRAB_TOOLTIP")); strvibab->setAdjusterListener(this); - if (showtooltip) { - strvibh->set_tooltip_text(M("TP_LOCALLAB_GRADSTRHUE_TOOLTIP")); - } - + strvibh->set_tooltip_text(M("TP_LOCALLAB_GRADSTRHUE_TOOLTIP")); strvibh->setAdjusterListener(this); - if (showtooltip) { - angvib->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); - } - + angvib->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); angvib->setAdjusterListener(this); setExpandAlignProperties(expmaskvib, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - if (showtooltip) { - expmaskvib->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); - } - showmaskvibMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskvibMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmaskvibMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); showmaskvibMethod->append(M("TP_LOCALLAB_SHOWMASK")); showmaskvibMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmaskvibMethod->set_active(0); - - if (showtooltip) { - showmaskvibMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskvibMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskvibMethodConn = showmaskvibMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabVibrance::showmaskvibMethodChanged)); enavibMaskConn = enavibMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabVibrance::enavibMaskChanged)); @@ -4346,29 +4147,14 @@ LocallabVibrance::LocallabVibrance(): CCmaskvibshape->setIdentityValue(0.); CCmaskvibshape->setResetCurve(FlatCurveType(defSpot.CCmaskvibcurve.at(0)), defSpot.CCmaskvibcurve); - - if (showtooltip) { - CCmaskvibshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - CCmaskvibshape->setBottomBarColorProvider(this, 1); LLmaskvibshape->setIdentityValue(0.); LLmaskvibshape->setResetCurve(FlatCurveType(defSpot.LLmaskvibcurve.at(0)), defSpot.LLmaskvibcurve); - - if (showtooltip) { - LLmaskvibshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - LLmaskvibshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); HHmaskvibshape->setIdentityValue(0.); HHmaskvibshape->setResetCurve(FlatCurveType(defSpot.HHmaskvibcurve.at(0)), defSpot.HHmaskvibcurve); - - if (showtooltip) { - HHmaskvibshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmaskvibshape->setCurveColorProvider(this, 2); HHmaskvibshape->setBottomBarColorProvider(this, 2); @@ -4390,11 +4176,6 @@ LocallabVibrance::LocallabVibrance(): mask2vibCurveEditorG->setCurveListener(this); Lmaskvibshape->setResetCurve(DiagonalCurveType(defSpot.Lmaskvibcurve.at(0)), defSpot.Lmaskvibcurve); - - if (showtooltip) { - Lmaskvibshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); - } - Lmaskvibshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); Lmaskvibshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); @@ -4453,6 +4234,27 @@ void LocallabVibrance::getMaskView(int &colorMask, int &colorMaskinv, int &expMa vibMask = showmaskvibMethod->get_active_row_number(); } +void LocallabVibrance::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + warm->set_tooltip_text(M("TP_LOCALLAB_WARM_TOOLTIP")); + strvib->set_tooltip_text(M("TP_LOCALLAB_GRADGEN_TOOLTIP")); + expmaskvib->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + CCmaskvibshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmaskvibshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmaskvibshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + Lmaskvibshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + } else { + warm->set_tooltip_text(""); + strvib->set_tooltip_text(""); + expmaskvib->set_tooltip_text(""); + CCmaskvibshape->setTooltip(""); + LLmaskvibshape->setTooltip(""); + HHmaskvibshape->setTooltip(""); + Lmaskvibshape->setTooltip(""); + } +} + void LocallabVibrance::setDefaultExpanderVisibility() { expgradvib->set_expanded(false); @@ -5004,17 +4806,10 @@ LocallabSoft::LocallabSoft(): laplace(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACE"), 0., 100., 0.5, 25.))), sensisf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 1, 100, 1, 15))) { - const bool showtooltip = options.showtooltip; - // Parameter Soft light specific widgets softMethod->append(M("TP_LOCALLAB_SOFTM")); softMethod->append(M("TP_LOCALLAB_RETIM")); softMethod->set_active(0); - - if (showtooltip) { - softMethod->set_tooltip_markup(M("TP_LOCALLAB_SOFTMETHOD_TOOLTIP")); - } - softMethodConn = softMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabSoft::softMethodChanged)); showmasksoftMethod->append(M("TP_LOCALLAB_SHOWMNONE")); @@ -5025,11 +4820,7 @@ LocallabSoft::LocallabSoft(): showmasksoftMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmasksoftMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmasksoftMethod->set_active(0); - - if (showtooltip) { - showmasksoftMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKSOFT_TOOLTIP")); - } - + showmasksoftMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKSOFT_TOOLTIP")); showmasksoftMethodConn = showmasksoftMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabSoft::showmasksoftMethodChanged)); streng->setAdjusterListener(this); @@ -5061,6 +4852,15 @@ void LocallabSoft::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, softMask = showmasksoftMethod->get_active_row_number(); } +void LocallabSoft::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + softMethod->set_tooltip_markup(M("TP_LOCALLAB_SOFTMETHOD_TOOLTIP")); + } else { + softMethod->set_tooltip_text(""); + } +} + void LocallabSoft::disableListener() { LocallabTool::disableListener(); @@ -5327,7 +5127,6 @@ LocallabBlur::LocallabBlur(): strumaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUMASKCOL"), 0., 200., 0.1, 0.))), toolbl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TOOLCOL")))), blendmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), - toolblFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK")))), radmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), -10.0, 1000.0, 0.1, 0.))), lapmaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), chromaskbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), @@ -5342,15 +5141,9 @@ LocallabBlur::LocallabBlur(): { const LocallabParams::LocallabSpot defSpot; - const bool showtooltip = options.showtooltip; - // Parameter Blur, Noise & Denoise specific widgets setExpandAlignProperties(expblnoise, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - if (showtooltip) { - expblnoise->set_tooltip_markup(M("TP_LOCALLAB_BLUMETHOD_TOOLTIP")); - } - blMethod->append(M("TP_LOCALLAB_BLUR")); blMethod->append(M("TP_LOCALLAB_BLMED")); blMethod->append(M("TP_LOCALLAB_BLGUID")); @@ -5359,10 +5152,6 @@ LocallabBlur::LocallabBlur(): fftwblConn = fftwbl->signal_toggled().connect(sigc::mem_fun(*this, &LocallabBlur::fftwblChanged)); - if (showtooltip) { - radius->set_tooltip_text(M("TP_LOCALLAB_RADIUS_TOOLTIP")); - } - radius->setAdjusterListener(this); strength->setAdjusterListener(this); @@ -5392,20 +5181,11 @@ LocallabBlur::LocallabBlur(): epsbl->setAdjusterListener(this); - if (showtooltip) { - sensibn->set_tooltip_text(M("TP_LOCALLAB_SENSIH_TOOLTIP")); - } - sensibn->setAdjusterListener(this); blurMethod->append(M("TP_LOCALLAB_BLNORM")); blurMethod->append(M("TP_LOCALLAB_BLINV")); blurMethod->set_active(0); - - if (showtooltip) { - blurMethod->set_tooltip_markup(M("TP_LOCALLAB_BLMETHOD_TOOLTIP")); - } - blurMethodConn = blurMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabBlur::blurMethodChanged)); chroMethod->append(M("TP_LOCALLAB_BLLO")); @@ -5418,19 +5198,11 @@ LocallabBlur::LocallabBlur(): setExpandAlignProperties(expdenoise, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - if (showtooltip) { - expdenoise->set_tooltip_markup(M("TP_LOCALLAB_DENOI_TOOLTIP")); - } - LocalcurveEditorwavden->setCurveListener(this); wavshapeden->setIdentityValue(0.); wavshapeden->setResetCurve(FlatCurveType(defSpot.locwavcurveden.at(0)), defSpot.locwavcurveden); - if (showtooltip) { - wavshapeden->setTooltip(M("TP_LOCALLAB_WASDEN_TOOLTIP")); - } - LocalcurveEditorwavden->curveListComplete(); noiselumf0->setAdjusterListener(this); @@ -5439,10 +5211,6 @@ LocallabBlur::LocallabBlur(): noiselumf2->setAdjusterListener(this); - if (showtooltip) { - noiselumc->set_tooltip_text(M("TP_LOCALLAB_NOISECHROC_TOOLTIP")); - } - noiselumc->setAdjusterListener(this); noiselumdetail->setAdjusterListener(this); @@ -5451,10 +5219,7 @@ LocallabBlur::LocallabBlur(): noisechrof->setAdjusterListener(this); - if (showtooltip) { - noisechroc->set_tooltip_text(M("TP_LOCALLAB_NOISECHROC_TOOLTIP")); - } - + noisechroc->set_tooltip_text(M("TP_LOCALLAB_NOISECHROC_TOOLTIP")); noisechroc->setAdjusterListener(this); noisechrodetail->setAdjusterListener(this); @@ -5469,21 +5234,13 @@ LocallabBlur::LocallabBlur(): setExpandAlignProperties(expmaskbl, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - if (showtooltip) { - expmaskbl->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); - } - showmaskblMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskblMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmaskblMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); showmaskblMethod->append(M("TP_LOCALLAB_SHOWMASK")); showmaskblMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmaskblMethod->set_active(0); - - if (showtooltip) { - showmaskblMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskblMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskblMethodConn = showmaskblMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabBlur::showmaskblMethodChanged)); enablMaskConn = enablMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabBlur::enablMaskChanged)); @@ -5492,29 +5249,14 @@ LocallabBlur::LocallabBlur(): CCmaskblshape->setIdentityValue(0.); CCmaskblshape->setResetCurve(FlatCurveType(defSpot.CCmaskblcurve.at(0)), defSpot.CCmaskblcurve); - - if (showtooltip) { - CCmaskblshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - CCmaskblshape->setBottomBarColorProvider(this, 1); LLmaskblshape->setIdentityValue(0.); LLmaskblshape->setResetCurve(FlatCurveType(defSpot.LLmaskblcurve.at(0)), defSpot.LLmaskblcurve); - - if (showtooltip) { - LLmaskblshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - LLmaskblshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); HHmaskblshape->setIdentityValue(0.); HHmaskblshape->setResetCurve(FlatCurveType(defSpot.HHmaskblcurve.at(0)), defSpot.HHmaskblcurve); - - if (showtooltip) { - HHmaskblshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmaskblshape->setCurveColorProvider(this, 2); HHmaskblshape->setBottomBarColorProvider(this, 2); @@ -5526,18 +5268,8 @@ LocallabBlur::LocallabBlur(): blendmaskbl->setAdjusterListener(this); - toolblFrame->set_label_align(0.025, 0.5); - - if (showtooltip) { - radmaskbl->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - radmaskbl->setAdjusterListener(this); - if (showtooltip) { - lapmaskbl->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - lapmaskbl->setAdjusterListener(this); chromaskbl->setAdjusterListener(this); @@ -5551,11 +5283,6 @@ LocallabBlur::LocallabBlur(): mask2blCurveEditorG->setCurveListener(this); Lmaskblshape->setResetCurve(DiagonalCurveType(defSpot.Lmaskblcurve.at(0)), defSpot.Lmaskblcurve); - - if (showtooltip) { - Lmaskblshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); - } - Lmaskblshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); Lmaskblshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); mask2blCurveEditorG->curveListComplete(); @@ -5564,11 +5291,6 @@ LocallabBlur::LocallabBlur(): LLmaskblshapewav->setIdentityValue(0.); LLmaskblshapewav->setResetCurve(FlatCurveType(defSpot.LLmaskblcurvewav.at(0)), defSpot.LLmaskblcurvewav); - - if (showtooltip) { - LLmaskblshapewav->setTooltip(M("TP_LOCALLAB_LMASK_LEVEL_TOOLTIP")); - } - LLmaskblshapewav->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); mask2blCurveEditorGwav->curveListComplete(); @@ -5628,6 +5350,8 @@ LocallabBlur::LocallabBlur(): Gtk::HSeparator* const separatorstrubl = Gtk::manage(new Gtk::HSeparator()); maskblBox->pack_start(*separatorstrubl, Gtk::PACK_SHRINK, 2); maskblBox->pack_start(*blendmaskbl, Gtk::PACK_SHRINK, 0); + Gtk::Frame* const toolblFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK"))); + toolblFrame->set_label_align(0.025, 0.5); ToolParamBlock* const toolblBox = Gtk::manage(new ToolParamBlock()); toolblBox->pack_start(*radmaskbl, Gtk::PACK_SHRINK, 0); toolblBox->pack_start(*lapmaskbl, Gtk::PACK_SHRINK, 0); @@ -5664,6 +5388,43 @@ void LocallabBlur::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, blMask = showmaskblMethod->get_active_row_number(); } +void LocallabBlur::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + expblnoise->set_tooltip_markup(M("TP_LOCALLAB_BLUMETHOD_TOOLTIP")); + radius->set_tooltip_text(M("TP_LOCALLAB_RADIUS_TOOLTIP")); + sensibn->set_tooltip_text(M("TP_LOCALLAB_SENSIH_TOOLTIP")); + blurMethod->set_tooltip_markup(M("TP_LOCALLAB_BLMETHOD_TOOLTIP")); + expdenoise->set_tooltip_markup(M("TP_LOCALLAB_DENOI_TOOLTIP")); + wavshapeden->setTooltip(M("TP_LOCALLAB_WASDEN_TOOLTIP")); + noiselumc->set_tooltip_text(M("TP_LOCALLAB_NOISECHROC_TOOLTIP")); + expmaskbl->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + CCmaskblshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmaskblshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmaskblshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + radmaskbl->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + lapmaskbl->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + Lmaskblshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + LLmaskblshapewav->setTooltip(M("TP_LOCALLAB_LMASK_LEVEL_TOOLTIP")); + } else { + expblnoise->set_tooltip_text(""); + radius->set_tooltip_text(""); + sensibn->set_tooltip_text(""); + blurMethod->set_tooltip_text(""); + expdenoise->set_tooltip_text(""); + wavshapeden->setTooltip(""); + noiselumc->set_tooltip_text(""); + expmaskbl->set_tooltip_text(""); + CCmaskblshape->setTooltip(""); + LLmaskblshape->setTooltip(""); + HHmaskblshape->setTooltip(""); + radmaskbl->set_tooltip_text(""); + lapmaskbl->set_tooltip_text(""); + Lmaskblshape->setTooltip(""); + LLmaskblshapewav->setTooltip(""); + } +} + void LocallabBlur::setDefaultExpanderVisibility() { expblnoise->set_expanded(false); diff --git a/rtgui/locallabtools.h b/rtgui/locallabtools.h index 239ccc997..87bcb955d 100644 --- a/rtgui/locallabtools.h +++ b/rtgui/locallabtools.h @@ -121,6 +121,9 @@ public: virtual void resetMaskView() {}; virtual void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) {}; + // Advice tooltips management function + virtual void updateAdviceTooltips(const bool showTooltips) {}; + /* Notes: - callerId #1: Mask CC shape (bottom bar) + Color CC/LC shape (left bar) - callerId #2: Mask HH shape (main curve and bottom bar) @@ -253,6 +256,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -306,7 +311,6 @@ private: Adjuster* const linear; Adjuster* const balanexp; Adjuster* const gamm; - Gtk::HBox* const ctboxexpmethod; MyComboBoxText* const exnoiseMethod; Gtk::Frame* const fatFrame; Adjuster* const fatamount; @@ -361,6 +365,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -407,7 +413,6 @@ private: Adjuster* const sh_radius; Adjuster* const sensihs; Adjuster* const blurSHde; - Gtk::Frame* const gamFrame; Adjuster* const gamSH; Adjuster* const sloSH; MyExpander* const expgradsh; @@ -443,6 +448,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -518,6 +525,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -571,6 +580,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void disableListener() override; void enableListener() override; void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) override; @@ -641,7 +652,6 @@ private: Adjuster* const strumaskbl; Gtk::CheckButton* const toolbl; Adjuster* const blendmaskbl; - Gtk::Frame* const toolblFrame; Adjuster* const radmaskbl; Adjuster* const lapmaskbl; Adjuster* const chromaskbl; @@ -663,6 +673,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -740,6 +752,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -769,7 +783,6 @@ class LocallabRetinex: { private: // Retinex specific widgets - Gtk::Frame* const dehaFrame; Adjuster* const dehaz; Adjuster* const depth; Gtk::CheckButton* const lumonly; @@ -778,7 +791,6 @@ private: Gtk::CheckButton* const loglin; Adjuster* const sensih; Gtk::Frame* const retitoolFrame; - ToolParamBlock* const retiBox; MyComboBoxText* const retinexMethod; Gtk::CheckButton* const fftwreti; Gtk::CheckButton* const equilret; @@ -801,7 +813,6 @@ private: CurveEditorGroup* const LocalcurveEditorgainT; FlatCurveEditor* const cTgainshape; MyExpander* const expmaskreti; - ToolParamBlock* const maskretiBox; MyComboBoxText* const showmaskretiMethod; Gtk::CheckButton* const enaretiMask; Gtk::CheckButton* const enaretiMasktmap; @@ -830,6 +841,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -875,7 +888,6 @@ private: Adjuster* const sharblur; Adjuster* const sensisha; Gtk::CheckButton* const inverssha; - Gtk::Frame* const sharFrame; MyComboBoxText* const showmasksharMethod; sigc::connection inversshaConn, showmasksharMethodConn; @@ -886,6 +898,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void disableListener() override; void enableListener() override; void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) override; @@ -922,7 +936,6 @@ private: MyExpander* const expresidpyr; Adjuster* const residcont; Adjuster* const residchro; - Gtk::Frame* const shresFrame; Adjuster* const residsha; Adjuster* const residshathr; Adjuster* const residhi; @@ -934,14 +947,11 @@ private: Adjuster* const clarisoft; Gtk::CheckButton* const origlc; MyExpander* const expcontrastpyr; - Gtk::Frame* const gradwavFrame; Gtk::CheckButton* const wavgradl; Adjuster* const sigmalc2; Adjuster* const strwav; Adjuster* const angwav; - Gtk::Frame* const edgFrame; Gtk::CheckButton* const wavedg; - ToolParamBlock* const edgsBox; Adjuster* const strengthw; Adjuster* const sigmaed; CurveEditorGroup* const LocalcurveEditorwavedg; @@ -956,9 +966,7 @@ private: Adjuster* const thigw; Adjuster* const edgw; Adjuster* const basew; - Gtk::Label* const labmNP; MyComboBoxText* const localneiMethod; - Gtk::Frame* const blurlevelFrame; Gtk::CheckButton* const wavblur; Adjuster* const levelblur; Adjuster* const sigmabl; @@ -968,21 +976,18 @@ private: Adjuster* const residblur; Gtk::CheckButton* const blurlc; MyExpander* const expcontrastpyr2; - Gtk::Frame* const contFrame; Gtk::CheckButton* const wavcont; Adjuster* const sigma; Adjuster* const offset; Adjuster* const chromalev; CurveEditorGroup* const LocalcurveEditorwavcon; FlatCurveEditor* const wavshapecon; - Gtk::Frame* const compreFrame; Gtk::CheckButton* const wavcompre; CurveEditorGroup* const LocalcurveEditorwavcompre; FlatCurveEditor* const wavshapecompre; Adjuster* const sigmadr; Adjuster* const threswav; Adjuster* const residcomp; - Gtk::Frame* const compFrame; Gtk::CheckButton* const wavcomp; Adjuster* const sigmadc; Adjuster* const deltad; @@ -1012,6 +1017,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -1064,7 +1071,6 @@ private: Adjuster* const chromacbdl; Adjuster* const threshold; Adjuster* const blurcbdl; - Gtk::Frame* const residFrame; Adjuster* const clarityml; Adjuster* const contresid; Adjuster* const softradiuscb; @@ -1100,6 +1106,8 @@ public: void resetMaskView() override; void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask) override; + void updateAdviceTooltips(const bool showTooltips) override; + void setDefaultExpanderVisibility() override; void disableListener() override; void enableListener() override; @@ -1130,19 +1138,16 @@ class LocallabLog: public LocallabTool { private: - Gtk::Frame* const logPFrame; Gtk::ToggleButton* const autocompute; Adjuster* const blackEv; Adjuster* const whiteEv; Gtk::CheckButton* const fullimage; - Gtk::Frame* const logFrame; Gtk::CheckButton* const Autogray; Adjuster* const sourceGray; Adjuster* const targetGray; Adjuster* const detail; Adjuster* const baselog; Adjuster* const sensilog; - Gtk::Frame* const gradlogFrame; Adjuster* const strlog; Adjuster* const anglog; diff --git a/rtgui/locallabtools2.cc b/rtgui/locallabtools2.cc index 34c5b3acd..39e1df169 100644 --- a/rtgui/locallabtools2.cc +++ b/rtgui/locallabtools2.cc @@ -145,15 +145,9 @@ LocallabTone::LocallabTone(): mask2tmCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), Lmasktmshape(static_cast(mask2tmCurveEditorG->addCurve(CT_Diagonal, "L(L)"))) { - const bool showtooltip = options.showtooltip; - const LocallabParams::LocallabSpot defSpot; // Parameter Tone Mapping specific widgets - if (showtooltip) { - exp->set_tooltip_text(M("TP_LOCALLAB_TONEMAP_TOOLTIP")); - } - amount->setAdjusterListener(this); stren->setAdjusterListener(this); @@ -166,44 +160,24 @@ LocallabTone::LocallabTone(): estop->setAdjusterListener(this); - if (showtooltip) { - estop->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP")); - } - scaltm->setAdjusterListener(this); rewei->setAdjusterListener(this); - if (showtooltip) { - rewei->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP")); - } - softradiustm->setLogScale(10, -10); softradiustm->setAdjusterListener(this); sensitm->setAdjusterListener(this); - if (showtooltip) { - sensitm->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); - } - setExpandAlignProperties(expmasktm, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - if (showtooltip) { - expmasktm->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); - } - showmasktmMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmasktmMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmasktmMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); showmasktmMethod->append(M("TP_LOCALLAB_SHOWMASK")); showmasktmMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmasktmMethod->set_active(0); - - if (showtooltip) { - showmasktmMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmasktmMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmasktmMethodConn = showmasktmMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabTone::showmasktmMethodChanged)); enatmMaskConn = enatmMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabTone::enatmMaskChanged)); @@ -214,29 +188,14 @@ LocallabTone::LocallabTone(): CCmasktmshape->setIdentityValue(0.); CCmasktmshape->setResetCurve(FlatCurveType(defSpot.CCmasktmcurve.at(0)), defSpot.CCmasktmcurve); - - if (showtooltip) { - CCmasktmshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - CCmasktmshape->setBottomBarColorProvider(this, 1); LLmasktmshape->setIdentityValue(0.); LLmasktmshape->setResetCurve(FlatCurveType(defSpot.LLmasktmcurve.at(0)), defSpot.LLmasktmcurve); - - if (showtooltip) { - LLmasktmshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - LLmasktmshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); HHmasktmshape->setIdentityValue(0.); HHmasktmshape->setResetCurve(FlatCurveType(defSpot.HHmasktmcurve.at(0)), defSpot.HHmasktmcurve); - - if (showtooltip) { - HHmasktmshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmasktmshape->setCurveColorProvider(this, 2); HHmasktmshape->setBottomBarColorProvider(this, 2); @@ -246,17 +205,9 @@ LocallabTone::LocallabTone(): lapmasktm->setAdjusterListener(this); - if (showtooltip) { - lapmasktm->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - radmasktm->setLogScale(10, -10); radmasktm->setAdjusterListener(this); - if (showtooltip) { - radmasktm->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - chromasktm->setAdjusterListener(this); gammasktm->setAdjusterListener(this); @@ -265,11 +216,6 @@ LocallabTone::LocallabTone(): mask2tmCurveEditorG->setCurveListener(this); Lmasktmshape->setResetCurve(DiagonalCurveType(defSpot.Lmasktmcurve.at(0)), defSpot.Lmasktmcurve); - - if (showtooltip) { - Lmasktmshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); - } - Lmasktmshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); Lmasktmshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); @@ -320,6 +266,35 @@ void LocallabTone::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, tmMask = showmasktmMethod->get_active_row_number(); } +void LocallabTone::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + exp->set_tooltip_text(M("TP_LOCALLAB_TONEMAP_TOOLTIP")); + estop->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP")); + rewei->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP")); + sensitm->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP")); + expmasktm->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + CCmasktmshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmasktmshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmasktmshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + lapmasktm->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + radmasktm->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + Lmasktmshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + } else { + exp->set_tooltip_text(""); + estop->set_tooltip_text(""); + rewei->set_tooltip_text(""); + sensitm->set_tooltip_text(""); + expmasktm->set_tooltip_text(""); + CCmasktmshape->setTooltip(""); + LLmasktmshape->setTooltip(""); + HHmasktmshape->setTooltip(""); + lapmasktm->set_tooltip_text(""); + radmasktm->set_tooltip_text(""); + Lmasktmshape->setTooltip(""); + } +} + void LocallabTone::setDefaultExpanderVisibility() { expmasktm->set_expanded(false); @@ -737,7 +712,6 @@ LocallabRetinex::LocallabRetinex(): LocallabTool(this, M("TP_LOCALLAB_RET_TOOLNAME"), M("TP_LOCALLAB_RETI"), true), // Retinex specific widgets - dehaFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_DEHAFRA")))), dehaz(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEHAZ"), -100, 100, 1, 0))), depth(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEPTH"), 0, 100, 1, 25))), lumonly(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LUMONLY")))), @@ -746,7 +720,6 @@ LocallabRetinex::LocallabRetinex(): loglin(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LOGLIN")))), sensih(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIH"), 0, 100, 1, 60))), retitoolFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RETITOOLFRA")))), - retiBox(Gtk::manage(new ToolParamBlock())), retinexMethod(Gtk::manage(new MyComboBoxText())), fftwreti(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTW")))), equilret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))), @@ -769,7 +742,6 @@ LocallabRetinex::LocallabRetinex(): LocalcurveEditorgainT(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_TRANSMISSIONGAIN"))), cTgainshape(static_cast(LocalcurveEditorgainT->addCurve(CT_Flat, "", nullptr, false, false))), expmaskreti(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_SHOWR")))), - maskretiBox(Gtk::manage(new ToolParamBlock())), showmaskretiMethod(Gtk::manage(new MyComboBoxText())), enaretiMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ENABLE_MASK")))), enaretiMasktmap(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TM_MASK")))), @@ -787,17 +759,10 @@ LocallabRetinex::LocallabRetinex(): Lmaskretishape(static_cast(mask2retiCurveEditorG->addCurve(CT_Diagonal, "L(L)"))), inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))) { - const bool showtooltip = options.showtooltip; - const LocallabParams::LocallabSpot defSpot; // Parameter Retinex specific widgets - dehaFrame->set_label_align(0.025, 0.5); - - if (showtooltip) { - dehaz->set_tooltip_text(M("TP_LOCALLAB_DEHAZ_TOOLTIP")); - } - + dehaz->set_tooltip_text(M("TP_LOCALLAB_DEHAZ_TOOLTIP")); dehaz->setAdjusterListener(this); depth->setAdjusterListener(this); @@ -810,10 +775,6 @@ LocallabRetinex::LocallabRetinex(): loglinConn = loglin->signal_toggled().connect(sigc::mem_fun(*this, &LocallabRetinex::loglinChanged)); - if (showtooltip) { - sensih->set_tooltip_text(M("TP_LOCALLAB_SENSIH_TOOLTIP")); - } - sensih->setAdjusterListener(this); retitoolFrame->set_label_align(0.025, 0.5); @@ -822,31 +783,15 @@ LocallabRetinex::LocallabRetinex(): retinexMethod->append(M("TP_RETINEX_UNIFORM")); retinexMethod->append(M("TP_RETINEX_HIGH")); retinexMethod->set_active(0); - - if (showtooltip) { - retinexMethod->set_tooltip_markup(M("TP_LOCRETI_METHOD_TOOLTIP")); - } - + retinexMethod->set_tooltip_markup(M("TP_LOCRETI_METHOD_TOOLTIP")); retinexMethodConn = retinexMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabRetinex::retinexMethodChanged)); - if (showtooltip) { - fftwreti->set_tooltip_text(M("TP_LOCALLAB_RETI_FFTW_TOOLTIP")); - } - fftwretiConn = fftwreti->signal_toggled().connect(sigc::mem_fun(*this, &LocallabRetinex::fftwretiChanged)); equilretConn = equilret->signal_toggled().connect(sigc::mem_fun(*this, &LocallabRetinex::equilretChanged)); - if (showtooltip) { - neigh->set_tooltip_text(M("TP_LOCALLAB_RETI_NEIGH_VART_TOOLTIP")); - } - neigh->setAdjusterListener(this); - if (showtooltip) { - vart->set_tooltip_text(M("TP_LOCALLAB_RETI_NEIGH_VART_TOOLTIP")); - } - vart->setAdjusterListener(this); scalereti->setAdjusterListener(this); @@ -865,10 +810,6 @@ LocallabRetinex::LocallabRetinex(): cliptm->setAdjusterListener(this); - if (showtooltip) { - softradiusret->set_tooltip_text(M("TP_LOCALLAB_GUIDFILTER_TOOLTIP")); - } - softradiusret->setLogScale(10, -10); softradiusret->setAdjusterListener(this); @@ -877,22 +818,10 @@ LocallabRetinex::LocallabRetinex(): cTtransshape->setIdentityValue(0.); cTtransshape->setResetCurve(FlatCurveType(defSpot.localTtranscurve.at(0)), defSpot.localTtranscurve); - if (showtooltip) { - cTtransshape->setTooltip(M("TP_LOCALLAB_TRANSMISSION_TOOLTIP")); - } - LocalcurveEditortransT->curveListComplete(); - if (showtooltip) { - mMLabels->set_tooltip_markup(M("TP_LOCALLAB_MLABEL_TOOLTIP")); - } - setExpandAlignProperties(mMLabels, true, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); - if (showtooltip) { - transLabels->set_tooltip_markup(M("TP_LOCALLAB_TLABEL_TOOLTIP")); - } - setExpandAlignProperties(transLabels, true, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); setExpandAlignProperties(transLabels2, true, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); @@ -902,16 +831,8 @@ LocallabRetinex::LocallabRetinex(): cTgainshape->setIdentityValue(0.); cTgainshape->setResetCurve(FlatCurveType(defSpot.localTgaincurve.at(0)), defSpot.localTgaincurve); - if (showtooltip) { - cTgainshape->setTooltip(M("TP_RETINEX_GAINTRANSMISSION_TOOLTIP")); - } - LocalcurveEditorgainT->curveListComplete(); - if (showtooltip) { - expmaskreti->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); - } - setExpandAlignProperties(expmaskreti, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); showmaskretiMethod->append(M("TP_LOCALLAB_SHOWMNONE")); @@ -920,48 +841,25 @@ LocallabRetinex::LocallabRetinex(): showmaskretiMethod->append(M("TP_LOCALLAB_SHOWMASK")); showmaskretiMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmaskretiMethod->set_active(0); - - if (showtooltip) { - showmaskretiMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskretiMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskretiMethodConn = showmaskretiMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabRetinex::showmaskretiMethodChanged)); enaretiMaskConn = enaretiMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabRetinex::enaretiMaskChanged)); - if (showtooltip) { - enaretiMasktmap->set_tooltip_markup(M("TP_LOCALLAB_ENARETIMASKTMAP_TOOLTIP")); - } - enaretiMasktmapConn = enaretiMasktmap->signal_toggled().connect(sigc::mem_fun(*this, &LocallabRetinex::enaretiMasktmapChanged)); maskretiCurveEditorG->setCurveListener(this); CCmaskretishape->setIdentityValue(0.); CCmaskretishape->setResetCurve(FlatCurveType(defSpot.CCmaskreticurve.at(0)), defSpot.CCmaskreticurve); - - if (showtooltip) { - CCmaskretishape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - CCmaskretishape->setBottomBarColorProvider(this, 1); LLmaskretishape->setIdentityValue(0.); LLmaskretishape->setResetCurve(FlatCurveType(defSpot.LLmaskreticurve.at(0)), defSpot.LLmaskreticurve); - - if (showtooltip) { - LLmaskretishape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - LLmaskretishape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); HHmaskretishape->setIdentityValue(0.); HHmaskretishape->setResetCurve(FlatCurveType(defSpot.HHmaskreticurve.at(0)), defSpot.HHmaskreticurve); - - if (showtooltip) { - HHmaskretishape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmaskretishape->setCurveColorProvider(this, 2); HHmaskretishape->setBottomBarColorProvider(this, 2); @@ -969,16 +867,8 @@ LocallabRetinex::LocallabRetinex(): blendmaskreti->setAdjusterListener(this); - if (showtooltip) { - radmaskreti->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - radmaskreti->setAdjusterListener(this); - if (showtooltip) { - lapmaskreti->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - lapmaskreti->setAdjusterListener(this); chromaskreti->setAdjusterListener(this); @@ -990,11 +880,6 @@ LocallabRetinex::LocallabRetinex(): mask2retiCurveEditorG->setCurveListener(this); Lmaskretishape->setResetCurve(DiagonalCurveType(defSpot.Lmaskreticurve.at(0)), defSpot.Lmaskreticurve); - - if (showtooltip) { - Lmaskretishape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); - } - Lmaskretishape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); Lmaskretishape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); @@ -1004,6 +889,8 @@ LocallabRetinex::LocallabRetinex(): // Add Retinex specific widgets to GUI ToolParamBlock* const auxBox = Gtk::manage(new ToolParamBlock()); + Gtk::Frame* const dehaFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_DEHAFRA"))); + dehaFrame->set_label_align(0.025, 0.5); ToolParamBlock* const dehaBox = Gtk::manage(new ToolParamBlock()); dehaBox->pack_start(*dehaz); dehaBox->pack_start(*depth); @@ -1019,6 +906,7 @@ LocallabRetinex::LocallabRetinex(): scopeBox->pack_start(*sensih); auxBox->add(*scopeBox); pack_start(*auxBox); + ToolParamBlock* const retiBox = Gtk::manage(new ToolParamBlock()); retiBox->pack_start(*retinexMethod); retiBox->pack_start(*fftwreti); retiBox->pack_start(*equilret); @@ -1040,6 +928,7 @@ LocallabRetinex::LocallabRetinex(): toolretiBox->pack_start(*LocalcurveEditorgainT, Gtk::PACK_SHRINK, 4); expretitools->add(*toolretiBox, false); retiBox->pack_start(*expretitools, false, false); + ToolParamBlock* const maskretiBox = Gtk::manage(new ToolParamBlock()); maskretiBox->pack_start(*showmaskretiMethod, Gtk::PACK_SHRINK, 4); maskretiBox->pack_start(*enaretiMask, Gtk::PACK_SHRINK, 0); maskretiBox->pack_start(*enaretiMasktmap, Gtk::PACK_SHRINK, 0); @@ -1107,6 +996,47 @@ void LocallabRetinex::getMaskView(int &colorMask, int &colorMaskinv, int &expMas retiMask = showmaskretiMethod->get_active_row_number(); } +void LocallabRetinex::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + sensih->set_tooltip_text(M("TP_LOCALLAB_SENSIH_TOOLTIP")); + fftwreti->set_tooltip_text(M("TP_LOCALLAB_RETI_FFTW_TOOLTIP")); + neigh->set_tooltip_text(M("TP_LOCALLAB_RETI_NEIGH_VART_TOOLTIP")); + vart->set_tooltip_text(M("TP_LOCALLAB_RETI_NEIGH_VART_TOOLTIP")); + softradiusret->set_tooltip_text(M("TP_LOCALLAB_GUIDFILTER_TOOLTIP")); + cTtransshape->setTooltip(M("TP_LOCALLAB_TRANSMISSION_TOOLTIP")); + mMLabels->set_tooltip_markup(M("TP_LOCALLAB_MLABEL_TOOLTIP")); + transLabels->set_tooltip_markup(M("TP_LOCALLAB_TLABEL_TOOLTIP")); + cTgainshape->setTooltip(M("TP_RETINEX_GAINTRANSMISSION_TOOLTIP")); + expmaskreti->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + enaretiMasktmap->set_tooltip_markup(M("TP_LOCALLAB_ENARETIMASKTMAP_TOOLTIP")); + CCmaskretishape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmaskretishape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmaskretishape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + radmaskreti->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + lapmaskreti->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + Lmaskretishape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + } else { + sensih->set_tooltip_text(""); + fftwreti->set_tooltip_text(""); + neigh->set_tooltip_text(""); + vart->set_tooltip_text(""); + softradiusret->set_tooltip_text(""); + cTtransshape->setTooltip(""); + mMLabels->set_tooltip_text(""); + transLabels->set_tooltip_text(""); + cTgainshape->setTooltip(""); + expmaskreti->set_tooltip_text(""); + enaretiMasktmap->set_tooltip_text(""); + CCmaskretishape->setTooltip(""); + LLmaskretishape->setTooltip(""); + HHmaskretishape->setTooltip(""); + radmaskreti->set_tooltip_text(""); + lapmaskreti->set_tooltip_text(""); + Lmaskretishape->setTooltip(""); + } +} + void LocallabRetinex::setDefaultExpanderVisibility() { expretitools->set_expanded(false); @@ -1754,16 +1684,9 @@ LocallabSharp::LocallabSharp(): sharblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARBLUR"), 0.2, 2.0, 0.05, 0.2))), sensisha(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))), inverssha(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))), - sharFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHARFRAME")))), showmasksharMethod(Gtk::manage(new MyComboBoxText())) { - const bool showtooltip = options.showtooltip; - // Parameter Sharpening specific widgets - if (showtooltip) { - exp->set_tooltip_text(M("TP_LOCALLAB_EXPSHARP_TOOLTIP")); - } - sharcontrast->setAdjusterListener(this); sharradius->setAdjusterListener(this); @@ -1776,25 +1699,15 @@ LocallabSharp::LocallabSharp(): sharblur->setAdjusterListener(this); - if (showtooltip) { - sensisha->set_tooltip_text(M("TP_LOCALLAB_SENSIS_TOOLTIP")); - } - sensisha->setAdjusterListener(this); inversshaConn = inverssha->signal_toggled().connect(sigc::mem_fun(*this, &LocallabSharp::inversshaChanged)); - sharFrame->set_label_align(0.025, 0.5); - showmasksharMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmasksharMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmasksharMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmasksharMethod->set_active(0); - - if (showtooltip) { - showmasksharMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmasksharMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmasksharMethodConn = showmasksharMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabSharp::showmasksharMethodChanged)); // Add Sharpening specific widgets to GUI @@ -1806,6 +1719,8 @@ LocallabSharp::LocallabSharp(): pack_start(*sharblur); pack_start(*sensisha); pack_start(*inverssha); + Gtk::Frame* const sharFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHARFRAME"))); + sharFrame->set_label_align(0.025, 0.5); ToolParamBlock* const sharfBox = Gtk::manage(new ToolParamBlock()); sharfBox->pack_start(*showmasksharMethod); sharFrame->add(*sharfBox); @@ -1824,6 +1739,17 @@ void LocallabSharp::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, sharMask = showmasksharMethod->get_active_row_number(); } +void LocallabSharp::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + exp->set_tooltip_text(M("TP_LOCALLAB_EXPSHARP_TOOLTIP")); + sensisha->set_tooltip_text(M("TP_LOCALLAB_SENSIS_TOOLTIP")); + } else { + exp->set_tooltip_text(""); + sensisha->set_tooltip_text(""); + } +} + void LocallabSharp::disableListener() { LocallabTool::disableListener(); @@ -2065,7 +1991,6 @@ LocallabContrast::LocallabContrast(): expresidpyr(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::HBox())))), residcont(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCONT"), -100, 100, 1, 0))), residchro(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCHRO"), -100., 100., 1., 0.))), - shresFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHRESFRA")))), residsha(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDSHA"), -100., 100., 1., 0.))), residshathr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDSHATHR"), 0., 100., 1., 30.))), residhi(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDHI"), -100., 100., 1., 0.))), @@ -2077,14 +2002,11 @@ LocallabContrast::LocallabContrast(): clarisoft(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), -10.0, 1000.0, 0.5, 1.))), origlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ORIGLC")))), expcontrastpyr(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::HBox())))), - gradwavFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADWAVFRA")))), wavgradl(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_GRALWFRA")))), sigmalc2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))), strwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4.0, 4.0, 0.05, 0.))), angwav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))), - edgFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_EDGSHARPFRA")))), wavedg(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EDGFRA")))), - edgsBox(Gtk::manage(new ToolParamBlock())), strengthw(Gtk::manage(new Adjuster(M("TP_WAVELET_EDVAL"), 0., 100.0, 0.5, 0.))), sigmaed(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))), LocalcurveEditorwavedg(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVEDG"))), @@ -2099,9 +2021,7 @@ LocallabContrast::LocallabContrast(): thigw(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECTTHR2"), -10., 100.0, 1., 0.))), edgw(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGESENSI"), 0., 100.0, 1., 60.))), basew(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEAMPLI"), 0., 100.0, 1., 10.))), - labmNP(Gtk::manage(new Gtk::Label(M("TP_WAVELET_NPTYPE") + ":"))), localneiMethod(Gtk::manage(new MyComboBoxText())), - blurlevelFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_BLURLEVELFRA")))), wavblur(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_BLURLEVELFRA")))), levelblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LEVELBLUR"), 0., 100., 0.5, 0.))), sigmabl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))), @@ -2111,21 +2031,18 @@ LocallabContrast::LocallabContrast(): residblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDBLUR"), 0., 100., 0.5, 0.))), blurlc(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_BLURLC")))), expcontrastpyr2(Gtk::manage(new MyExpander(false, Gtk::manage(new Gtk::HBox())))), - contFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CONTFRA")))), wavcont(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_CONTFRA")))), sigma(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))), offset(Gtk::manage(new Adjuster(M("TP_LOCALLAB_OFFSETWAV"), 0.33, 1.66, 0.01, 1., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), chromalev(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMALEV"), 0.1, 5., 0.1, 1.))), LocalcurveEditorwavcon(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVCON"))), wavshapecon(static_cast(LocalcurveEditorwavcon->addCurve(CT_Flat, "", nullptr, false, false))), - compreFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COMPREFRA")))), wavcompre(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_COMPREFRA")))), LocalcurveEditorwavcompre(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVCOMPRE"))), wavshapecompre(static_cast(LocalcurveEditorwavcompre->addCurve(CT_Flat, "", nullptr, false, false))), sigmadr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))), threswav(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESWAV"), 0.9, 2., 0.01, 1.4))), residcomp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCOMP"), -1., 1., 0.01, 0.))), - compFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COMPFRA")))), wavcomp(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_COMPFRA")))), sigmadc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 3., 0.01, 1.))), deltad(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DELTAD"), -3., 3., 0.1, 0.))),//, Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), @@ -2146,15 +2063,9 @@ LocallabContrast::LocallabContrast(): mask2lcCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), Lmasklcshape(static_cast(mask2lcCurveEditorG->addCurve(CT_Diagonal, "L(L)"))) { - const bool showtooltip = options.showtooltip; - const LocallabParams::LocallabSpot defSpot; // Parameter Local contrast specific widgets - if (showtooltip) { - exp->set_tooltip_text(M("TP_LOCALLAB_EXPCONTRAST_TOOLTIP")); - } - localcontMethod->append(M("TP_LOCALLAB_LOCCONT")); localcontMethod->append(M("TP_LOCALLAB_WAVE")); localcontMethod->set_active(0); @@ -2177,10 +2088,6 @@ LocallabContrast::LocallabContrast(): LocalcurveEditorwav->curveListComplete(); - if (showtooltip) { - levelwav->set_tooltip_markup(M("TP_LOCALLAB_LEVELWAV_TOOLTIP")); - } - levelwav->setAdjusterListener(this); csThreshold->setAdjusterListener(this); @@ -2197,8 +2104,6 @@ LocallabContrast::LocallabContrast(): residchro->setAdjusterListener(this); - shresFrame->set_label_align(0.025, 0.5); - residsha->setAdjusterListener(this); residshathr->setAdjusterListener(this); @@ -2209,20 +2114,12 @@ LocallabContrast::LocallabContrast(): sensilc->setAdjusterListener(this); - if (showtooltip) { - clariFrame->set_tooltip_markup(M("TP_LOCALLAB_CLARI_TOOLTIP")); - } - clariFrame->set_label_align(0.025, 0.5); clarilres->setAdjusterListener(this); claricres->setAdjusterListener(this); - if (showtooltip) { - clarisoft->set_tooltip_markup(M("TP_LOCALLAB_CLARISOFT_TOOLTIP")); - } - clarisoft->setLogScale(10, -10); clarisoft->setAdjusterListener(this); @@ -2236,8 +2133,6 @@ LocallabContrast::LocallabContrast(): expcontrastpyr->setLabel(LCTitleHBox); setExpandAlignProperties(expcontrastpyr, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - gradwavFrame->set_label_align(0.025, 0.5); - wavgradlConn = wavgradl->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavgradlChanged)); sigmalc2->setAdjusterListener(this); @@ -2246,12 +2141,6 @@ LocallabContrast::LocallabContrast(): angwav->setAdjusterListener(this); - edgFrame->set_label_align(0.025, 0.5); - - if (showtooltip) { - wavedg->set_tooltip_text(M("TP_LOCALLAB_WAVEEDG_TOOLTIP")); - } - wavedgConn = wavedg->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavedgChanged)); strengthw->setAdjusterListener(this); @@ -2293,8 +2182,6 @@ LocallabContrast::LocallabContrast(): localneiMethod->set_active(0); localneiMethodConn = localneiMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabContrast::localneiMethodChanged)); - blurlevelFrame->set_label_align(0.025, 0.5); - wavblurConn = wavblur->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavblurChanged)); levelblur->setAdjusterListener(this); @@ -2322,8 +2209,6 @@ LocallabContrast::LocallabContrast(): expcontrastpyr2->setLabel(LCTitleHBox2); setExpandAlignProperties(expcontrastpyr2, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - contFrame->set_label_align(0.025, 0.5); - wavcontConn = wavcont->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavcontChanged)); sigma->setAdjusterListener(this); @@ -2332,11 +2217,6 @@ LocallabContrast::LocallabContrast(): chromalev->setAdjusterListener(this); - if (showtooltip) { - chromalev->set_tooltip_text(M("TP_LOCALLAB_CHROMABLU_TOOLTIP")); - chromablu->set_tooltip_text(M("TP_LOCALLAB_CHROMABLU_TOOLTIP")); - } - LocalcurveEditorwavcon->setCurveListener(this); wavshapecon->setIdentityValue(0.); @@ -2344,18 +2224,13 @@ LocallabContrast::LocallabContrast(): LocalcurveEditorwavcon->curveListComplete(); - compreFrame->set_label_align(0.025, 0.5); - wavcompreConn = wavcompre->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavcompreChanged)); LocalcurveEditorwavcompre->setCurveListener(this); wavshapecompre->setIdentityValue(0.); wavshapecompre->setResetCurve(FlatCurveType(defSpot.loccomprewavcurve.at(0)), defSpot.loccomprewavcurve); - - if (showtooltip) { - wavshapecompre->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); - } + wavshapecompre->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); LocalcurveEditorwavcompre->curveListComplete(); @@ -2365,8 +2240,6 @@ LocallabContrast::LocallabContrast(): residcomp->setAdjusterListener(this); - compFrame->set_label_align(0.025, 0.5); - wavcompConn = wavcomp->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavcompChanged)); sigmadc->setAdjusterListener(this); @@ -2383,16 +2256,8 @@ LocallabContrast::LocallabContrast(): fatres->setAdjusterListener(this); - if (showtooltip) { - fftwlc->set_tooltip_text(M("TP_LOCALLAB_LC_FFTW_TOOLTIP")); - } - fftwlcConn = fftwlc->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::fftwlcChanged)); - if (showtooltip) { - expmasklc->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); - } - setExpandAlignProperties(expmasklc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); showmasklcMethod->append(M("TP_LOCALLAB_SHOWMNONE")); @@ -2401,11 +2266,7 @@ LocallabContrast::LocallabContrast(): showmasklcMethod->append(M("TP_LOCALLAB_SHOWMASK")); showmasklcMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmasklcMethod->set_active(0); - - if (showtooltip) { - showmasklcMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmasklcMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmasklcMethodConn = showmasklcMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabContrast::showmasklcMethodChanged)); enalcMaskConn = enalcMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::enalcMaskChanged)); @@ -2414,29 +2275,14 @@ LocallabContrast::LocallabContrast(): CCmasklcshape->setIdentityValue(0.); CCmasklcshape->setResetCurve(FlatCurveType(defSpot.CCmasklccurve.at(0)), defSpot.CCmasklccurve); - - if (showtooltip) { - CCmasklcshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - CCmasklcshape->setBottomBarColorProvider(this, 1); LLmasklcshape->setIdentityValue(0.); LLmasklcshape->setResetCurve(FlatCurveType(defSpot.LLmasklccurve.at(0)), defSpot.LLmasklccurve); - - if (showtooltip) { - LLmasklcshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - LLmasklcshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); HHmasklcshape->setIdentityValue(0.); HHmasklcshape->setResetCurve(FlatCurveType(defSpot.HHmasklccurve.at(0)), defSpot.HHmasklccurve); - - if (showtooltip) { - HHmasklcshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmasklcshape->setCurveColorProvider(this, 2); HHmasklcshape->setBottomBarColorProvider(this, 2); @@ -2452,11 +2298,6 @@ LocallabContrast::LocallabContrast(): mask2lcCurveEditorG->setCurveListener(this); Lmasklcshape->setResetCurve(DiagonalCurveType(defSpot.Lmasklccurve.at(0)), defSpot.Lmasklccurve); - - if (showtooltip) { - Lmasklcshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); - } - Lmasklcshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); Lmasklcshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); @@ -2472,6 +2313,8 @@ LocallabContrast::LocallabContrast(): pack_start(*LocalcurveEditorwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor // pack_start(*levelwav); pack_start(*csThreshold); + Gtk::Frame* const shresFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_SHRESFRA"))); + shresFrame->set_label_align(0.025, 0.5); ToolParamBlock* const resiBox = Gtk::manage(new ToolParamBlock()); resiBox->pack_start(*residcont); resiBox->pack_start(*residchro); @@ -2495,6 +2338,8 @@ LocallabContrast::LocallabContrast(): clariFrame->add(*clariBox); pack_start(*clariFrame); ToolParamBlock* const blurcontBox = Gtk::manage(new ToolParamBlock()); + Gtk::Frame* const gradwavFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADWAVFRA"))); + gradwavFrame->set_label_align(0.025, 0.5); gradwavFrame->set_label_widget(*wavgradl); ToolParamBlock* const gradwavBox = Gtk::manage(new ToolParamBlock()); gradwavBox->pack_start(*sigmalc2); @@ -2502,7 +2347,10 @@ LocallabContrast::LocallabContrast(): gradwavBox->pack_start(*angwav); gradwavFrame->add(*gradwavBox); blurcontBox->pack_start(*gradwavFrame); + Gtk::Frame* const edgFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_EDGSHARPFRA"))); + edgFrame->set_label_align(0.025, 0.5); edgFrame->set_label_widget(*wavedg); + ToolParamBlock* const edgsBox = Gtk::manage(new ToolParamBlock()); edgsBox->pack_start(*strengthw); edgsBox->pack_start(*sigmaed); edgsBox->pack_start(*LocalcurveEditorwavedg, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor @@ -2524,12 +2372,15 @@ LocallabContrast::LocallabContrast(): edgsBoxshow->pack_start(*edgw); edgsBoxshow->pack_start(*basew); Gtk::HBox* const ctboxNP = Gtk::manage(new Gtk::HBox()); + Gtk::Label* const labmNP = Gtk::manage(new Gtk::Label(M("TP_WAVELET_NPTYPE") + ":")); ctboxNP->pack_start(*labmNP, Gtk::PACK_SHRINK, 1); ctboxNP->pack_start(*localneiMethod); edgsBoxshow->pack_start(*ctboxNP); edgsBox->pack_start(*edgsBoxshow); edgFrame->add(*edgsBox); blurcontBox->pack_start(*edgFrame); + Gtk::Frame* const blurlevelFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_BLURLEVELFRA"))); + blurlevelFrame->set_label_align(0.025, 0.5); blurlevelFrame->set_label_widget(*wavblur); Gtk::VBox* const blurlevcontBox = Gtk::manage(new Gtk::VBox()); blurlevcontBox->set_spacing(2); @@ -2546,6 +2397,8 @@ LocallabContrast::LocallabContrast(): expcontrastpyr->add(*blurcontBox, false); pack_start(*expcontrastpyr); ToolParamBlock* const blurcontBox2 = Gtk::manage(new ToolParamBlock()); + Gtk::Frame* const contFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_CONTFRA"))); + contFrame->set_label_align(0.025, 0.5); Gtk::VBox* const contlevBox = Gtk::manage(new Gtk::VBox()); contlevBox->set_spacing(2); contFrame->set_label_widget(*wavcont); @@ -2555,6 +2408,8 @@ LocallabContrast::LocallabContrast(): contlevBox->pack_start(*LocalcurveEditorwavcon, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor contFrame->add(*contlevBox); blurcontBox2->pack_start(*contFrame); + Gtk::Frame* const compreFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COMPREFRA"))); + compreFrame->set_label_align(0.025, 0.5); Gtk::VBox* const compreBox = Gtk::manage(new Gtk::VBox()); compreBox->set_spacing(2); compreFrame->set_label_widget(*wavcompre); @@ -2564,6 +2419,8 @@ LocallabContrast::LocallabContrast(): compreBox->pack_start(*residcomp); compreFrame->add(*compreBox); blurcontBox2->pack_start(*compreFrame); + Gtk::Frame* const compFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COMPFRA"))); + compFrame->set_label_align(0.025, 0.5); Gtk::VBox* const compBox = Gtk::manage(new Gtk::VBox()); compBox->set_spacing(2); compFrame->set_label_widget(*wavcomp); @@ -2614,6 +2471,39 @@ void LocallabContrast::getMaskView(int &colorMask, int &colorMaskinv, int &expMa lcMask = showmasklcMethod->get_active_row_number(); } +void LocallabContrast::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + exp->set_tooltip_text(M("TP_LOCALLAB_EXPCONTRAST_TOOLTIP")); + levelwav->set_tooltip_markup(M("TP_LOCALLAB_LEVELWAV_TOOLTIP")); + clariFrame->set_tooltip_markup(M("TP_LOCALLAB_CLARI_TOOLTIP")); + clarisoft->set_tooltip_markup(M("TP_LOCALLAB_CLARISOFT_TOOLTIP")); + wavedg->set_tooltip_text(M("TP_LOCALLAB_WAVEEDG_TOOLTIP")); + chromablu->set_tooltip_text(M("TP_LOCALLAB_CHROMABLU_TOOLTIP")); + chromalev->set_tooltip_text(M("TP_LOCALLAB_CHROMABLU_TOOLTIP")); + fftwlc->set_tooltip_text(M("TP_LOCALLAB_LC_FFTW_TOOLTIP")); + expmasklc->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + CCmasklcshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmasklcshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmasklcshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + Lmasklcshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + } else { + exp->set_tooltip_text(""); + levelwav->set_tooltip_text(""); + clariFrame->set_tooltip_text(""); + clarisoft->set_tooltip_text(""); + wavedg->set_tooltip_text(""); + chromablu->set_tooltip_text(""); + chromalev->set_tooltip_text(""); + fftwlc->set_tooltip_text(""); + expmasklc->set_tooltip_text(""); + CCmasklcshape->setTooltip(""); + LLmasklcshape->setTooltip(""); + HHmasklcshape->setTooltip(""); + Lmasklcshape->setTooltip(""); + } +} + void LocallabContrast::setDefaultExpanderVisibility() { expresidpyr->set_expanded(false); @@ -3725,7 +3615,6 @@ LocallabCBDL::LocallabCBDL(): chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0., 1.5, 0.01, 0.))), threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))), blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0., 100., 0.1, 0.))), - residFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID")))), clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.1, 100., 0.1, 0.1))), contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), -10.0, 1000.0, 0.5, 0.))), @@ -3750,31 +3639,19 @@ LocallabCBDL::LocallabCBDL(): lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))), lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))) { - const bool showtooltip = options.showtooltip; - const LocallabParams::LocallabSpot defSpot; // Parameter CBDL specific widgets - if (showtooltip) { - exp->set_tooltip_text(M("TP_LOCALLAB_EXPCBDL_TOOLTIP")); - } - for (const auto adj : multiplier) { adj->setAdjusterListener(this); } - if (showtooltip) { - chromacbdl->set_tooltip_text(M("TP_LOCALLAB_CHROMACB_TOOLTIP")); - } - chromacbdl->setAdjusterListener(this); threshold->setAdjusterListener(this); blurcbdl->setAdjusterListener(this); - residFrame->set_label_align(0.025, 0.5); - clarityml->setAdjusterListener(this); contresid->setAdjusterListener(this); @@ -3782,27 +3659,15 @@ LocallabCBDL::LocallabCBDL(): softradiuscb->setLogScale(10, -10); softradiuscb->setAdjusterListener(this); - if (showtooltip) { - sensicb->set_tooltip_text(M("TP_LOCALLAB_SENSIH_TOOLTIP")); - } - sensicb->setAdjusterListener(this); - if (showtooltip) { - expmaskcb->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); - } - showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMNONE")); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIF")); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMODIFMASK")); showmaskcbMethod->append(M("TP_LOCALLAB_SHOWMASK")); showmaskcbMethod->append(M("TP_LOCALLAB_PREVIEWSEL")); showmaskcbMethod->set_active(0); - - if (showtooltip) { - showmaskcbMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); - } - + showmaskcbMethod->set_tooltip_markup(M("TP_LOCALLAB_SHOWMASKCOL_TOOLTIP")); showmaskcbMethodConn = showmaskcbMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabCBDL::showmaskcbMethodChanged)); enacbMaskConn = enacbMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabCBDL::enacbMaskChanged)); @@ -3811,29 +3676,14 @@ LocallabCBDL::LocallabCBDL(): CCmaskcbshape->setIdentityValue(0.); CCmaskcbshape->setResetCurve(FlatCurveType(defSpot.CCmaskcbcurve.at(0)), defSpot.CCmaskcbcurve); - - if (showtooltip) { - CCmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - CCmaskcbshape->setBottomBarColorProvider(this, 1); LLmaskcbshape->setIdentityValue(0.); LLmaskcbshape->setResetCurve(FlatCurveType(defSpot.LLmaskcbcurve.at(0)), defSpot.LLmaskcbcurve); - - if (showtooltip) { - LLmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - LLmaskcbshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); HHmaskcbshape->setIdentityValue(0.); HHmaskcbshape->setResetCurve(FlatCurveType(defSpot.HHmaskcbcurve.at(0)), defSpot.HHmaskcbcurve); - - if (showtooltip) { - HHmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); - } - HHmaskcbshape->setCurveColorProvider(this, 2); HHmaskcbshape->setBottomBarColorProvider(this, 2); @@ -3841,17 +3691,9 @@ LocallabCBDL::LocallabCBDL(): blendmaskcb->setAdjusterListener(this); - if (showtooltip) { - radmaskcb->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - radmaskcb->setLogScale(10, -10); radmaskcb->setAdjusterListener(this); - if (showtooltip) { - lapmaskcb->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); - } - lapmaskcb->setAdjusterListener(this); chromaskcb->setAdjusterListener(this); @@ -3863,11 +3705,6 @@ LocallabCBDL::LocallabCBDL(): mask2cbCurveEditorG->setCurveListener(this); Lmaskcbshape->setResetCurve(DiagonalCurveType(defSpot.Lmaskcbcurve.at(0)), defSpot.Lmaskcbcurve); - - if (showtooltip) { - Lmaskcbshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); - } - Lmaskcbshape->setBottomBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); Lmaskcbshape->setLeftBarBgGradient({{0., 0., 0., 0.}, {1., 1., 1., 1.}}); @@ -3895,6 +3732,8 @@ LocallabCBDL::LocallabCBDL(): pack_start(*chromacbdl); pack_start(*threshold); // pack_start(*blurcbdl); + Gtk::Frame* const residFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID"))); + residFrame->set_label_align(0.025, 0.5); ToolParamBlock* const residBox = Gtk::manage(new ToolParamBlock()); residBox->pack_start(*clarityml); residBox->pack_start(*contresid); @@ -3935,6 +3774,33 @@ void LocallabCBDL::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, cbMask = showmaskcbMethod->get_active_row_number(); } +void LocallabCBDL::updateAdviceTooltips(const bool showTooltips) +{ + if (showTooltips) { + exp->set_tooltip_text(M("TP_LOCALLAB_EXPCBDL_TOOLTIP")); + chromacbdl->set_tooltip_text(M("TP_LOCALLAB_CHROMACB_TOOLTIP")); + sensicb->set_tooltip_text(M("TP_LOCALLAB_SENSIH_TOOLTIP")); + expmaskcb->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); + CCmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + LLmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + HHmaskcbshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); + radmaskcb->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + lapmaskcb->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); + Lmaskcbshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + } else { + exp->set_tooltip_text(""); + chromacbdl->set_tooltip_text(""); + sensicb->set_tooltip_text(""); + expmaskcb->set_tooltip_text(""); + CCmaskcbshape->setTooltip(""); + LLmaskcbshape->setTooltip(""); + HHmaskcbshape->setTooltip(""); + radmaskcb->set_tooltip_text(""); + lapmaskcb->set_tooltip_text(""); + Lmaskcbshape->setTooltip(""); + } +} + void LocallabCBDL::setDefaultExpanderVisibility() { expmaskcb->set_expanded(false); @@ -4345,25 +4211,20 @@ LocallabLog::LocallabLog(): LocallabTool(this, M("TP_LOCALLAB_LOG_TOOLNAME"), M("TP_LOCALLAB_LOG"), false, false), // Log encoding specific widgets - logPFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGPFRA")))), autocompute(Gtk::manage(new Gtk::ToggleButton(M("TP_LOCALLAB_LOGAUTO")))), blackEv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLACK_EV"), -16.0, 0.0, 0.1, -5.0))), whiteEv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_WHITE_EV"), 0.0, 32.0, 0.1, 10.0))), fullimage(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FULLIMAGE")))), - logFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGFRA")))), Autogray(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AUTOGRAY")))), sourceGray(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOURCE_GRAY"), 1.0, 100.0, 0.1, 10.0))), targetGray(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TARGET_GRAY"), 5.0, 80.0, 0.1, 18.0))), detail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAIL"), 0., 1., 0.01, 0.6))), baselog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BASELOG"), 1.3, 8., 0.05, 2., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), sensilog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSILOG"), 0, 100, 1, 50))), - gradlogFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADLOGFRA")))), strlog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -2.0, 2.0, 0.05, 0.))), anglog(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))) { // Parameter Log encoding specific widgets - logPFrame->set_label_align(0.025, 0.5); - autoconn = autocompute->signal_toggled().connect(sigc::mem_fun(*this, &LocallabLog::autocomputeToggled)); blackEv->setLogScale(2, -8); @@ -4374,8 +4235,6 @@ LocallabLog::LocallabLog(): fullimageConn = fullimage->signal_toggled().connect(sigc::mem_fun(*this, &LocallabLog::fullimageChanged)); - logFrame->set_label_align(0.025, 0.5); - AutograyConn = Autogray->signal_toggled().connect(sigc::mem_fun(*this, &LocallabLog::AutograyChanged)); sourceGray->setAdjusterListener(this); @@ -4388,13 +4247,13 @@ LocallabLog::LocallabLog(): sensilog->setAdjusterListener(this); - gradlogFrame->set_label_align(0.025, 0.5); - strlog->setAdjusterListener(this); anglog->setAdjusterListener(this); - // Add Log encoding specific widgets to HUI + // Add Log encoding specific widgets to GUI + Gtk::Frame* const logPFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGPFRA"))); + logPFrame->set_label_align(0.025, 0.5); ToolParamBlock* const logPBox = Gtk::manage(new ToolParamBlock()); logPBox->pack_start(*autocompute); logPBox->pack_start(*blackEv); @@ -4402,6 +4261,8 @@ LocallabLog::LocallabLog(): logPBox->pack_start(*fullimage); logPFrame->add(*logPBox); pack_start(*logPFrame); + Gtk::Frame* const logFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGFRA"))); + logFrame->set_label_align(0.025, 0.5); ToolParamBlock* const logFBox = Gtk::manage(new ToolParamBlock()); logFBox->pack_start(*Autogray); logFBox->pack_start(*sourceGray); @@ -4411,6 +4272,8 @@ LocallabLog::LocallabLog(): pack_start(*detail); pack_start(*baselog); pack_start(*sensilog); + Gtk::Frame* const gradlogFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GRADLOGFRA"))); + gradlogFrame->set_label_align(0.025, 0.5); ToolParamBlock* const gradlogBox = Gtk::manage(new ToolParamBlock()); gradlogBox->pack_start(*strlog); gradlogBox->pack_start(*anglog); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index fa3165110..43aa2f7d7 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -2428,8 +2428,6 @@ void Preferences::workflowUpdate() parent->updateShowtooltipVisibility(moptions.showtooltip); } - moptions.showtooltip = ckbshowtooltiplocallab->get_active(); - if (moptions.histogramPosition != options.histogramPosition) { // Update the position of the Histogram parent->updateHistogramPosition(options.histogramPosition, moptions.histogramPosition); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 9163a1162..c1b777767 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -1098,7 +1098,7 @@ void RTWindow::updateFBToolBarVisibility (bool showFilmStripToolBar) void RTWindow::updateShowtooltipVisibility (bool showtooltip) { - fpanel->fileCatalog->updateShowtooltipVisibility (showtooltip); + epanel->updateShowtooltipVisibility (showtooltip); } void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index a2a297042..1f7e1d3b5 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -826,6 +826,12 @@ void ToolPanelCoordinator::writeToolExpandedStatus(std::vector &tpOpen) } +void ToolPanelCoordinator::updateShowtooltipVisibility (bool showtooltip) +{ + locallab->updateShowtooltipVisibility(showtooltip); +} + + void ToolPanelCoordinator::spotWBselected(int x, int y, Thumbnail* thm) { if (!ipc) { diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index 741883454..190da818b 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -281,7 +281,7 @@ public: void readOptions(); void writeOptions(); void writeToolExpandedStatus(std::vector &tpOpen); - + void updateShowtooltipVisibility (bool showtooltip); // wbprovider interface void getAutoWB (double& temp, double& green, double equal, double tempBias) override