From b7fa705580c8fb32abbc90cd4888f41ff543c37b Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 9 Jul 2020 10:26:09 +0200 Subject: [PATCH] Change label CBDL tooltip - simplify GUI tooltip --- rtdata/languages/Francais | 1 + rtdata/languages/default | 1 + rtgui/locallabtools.h | 1 + rtgui/locallabtools2.cc | 112 +++++--------------------------------- 4 files changed, 16 insertions(+), 99 deletions(-) diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index fd255f02a..8b71f05df 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -1993,6 +1993,7 @@ TP_LOCALLAB_LEVELBLUR;Maximum Flouter TP_LOCALLAB_LEVELLOCCONTRAST_TOOLTIP;En abscisse le contraste local (proche du concept de luminance). En ordonnée, amplification ou reduction du contraste local. TP_LOCALLAB_LEVELWAV;Ψ Ondelettes Niveaux TP_LOCALLAB_LEVELWAV_TOOLTIP;Le niveau est automatiquement adapté à la taille du spot et de la prévisualisation.\nDu niveau 9 taille max 512 jusqu'au niveau 1 taille max = 4 +TP_LOCALLAB_LEVFRA;Niveaux TP_LOCALLAB_LIGHTNESS;Luminosité TP_LOCALLAB_LIGHTN_TOOLTIP;En mode inverse: selection = -100 force la luminance à zero TP_LOCALLAB_LIGHTRETI;Luminosité diff --git a/rtdata/languages/default b/rtdata/languages/default index 942958d96..c46cc69be 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2571,6 +2571,7 @@ TP_LOCALLAB_LEVELBLUR;Maximum Blur levels TP_LOCALLAB_LEVELLOCCONTRAST_TOOLTIP;On the abscissa local contrast (near concept luminance). On the ordinate, amplification or reduction local contrast. TP_LOCALLAB_LEVELWAV;Ψ Wavelets Levels TP_LOCALLAB_LEVELWAV_TOOLTIP;The Level is automatically adapted to the size of the spot and the preview.\nFrom level 9 size max 512 to level 1 size max = 4 +TP_LOCALLAB_LEVFRA;Levels TP_LOCALLAB_LIGHTNESS;Lightness TP_LOCALLAB_LIGHTN_TOOLTIP;In inverse mode: selection = -100 force luminance to zero TP_LOCALLAB_LIGHTRETI;Lightness diff --git a/rtgui/locallabtools.h b/rtgui/locallabtools.h index df396af82..5b64e4edb 100644 --- a/rtgui/locallabtools.h +++ b/rtgui/locallabtools.h @@ -1088,6 +1088,7 @@ class LocallabCBDL: { private: const std::array multiplier; + Gtk::Frame* const levFrame; Adjuster* const chromacbdl; Adjuster* const threshold; Adjuster* const blurcbdl; diff --git a/rtgui/locallabtools2.cc b/rtgui/locallabtools2.cc index c5684c090..34d51504b 100644 --- a/rtgui/locallabtools2.cc +++ b/rtgui/locallabtools2.cc @@ -292,21 +292,6 @@ void LocallabTone::updateAdviceTooltips(const bool showTooltips) mask2tmCurveEditorG->set_tooltip_text(M("TP_LOCALLAB_CONTRASTCURVMASK_TOOLTIP")); } else { exp->set_tooltip_text(""); - estop->set_tooltip_text(""); - rewei->set_tooltip_text(""); - scaltm->set_tooltip_text(M("")); - gamma->set_tooltip_text(M("")); - equiltm->set_tooltip_text(M("")); - sensitm->set_tooltip_text(""); - expmasktm->set_tooltip_text(""); - CCmasktmshape->setTooltip(""); - LLmasktmshape->setTooltip(""); - HHmasktmshape->setTooltip(""); - lapmasktm->set_tooltip_text(""); - radmasktm->set_tooltip_text(""); - Lmasktmshape->setTooltip(""); - blendmasktm->set_tooltip_text(M("")); - mask2tmCurveEditorG->set_tooltip_text(M("")); } } @@ -1047,33 +1032,8 @@ void LocallabRetinex::updateAdviceTooltips(const bool showTooltips) blendmaskreti->set_tooltip_text(M("TP_LOCALLAB_BLENDMASK_TOOLTIP")); mask2retiCurveEditorG->set_tooltip_text(M("TP_LOCALLAB_CONTRASTCURVMASK_TOOLTIP")); } else { - sensih->set_tooltip_text(""); - fftwreti->set_tooltip_text(""); - neigh->set_tooltip_text(""); - vart->set_tooltip_text(""); - loglin->set_tooltip_text(M("")); - scalereti->set_tooltip_text(M("")); - limd->set_tooltip_text(M("")); - offs->set_tooltip_text(M("")); - lightnessreti->set_tooltip_text(M("")); - darkness->set_tooltip_text(M("")); - equilret->set_tooltip_text(M("")); - 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(""); - blendmaskreti->set_tooltip_text(M("")); - mask2retiCurveEditorG->set_tooltip_text(M("")); - } + exp->set_tooltip_text(""); + } } void LocallabRetinex::setDefaultExpanderVisibility() @@ -2608,30 +2568,7 @@ void LocallabContrast::updateAdviceTooltips(const bool showTooltips) mask2lcCurveEditorG->set_tooltip_text(M("TP_LOCALLAB_CONTRASTCURVMASK_TOOLTIP")); } else { exp->set_tooltip_text(""); - contFrame->set_tooltip_text(M("")); - levelwav->set_tooltip_text(""); - LocalcurveEditorwav->set_tooltip_markup(M("")); - wavgradl->set_tooltip_text(""); - clariFrame->set_tooltip_text(""); - clarisoft->set_tooltip_text(""); - wavedg->set_tooltip_text(""); - wavblur->set_tooltip_text(M("")); - wavcont->set_tooltip_text(M("")); - wavcompre->set_tooltip_text(M("")); - wavcomp->set_tooltip_text(M("")); - chromablu->set_tooltip_text(""); - chromalev->set_tooltip_text(""); - fftwlc->set_tooltip_text(""); - expmasklc->set_tooltip_text(""); - CCmasklcshape->setTooltip(""); - LLmasklcshape->setTooltip(""); - HHmasklcshape->setTooltip(""); - Lmasklcshape->setTooltip(""); - expcontrastpyr->set_tooltip_text(M("")); - expcontrastpyr2->set_tooltip_text(M("")); - blendmasklc->set_tooltip_text(M("")); - mask2lcCurveEditorG->set_tooltip_text(M("")); - } + } } void LocallabContrast::setDefaultExpanderVisibility() @@ -3744,6 +3681,7 @@ LocallabCBDL::LocallabCBDL(): return res; } ()), + levFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LEVFRA")))), 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.))), @@ -3849,20 +3787,23 @@ LocallabCBDL::LocallabCBDL(): lumacontrastPlusPressedConn = lumacontrastPlusButton->signal_pressed().connect(sigc::mem_fun(*this, &LocallabCBDL::lumacontrastPlusPressed)); // Add CBDL specific widgets to GUI + ToolParamBlock* const levBox = Gtk::manage(new ToolParamBlock()); Gtk::HBox* buttonBox = Gtk::manage(new Gtk::HBox(true, 10)); buttonBox->pack_start(*lumacontrastMinusButton); buttonBox->pack_start(*lumaneutralButton); buttonBox->pack_start(*lumacontrastPlusButton); - pack_start(*buttonBox); + levBox->pack_start(*buttonBox); for (const auto adj : multiplier) { - pack_start(*adj); + levBox->pack_start(*adj); } Gtk::HSeparator* const separator = Gtk::manage(new Gtk::HSeparator()); - pack_start(*separator, Gtk::PACK_SHRINK, 2); - pack_start(*chromacbdl); - pack_start(*threshold); + levBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); + levBox->pack_start(*chromacbdl); + levBox->pack_start(*threshold); + levFrame->add(*levBox); + pack_start(*levFrame); // pack_start(*blurcbdl); Gtk::Frame* const residFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID"))); residFrame->set_label_align(0.025, 0.5); @@ -3915,7 +3856,7 @@ void LocallabCBDL::getMaskView(int &colorMask, int &colorMaskinv, int &expMask, void LocallabCBDL::updateAdviceTooltips(const bool showTooltips) { if (showTooltips) { - exp->set_tooltip_text(M("TP_LOCALLAB_EXPCBDL_TOOLTIP")); + levFrame->set_tooltip_text(M("TP_LOCALLAB_EXPCBDL_TOOLTIP")); for (const auto adj : multiplier) { adj->set_tooltip_text(M("TP_LOCALLAB_CBDL_ADJ_TOOLTIP")); } @@ -3934,22 +3875,6 @@ void LocallabCBDL::updateAdviceTooltips(const bool showTooltips) mask2cbCurveEditorG->set_tooltip_text(M("TP_LOCALLAB_CONTRASTCURVMASK_TOOLTIP")); } else { exp->set_tooltip_text(""); - for (const auto adj : multiplier) { - adj->set_tooltip_text(M("")); - } - threshold->set_tooltip_text(M("")); - chromacbdl->set_tooltip_text(""); - clarityml->set_tooltip_text(M("")); - sensicb->set_tooltip_text(""); - expmaskcb->set_tooltip_text(""); - CCmaskcbshape->setTooltip(""); - LLmaskcbshape->setTooltip(""); - HHmaskcbshape->setTooltip(""); - radmaskcb->set_tooltip_text(""); - lapmaskcb->set_tooltip_text(""); - Lmaskcbshape->setTooltip(""); - blendmaskcb->set_tooltip_text(M("")); - mask2cbCurveEditorG->set_tooltip_text(M("")); } } @@ -4452,17 +4377,6 @@ void LocallabLog::updateAdviceTooltips(const bool showTooltips) anglog->set_tooltip_text(M("TP_LOCALLAB_GRADANG_TOOLTIP")); } else { exp->set_tooltip_text(M("")); - logPFrame->set_tooltip_text(""); - autocompute->set_tooltip_text(M("")); - blackEv->set_tooltip_text(M("")); - whiteEv->set_tooltip_text(M("")); - Autogray->set_tooltip_text(M("")); - sourceGray->set_tooltip_text(M("")); - targetGray->set_tooltip_text(M("")); - detail->set_tooltip_text(M("")); - baselog->set_tooltip_text(M("")); - strlog->set_tooltip_text(M("")); - anglog->set_tooltip_text(M("")); } }