Neutral Levels & tooltips (issue 1161)
This commit is contained in:
parent
815ba5b321
commit
a223ba50ea
@ -354,6 +354,7 @@ HISTORY_MSG_162;Tone Mapping
|
|||||||
HISTORY_MSG_163;RGB Curves - R
|
HISTORY_MSG_163;RGB Curves - R
|
||||||
HISTORY_MSG_164;RGB Curves - G
|
HISTORY_MSG_164;RGB Curves - G
|
||||||
HISTORY_MSG_165;RGB Curves - B
|
HISTORY_MSG_165;RGB Curves - B
|
||||||
|
HISTORY_MSG_166;Neutral levels
|
||||||
HISTORY_NEWSNAPSHOTAS;As...
|
HISTORY_NEWSNAPSHOTAS;As...
|
||||||
HISTORY_NEWSNAPSHOT;Add
|
HISTORY_NEWSNAPSHOT;Add
|
||||||
HISTORY_NEWSSDIALOGLABEL;Label of the snapshot:
|
HISTORY_NEWSSDIALOGLABEL;Label of the snapshot:
|
||||||
@ -835,9 +836,11 @@ TP_EQUALIZER_LARGEST;coarsest
|
|||||||
TP_EQUALIZER_NEUTRAL;Neutral
|
TP_EQUALIZER_NEUTRAL;Neutral
|
||||||
TP_EXPOSCORR_LABEL;Raw white-black point
|
TP_EXPOSCORR_LABEL;Raw white-black point
|
||||||
TP_EXPOSURE_AUTOLEVELS;Auto Levels
|
TP_EXPOSURE_AUTOLEVELS;Auto Levels
|
||||||
|
TP_EXPOSURE_AUTOLEVELS_TIP;Toggle execution of Auto Levels to automatically set parameter values based on image analysis
|
||||||
TP_EXPOSURE_BLACKLEVEL;Black
|
TP_EXPOSURE_BLACKLEVEL;Black
|
||||||
TP_EXPOSURE_BRIGHTNESS;Brightness
|
TP_EXPOSURE_BRIGHTNESS;Brightness
|
||||||
TP_EXPOSURE_CLIP;Clip
|
TP_EXPOSURE_CLIP;Clip
|
||||||
|
TP_EXPOSURE_CLIP_TIP;The fraction of pixels to be clipped in auto levels operation
|
||||||
TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD;Highlight recovery threshold
|
TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD;Highlight recovery threshold
|
||||||
TP_EXPOSURE_COMPRHIGHLIGHTS;Highlight recovery amount
|
TP_EXPOSURE_COMPRHIGHLIGHTS;Highlight recovery amount
|
||||||
TP_EXPOSURE_COMPRSHADOWS;Shadow recovery
|
TP_EXPOSURE_COMPRSHADOWS;Shadow recovery
|
||||||
@ -917,6 +920,8 @@ TP_LENSGEOM_LABEL;Lens / Geometry
|
|||||||
TP_LUMADENOISE_EDGETOLERANCE;Edge Tolerance
|
TP_LUMADENOISE_EDGETOLERANCE;Edge Tolerance
|
||||||
TP_LUMADENOISE_LABEL;Luminance Noise Reduction
|
TP_LUMADENOISE_LABEL;Luminance Noise Reduction
|
||||||
TP_LUMADENOISE_RADIUS;Radius
|
TP_LUMADENOISE_RADIUS;Radius
|
||||||
|
TP_NEUTRAL;Neutral
|
||||||
|
TP_NEUTRAL_TIP;Reset exposure controls to neutral values
|
||||||
TP_PERSPECTIVE_HORIZONTAL;Horizontal
|
TP_PERSPECTIVE_HORIZONTAL;Horizontal
|
||||||
TP_PERSPECTIVE_LABEL;Perspective
|
TP_PERSPECTIVE_LABEL;Perspective
|
||||||
TP_PERSPECTIVE_VERTICAL;Vertical
|
TP_PERSPECTIVE_VERTICAL;Vertical
|
||||||
|
@ -187,7 +187,8 @@ enum ProcEvent {
|
|||||||
EvRGBrCurve=162,
|
EvRGBrCurve=162,
|
||||||
EvRGBgCurve=163,
|
EvRGBgCurve=163,
|
||||||
EvRGBbCurve=164,
|
EvRGBbCurve=164,
|
||||||
NUMOFEVENTS=165
|
EvNeutralExp=165,
|
||||||
|
NUMOFEVENTS=166
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -184,7 +184,8 @@ SHARPENING, // EvEPDReweightingIterates
|
|||||||
SHARPENING, // EvEPDEnabled
|
SHARPENING, // EvEPDEnabled
|
||||||
RGBCURVE, // EvRGBrCurve
|
RGBCURVE, // EvRGBrCurve
|
||||||
RGBCURVE, // EvRGBgCurve
|
RGBCURVE, // EvRGBgCurve
|
||||||
RGBCURVE // EvRGBbCurve
|
RGBCURVE, // EvRGBbCurve
|
||||||
|
RGBCURVE // EvNeutralExp
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ ToneCurve::ToneCurve () : Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
abox->set_border_width (2);
|
abox->set_border_width (2);
|
||||||
|
|
||||||
autolevels = Gtk::manage (new Gtk::ToggleButton (M("TP_EXPOSURE_AUTOLEVELS")));
|
autolevels = Gtk::manage (new Gtk::ToggleButton (M("TP_EXPOSURE_AUTOLEVELS")));
|
||||||
|
autolevels->set_tooltip_markup (M("TP_EXPOSURE_AUTOLEVELS_TIP"));
|
||||||
autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) );
|
autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) );
|
||||||
|
|
||||||
sclip = Gtk::manage (new MySpinButton ());
|
sclip = Gtk::manage (new MySpinButton ());
|
||||||
@ -39,9 +40,18 @@ ToneCurve::ToneCurve () : Gtk::VBox(), FoldableToolPanel(this) {
|
|||||||
sclip->set_increments (0.001, 0.01);
|
sclip->set_increments (0.001, 0.01);
|
||||||
sclip->set_value (0.002);
|
sclip->set_value (0.002);
|
||||||
sclip->set_digits (4);
|
sclip->set_digits (4);
|
||||||
|
sclip->set_tooltip_text (M("TP_EXPOSURE_CLIP_TIP"));
|
||||||
sclip->signal_value_changed().connect( sigc::mem_fun(*this, &ToneCurve::clip_changed) );
|
sclip->signal_value_changed().connect( sigc::mem_fun(*this, &ToneCurve::clip_changed) );
|
||||||
|
|
||||||
|
neutral = Gtk::manage (new Gtk::Button (M("TP_NEUTRAL")));
|
||||||
|
neutral->set_tooltip_text (M("TP_NEUTRAL_TIP"));
|
||||||
|
neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &ToneCurve::neutral_pressed) );
|
||||||
|
neutral->show();
|
||||||
|
|
||||||
abox->pack_start (*autolevels);
|
abox->pack_start (*autolevels);
|
||||||
|
// pack_end is used for these controls as autolevels is replaceable using pack_start in batchmode
|
||||||
|
abox->pack_end (*neutral);
|
||||||
|
abox->pack_end (*Gtk::manage (new Gtk::Label (" "))); //spacer
|
||||||
abox->pack_end (*sclip);
|
abox->pack_end (*sclip);
|
||||||
abox->pack_end (*Gtk::manage (new Gtk::Label (M("TP_EXPOSURE_CLIP"))));
|
abox->pack_end (*Gtk::manage (new Gtk::Label (M("TP_EXPOSURE_CLIP"))));
|
||||||
pack_start (*abox);
|
pack_start (*abox);
|
||||||
@ -242,6 +252,35 @@ void ToneCurve::adjusterChanged (Adjuster* a, double newval) {
|
|||||||
listener->panelChanged (EvSHCompr, costr);
|
listener->panelChanged (EvSHCompr, costr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ToneCurve::neutral_pressed () {
|
||||||
|
// This method deselects auto levels
|
||||||
|
// and sets neutral values to params in exposure panel
|
||||||
|
|
||||||
|
if (batchMode) {
|
||||||
|
autolevels->set_inconsistent (false);
|
||||||
|
autoconn.block (true);
|
||||||
|
autolevels->set_active (false);
|
||||||
|
autoconn.block (false);
|
||||||
|
|
||||||
|
lastAuto = autolevels->get_active ();
|
||||||
|
}
|
||||||
|
else { //!batchMode
|
||||||
|
autolevels->set_active (false);
|
||||||
|
autolevels->set_inconsistent (false);
|
||||||
|
}
|
||||||
|
|
||||||
|
expcomp->setValue(0);
|
||||||
|
hlcompr->setValue(0);
|
||||||
|
hlcomprthresh->setValue(0);
|
||||||
|
brightness->setValue(0);
|
||||||
|
black->setValue(0);
|
||||||
|
shcompr->setValue(0);
|
||||||
|
if (!black->getAddMode()) shcompr->set_sensitive(!((int)black->getValue ()==0)); //at black=0 shcompr value has no effect
|
||||||
|
contrast->setValue(0);
|
||||||
|
//saturation->setValue(0);
|
||||||
|
|
||||||
|
listener->panelChanged (EvNeutralExp, M("GENERAL_ENABLED"));
|
||||||
|
}
|
||||||
void ToneCurve::autolevels_toggled () {
|
void ToneCurve::autolevels_toggled () {
|
||||||
|
|
||||||
if (batchMode) {
|
if (batchMode) {
|
||||||
@ -370,6 +409,7 @@ void ToneCurve::setBatchMode (bool batchMode) {
|
|||||||
|
|
||||||
removeIfThere (abox, autolevels, false);
|
removeIfThere (abox, autolevels, false);
|
||||||
autolevels = Gtk::manage (new Gtk::CheckButton (M("TP_EXPOSURE_AUTOLEVELS")));
|
autolevels = Gtk::manage (new Gtk::CheckButton (M("TP_EXPOSURE_AUTOLEVELS")));
|
||||||
|
autolevels->set_tooltip_markup (M("TP_EXPOSURE_AUTOLEVELS_TIP"));
|
||||||
autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) );
|
autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) );
|
||||||
abox->pack_start (*autolevels);
|
abox->pack_start (*autolevels);
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ class ToneCurve : public Gtk::VBox, public AdjusterListener, public FoldableTool
|
|||||||
Gtk::HBox* abox;
|
Gtk::HBox* abox;
|
||||||
Gtk::ToggleButton* autolevels;
|
Gtk::ToggleButton* autolevels;
|
||||||
MySpinButton* sclip;
|
MySpinButton* sclip;
|
||||||
|
Gtk::Button* neutral;
|
||||||
Adjuster* expcomp;
|
Adjuster* expcomp;
|
||||||
Adjuster* brightness;
|
Adjuster* brightness;
|
||||||
Adjuster* black;
|
Adjuster* black;
|
||||||
@ -43,7 +44,7 @@ class ToneCurve : public Gtk::VBox, public AdjusterListener, public FoldableTool
|
|||||||
Adjuster* saturation;
|
Adjuster* saturation;
|
||||||
|
|
||||||
bool clipDirty, lastAuto;
|
bool clipDirty, lastAuto;
|
||||||
sigc::connection autoconn;
|
sigc::connection autoconn, neutralconn;
|
||||||
CurveEditorGroup* curveEditorG;
|
CurveEditorGroup* curveEditorG;
|
||||||
DiagonalCurveEditor* shape;
|
DiagonalCurveEditor* shape;
|
||||||
|
|
||||||
@ -68,6 +69,7 @@ class ToneCurve : public Gtk::VBox, public AdjusterListener, public FoldableTool
|
|||||||
|
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void neutral_pressed ();
|
||||||
void autolevels_toggled ();
|
void autolevels_toggled ();
|
||||||
void clip_changed ();
|
void clip_changed ();
|
||||||
bool clip_changed_ ();
|
bool clip_changed_ ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user