Improves Locallab tools advice tooltips management

Other:
- GUI widgets cleanup
This commit is contained in:
Pandagrapher 2020-05-08 12:34:10 +02:00
parent aa41870346
commit bb95dd7a1b
14 changed files with 448 additions and 802 deletions

View File

@ -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

View File

@ -957,6 +957,13 @@ void EditorPanel::writeToolExpandedStatus (std::vector<int> &tpOpen)
}
}
void EditorPanel::updateShowtooltipVisibility (bool showtooltip)
{
if (tpc) {
tpc->updateShowtooltipVisibility (showtooltip);
}
}
void EditorPanel::showTopPanel (bool show)
{
if (tbTopPanel_1->get_active() != show) {

View File

@ -79,6 +79,7 @@ public:
void writeOptions();
void writeToolExpandedStatus (std::vector<int> &tpOpen);
void updateShowtooltipVisibility (bool showtooltip);
void showTopPanel (bool show);
bool isRealized()

View File

@ -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) {

View File

@ -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);

View File

@ -20,11 +20,15 @@
* 2019 Pierre Cabrera <pierre.cab@gmail.com>
*/
#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);

View File

@ -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);

File diff suppressed because it is too large Load Diff

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -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);

View File

@ -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)

View File

@ -826,6 +826,12 @@ void ToolPanelCoordinator::writeToolExpandedStatus(std::vector<int> &tpOpen)
}
void ToolPanelCoordinator::updateShowtooltipVisibility (bool showtooltip)
{
locallab->updateShowtooltipVisibility(showtooltip);
}
void ToolPanelCoordinator::spotWBselected(int x, int y, Thumbnail* thm)
{
if (!ipc) {

View File

@ -281,7 +281,7 @@ public:
void readOptions();
void writeOptions();
void writeToolExpandedStatus(std::vector<int> &tpOpen);
void updateShowtooltipVisibility (bool showtooltip);
// wbprovider interface
void getAutoWB (double& temp, double& green, double equal, double tempBias) override