GUI change of the HLRecovery tool inside Exposure, see issue 2137
This commit is contained in:
@@ -358,6 +358,7 @@ bool MyScrolledWindow::on_scroll_event (GdkEventScroll* event) {
|
||||
|
||||
MyComboBoxText::MyComboBoxText () {
|
||||
set_size_request(40, -1);
|
||||
set_border_width(2);
|
||||
}
|
||||
|
||||
bool MyComboBoxText::on_scroll_event (GdkEventScroll* event) {
|
||||
@@ -373,6 +374,7 @@ bool MyComboBoxText::on_scroll_event (GdkEventScroll* event) {
|
||||
|
||||
MyComboBox::MyComboBox () {
|
||||
set_size_request(40, -1);
|
||||
set_border_width(2);
|
||||
}
|
||||
|
||||
bool MyComboBox::on_scroll_event (GdkEventScroll* event) {
|
||||
|
||||
@@ -511,7 +511,6 @@ class ParamsEdited {
|
||||
VignettingParamsEdited vignetting;
|
||||
ChannelMixerParamsEdited chmixer;
|
||||
BlackWhiteParamsEdited blackwhite;
|
||||
// HRecParamsEdited hlrecovery;
|
||||
ResizeParamsEdited resize;
|
||||
ColorManagementParamsEdited icm;
|
||||
RAWParamsEdited raw;
|
||||
|
||||
@@ -46,7 +46,6 @@ PartialPasteDlg::PartialPasteDlg (Glib::ustring title) {
|
||||
// options in basic:
|
||||
wb = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_WHITEBALANCE")));
|
||||
exposure = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EXPOSURE")));
|
||||
// hlrec = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_HLRECONSTRUCTION")));
|
||||
sh = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_SHADOWSHIGHLIGHTS")));
|
||||
epd = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EPD")));
|
||||
pcvignette = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PCVIGNETTE")));
|
||||
@@ -126,7 +125,6 @@ PartialPasteDlg::PartialPasteDlg (Glib::ustring title) {
|
||||
vboxes[0]->pack_start (*hseps[0], Gtk::PACK_SHRINK, 2);
|
||||
vboxes[0]->pack_start (*wb, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[0]->pack_start (*exposure, Gtk::PACK_SHRINK, 2);
|
||||
// vboxes[0]->pack_start (*hlrec, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[0]->pack_start (*sh, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[0]->pack_start (*epd, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[0]->pack_start (*pcvignette, Gtk::PACK_SHRINK, 2);
|
||||
@@ -249,7 +247,6 @@ PartialPasteDlg::PartialPasteDlg (Glib::ustring title) {
|
||||
|
||||
wbConn = wb->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true));
|
||||
exposureConn = exposure->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true));
|
||||
// hlrecConn = hlrec->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true));
|
||||
shConn = sh->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true));
|
||||
epdConn = epd->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true));
|
||||
pcvignetteConn = pcvignette->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true));
|
||||
@@ -433,7 +430,6 @@ void PartialPasteDlg::basicToggled () {
|
||||
|
||||
wbConn.block (true);
|
||||
exposureConn.block (true);
|
||||
// hlrecConn.block (true);
|
||||
shConn.block (true);
|
||||
epdConn.block(true);
|
||||
pcvignetteConn.block (true);
|
||||
@@ -445,7 +441,6 @@ void PartialPasteDlg::basicToggled () {
|
||||
|
||||
wb->set_active (basic->get_active ());
|
||||
exposure->set_active (basic->get_active ());
|
||||
// hlrec->set_active (basic->get_active ());
|
||||
sh->set_active (basic->get_active ());
|
||||
epd->set_active (basic->get_active ());
|
||||
pcvignette->set_active (basic->get_active ());
|
||||
@@ -455,7 +450,6 @@ void PartialPasteDlg::basicToggled () {
|
||||
|
||||
wbConn.block (false);
|
||||
exposureConn.block (false);
|
||||
// hlrecConn.block (false);
|
||||
shConn.block (false);
|
||||
epdConn.block (false);
|
||||
pcvignetteConn.block (false);
|
||||
@@ -613,7 +607,6 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param
|
||||
// Now we filter out the filter depending on the checked items
|
||||
if (!wb->get_active ()) filterPE.wb = falsePE.wb;
|
||||
if (!exposure->get_active ()) filterPE.toneCurve = falsePE.toneCurve;
|
||||
// if (!hlrec->get_active ()) filterPE.toneCurve = falsePE.toneCurve;
|
||||
if (!sh->get_active ()) filterPE.sh = falsePE.sh;
|
||||
if (!epd->get_active ()) filterPE.edgePreservingDecompositionUI = falsePE.edgePreservingDecompositionUI;
|
||||
if (!pcvignette->get_active ()) filterPE.pcvignette = falsePE.pcvignette;
|
||||
|
||||
@@ -40,7 +40,6 @@ class PartialPasteDlg : public Gtk::Dialog {
|
||||
// options in basic:
|
||||
Gtk::CheckButton* wb;
|
||||
Gtk::CheckButton* exposure;
|
||||
Gtk::CheckButton* hlrec;
|
||||
Gtk::CheckButton* sh;
|
||||
Gtk::CheckButton* epd;
|
||||
Gtk::CheckButton* pcvignette;
|
||||
@@ -112,7 +111,7 @@ class PartialPasteDlg : public Gtk::Dialog {
|
||||
|
||||
sigc::connection everythingConn, basicConn, detailConn, colorConn, lensConn, compositionConn, metaicmConn, rawConn;
|
||||
|
||||
sigc::connection wbConn, exposureConn, hlrecConn, shConn, pcvignetteConn, gradientConn, labcurveConn, colorappearanceConn;
|
||||
sigc::connection wbConn, exposureConn, shConn, pcvignetteConn, gradientConn, labcurveConn, colorappearanceConn;
|
||||
sigc::connection sharpenConn, gradsharpenConn, microcontrastConn, impdenConn, dirpyrdenConn, waveqConn, defringeConn, epdConn, dirpyreqConn;
|
||||
sigc::connection vibranceConn, chmixerConn, hsveqConn, rgbcurvesConn, chmixerbwConn;
|
||||
sigc::connection distortionConn, cacorrConn, vignettingConn, lcpConn;
|
||||
|
||||
@@ -28,6 +28,7 @@ using namespace rtengine::procparams;
|
||||
ToneCurve::ToneCurve () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
set_border_width(4);
|
||||
set_spacing(4);
|
||||
|
||||
CurveListener::setMulti(true);
|
||||
|
||||
@@ -64,57 +65,43 @@ ToneCurve::ToneCurve () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
abox->pack_end (*Gtk::manage (new Gtk::Label (M("TP_EXPOSURE_CLIP"))));
|
||||
pack_start (*abox);
|
||||
|
||||
|
||||
//----------- Exposure Compensation ------------------------
|
||||
expcomp = Gtk::manage (new Adjuster (M("TP_EXPOSURE_EXPCOMP"), -5, 10, 0.05, 0));
|
||||
pack_start (*expcomp);
|
||||
pack_start (*Gtk::manage (new Gtk::Label (" "))); //spacer
|
||||
//-------------- Highlight Reconstruction -----------------
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
//--------------HLRecovery from HLREC and Hl compress
|
||||
hlrbox = Gtk::manage (new Gtk::HBox ());
|
||||
hlrbox->set_border_width (2);
|
||||
hrenabled = Gtk::manage (new Gtk::CheckButton (M("TP_HLREC_LABEL")));
|
||||
hrenabled->set_active (false);
|
||||
hrenabled->set_tooltip_markup (M("TP_HLREC_ENA_TOOLTIP"));
|
||||
pack_start (*hrenabled);
|
||||
|
||||
Gtk::Label* hlrLabel = Gtk::manage (new Gtk::Label (M("TP_HLREC_LABEL")));
|
||||
|
||||
hrenabled = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLE")));
|
||||
|
||||
hrenabled->set_active (false);
|
||||
hrenabled->set_tooltip_markup (M("TP_HLREC_ENA_TOOLTIP"));
|
||||
hlrbox->pack_start (*hlrLabel,Gtk::PACK_SHRINK);
|
||||
|
||||
hlrbox->pack_end (*hrenabled, Gtk::PACK_SHRINK);
|
||||
hlrbox->pack_end (*Gtk::manage (new Gtk::Label (" "))); //spacer
|
||||
|
||||
pack_start (*hlrbox);
|
||||
|
||||
method = Gtk::manage (new MyComboBoxText ());
|
||||
method->append_text (M("TP_HLREC_LUMINANCE"));
|
||||
method->append_text (M("TP_HLREC_CIELAB"));
|
||||
method->append_text (M("TP_HLREC_COLOR"));
|
||||
method->append_text (M("TP_HLREC_BLEND"));
|
||||
|
||||
method = Gtk::manage (new MyComboBoxText ());
|
||||
method->append_text (M("TP_HLREC_LUMINANCE"));
|
||||
method->append_text (M("TP_HLREC_CIELAB"));
|
||||
method->append_text (M("TP_HLREC_COLOR"));
|
||||
method->append_text (M("TP_HLREC_BLEND"));
|
||||
|
||||
method->set_active (0);
|
||||
Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ());
|
||||
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_HLREC_METHOD")));
|
||||
hb->pack_start (*lab, Gtk::PACK_SHRINK, 4);
|
||||
hb->pack_start (*method);
|
||||
pack_start (*hb);
|
||||
method->set_active (0);
|
||||
hlrbox = Gtk::manage (new Gtk::HBox ());
|
||||
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_HLREC_METHOD")));
|
||||
hlrbox->pack_start (*lab, Gtk::PACK_SHRINK, 4);
|
||||
hlrbox->pack_start (*method);
|
||||
pack_start (*hlrbox);
|
||||
|
||||
enaconn = hrenabled->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::hrenabledChanged) );
|
||||
methconn = method->signal_changed().connect ( sigc::mem_fun(*this, &ToneCurve::methodChanged) );
|
||||
pack_start (*Gtk::manage (new Gtk::Label (" "))); //spacer
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
hlcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0));
|
||||
pack_start (*hlcompr);
|
||||
hlcomprthresh = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 33));
|
||||
pack_start (*hlcomprthresh);
|
||||
enaconn = hrenabled->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::hrenabledChanged) );
|
||||
methconn = method->signal_changed().connect ( sigc::mem_fun(*this, &ToneCurve::methodChanged) );
|
||||
|
||||
|
||||
|
||||
//----------- Black Level ----------------------------------
|
||||
//----------- Exposure Compensation ---------------------
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
expcomp = Gtk::manage (new Adjuster (M("TP_EXPOSURE_EXPCOMP"), -5, 10, 0.05, 0));
|
||||
pack_start (*expcomp);
|
||||
|
||||
//----------- Highlight recovery & threshold -------------
|
||||
hlcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0));
|
||||
pack_start (*hlcompr);
|
||||
hlcomprthresh = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 33));
|
||||
pack_start (*hlcomprthresh);
|
||||
|
||||
//----------- Black Level & Compression -------------------
|
||||
black = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BLACKLEVEL"), -16384, 32768, 50, 0));
|
||||
pack_start (*black);
|
||||
shcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRSHADOWS"), 0, 100, 1, 50));
|
||||
@@ -129,7 +116,7 @@ ToneCurve::ToneCurve () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
pack_start (*contrast);
|
||||
saturation = Gtk::manage (new Adjuster (M("TP_EXPOSURE_SATURATION"), -100, 100, 1, 0));
|
||||
pack_start (*saturation);
|
||||
|
||||
|
||||
//----------- Curve 1 ------------------------------
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
@@ -242,28 +229,32 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
if (!pedited->toneCurve.curveMode2) {
|
||||
toneCurveMode2->set_active(4);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (pedited)
|
||||
hrenabled->set_inconsistent (!pedited->toneCurve.hrenabled);
|
||||
enaconn.block (true);
|
||||
hrenabled->set_active (pp->toneCurve.hrenabled);
|
||||
enaconn.block (false);
|
||||
|
||||
|
||||
if (pedited && !pedited->toneCurve.method)
|
||||
method->set_active (4);
|
||||
else if (pp->toneCurve.method=="Luminance")
|
||||
method->set_active (0);
|
||||
else if (pp->toneCurve.method=="CIELab blending")
|
||||
method->set_active (1);
|
||||
else if (pp->toneCurve.method=="Color")
|
||||
method->set_active (2);
|
||||
else if (pp->toneCurve.method=="Blend")
|
||||
method->set_active (3);
|
||||
else if (pp->toneCurve.method=="Luminance")
|
||||
method->set_active (0);
|
||||
else if (pp->toneCurve.method=="CIELab blending")
|
||||
method->set_active (1);
|
||||
else if (pp->toneCurve.method=="Color")
|
||||
method->set_active (2);
|
||||
else if (pp->toneCurve.method=="Blend")
|
||||
method->set_active (3);
|
||||
|
||||
if (!batchMode) {
|
||||
if (hrenabled->get_active())
|
||||
hlrbox->show();
|
||||
else
|
||||
hlrbox->hide();
|
||||
}
|
||||
lasthrEnabled = pp->toneCurve.hrenabled;
|
||||
|
||||
|
||||
autoconn.block (false);
|
||||
tcmode2conn.block(false);
|
||||
tcmodeconn.block(false);
|
||||
@@ -272,24 +263,24 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
}
|
||||
|
||||
void ToneCurve::autoOpenCurve () {
|
||||
shape->openIfNonlinear();
|
||||
shape2->openIfNonlinear();
|
||||
shape->openIfNonlinear();
|
||||
shape2->openIfNonlinear();
|
||||
}
|
||||
int HLChangedUI (void* data) {
|
||||
GThreadLock lock;
|
||||
(static_cast<ToneCurve*>(data))->HLComputed_ ();
|
||||
return 0;
|
||||
GThreadLock lock;
|
||||
(static_cast<ToneCurve*>(data))->HLComputed_ ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ToneCurve::HLChanged (bool hlrbool){
|
||||
nexthlrbool= hlrbool;
|
||||
g_idle_add (HLChangedUI, this);
|
||||
nexthlrbool= hlrbool;
|
||||
g_idle_add (HLChangedUI, this);
|
||||
}
|
||||
bool ToneCurve::HLComputed_ () {
|
||||
enaconn.block (true);
|
||||
hrenabled->set_active (nexthlrbool);
|
||||
enaconn.block (false);
|
||||
return false;
|
||||
enaconn.block (true);
|
||||
hrenabled->set_active (nexthlrbool);
|
||||
enaconn.block (false);
|
||||
return false;
|
||||
}
|
||||
|
||||
void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
@@ -319,7 +310,6 @@ void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
else if (tcMode == 2) pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_FILMLIKE;
|
||||
else if (tcMode == 3) pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_SATANDVALBLENDING;
|
||||
|
||||
|
||||
if (pedited) {
|
||||
pedited->toneCurve.expcomp = expcomp->getEditedState ();
|
||||
pedited->toneCurve.black = black->getEditedState ();
|
||||
@@ -337,26 +327,24 @@ void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
pedited->toneCurve.curveMode2 = toneCurveMode2->get_active_row_number() != 4;
|
||||
}
|
||||
if (pedited) {
|
||||
pedited->toneCurve.method = method->get_active_row_number()!=4;
|
||||
pedited->toneCurve.hrenabled = !hrenabled->get_inconsistent();
|
||||
pedited->toneCurve.method = method->get_active_row_number()!=4;
|
||||
pedited->toneCurve.hrenabled = !hrenabled->get_inconsistent();
|
||||
}
|
||||
|
||||
pp->toneCurve.hrenabled = hrenabled->get_active();
|
||||
if (method->get_active_row_number()==0)
|
||||
pp->toneCurve.method = "Luminance";
|
||||
else if (method->get_active_row_number()==1)
|
||||
pp->toneCurve.method = "CIELab blending";
|
||||
else if (method->get_active_row_number()==2)
|
||||
pp->toneCurve.method = "Color";
|
||||
else if (method->get_active_row_number()==3)
|
||||
pp->toneCurve.method = "Blend";
|
||||
|
||||
|
||||
if (method->get_active_row_number()==0)
|
||||
pp->toneCurve.method = "Luminance";
|
||||
else if (method->get_active_row_number()==1)
|
||||
pp->toneCurve.method = "CIELab blending";
|
||||
else if (method->get_active_row_number()==2)
|
||||
pp->toneCurve.method = "Color";
|
||||
else if (method->get_active_row_number()==3)
|
||||
pp->toneCurve.method = "Blend";
|
||||
}
|
||||
|
||||
void ToneCurve::hrenabledChanged () {
|
||||
|
||||
if (batchMode) {
|
||||
if (multiImage) {
|
||||
if (hrenabled->get_inconsistent()) {
|
||||
hrenabled->set_inconsistent (false);
|
||||
enaconn.block (true);
|
||||
@@ -369,18 +357,26 @@ void ToneCurve::hrenabledChanged () {
|
||||
lasthrEnabled = hrenabled->get_active ();
|
||||
}
|
||||
|
||||
if (!batchMode) {
|
||||
if (hrenabled->get_active())
|
||||
hlrbox->show();
|
||||
else
|
||||
hlrbox->hide();
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
if (hrenabled->get_active ()){
|
||||
listener->panelChanged (EvHREnabled, M("GENERAL_ENABLED"));
|
||||
}
|
||||
listener->panelChanged (EvHREnabled, M("GENERAL_ENABLED"));
|
||||
}
|
||||
else { // Switch off auto exposure if user changes enabled manually
|
||||
if (autolevels->get_active() ) {
|
||||
autoconn.block(true);
|
||||
autolevels->set_active (false);
|
||||
autoconn.block(false);
|
||||
autolevels->set_inconsistent (false);
|
||||
}
|
||||
listener->panelChanged (EvHREnabled, M("GENERAL_DISABLED"));}
|
||||
if (autolevels->get_active() ) {
|
||||
autoconn.block(true);
|
||||
autolevels->set_active (false);
|
||||
autoconn.block(false);
|
||||
autolevels->set_inconsistent (false);
|
||||
}
|
||||
listener->panelChanged (EvHREnabled, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
void ToneCurve::methodChanged () {
|
||||
@@ -388,13 +384,13 @@ void ToneCurve::methodChanged () {
|
||||
if (listener) {
|
||||
if (hrenabled->get_active ())
|
||||
listener->panelChanged (EvHRMethod, method->get_active_text ());
|
||||
}
|
||||
}
|
||||
}
|
||||
void ToneCurve::setRaw (bool raw) {
|
||||
|
||||
|
||||
disableListener ();
|
||||
method->set_sensitive (raw);
|
||||
hrenabled->set_sensitive (raw);
|
||||
method->set_sensitive (raw);
|
||||
hrenabled->set_sensitive (raw);
|
||||
enableListener ();
|
||||
}
|
||||
|
||||
@@ -480,7 +476,7 @@ void ToneCurve::adjusterChanged (Adjuster* a, double newval) {
|
||||
costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue());
|
||||
else
|
||||
costr = Glib::ustring::format ((int)a->getValue());
|
||||
|
||||
|
||||
if (a==expcomp)
|
||||
listener->panelChanged (EvExpComp, costr);
|
||||
else if (a==brightness)
|
||||
@@ -491,7 +487,7 @@ void ToneCurve::adjusterChanged (Adjuster* a, double newval) {
|
||||
}
|
||||
else if (a==contrast)
|
||||
listener->panelChanged (EvContrast, costr);
|
||||
else if (a==saturation)
|
||||
else if (a==saturation)
|
||||
listener->panelChanged (EvSaturation, costr);
|
||||
else if (a==hlcompr)
|
||||
listener->panelChanged (EvHLCompr, costr);
|
||||
@@ -517,18 +513,18 @@ void ToneCurve::neutral_pressed () {
|
||||
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(50);
|
||||
hrenabled->set_active (false);
|
||||
hrenabled->set_active (false);
|
||||
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 () {
|
||||
@@ -563,7 +559,7 @@ void ToneCurve::autolevels_toggled () {
|
||||
hlcompr->setValue (0);
|
||||
if (hlcomprthresh->getAddMode())
|
||||
hlcomprthresh->setValue (0);
|
||||
|
||||
|
||||
if (listener) {
|
||||
if (!autolevels->get_inconsistent()) {
|
||||
if (autolevels->get_active ())
|
||||
@@ -583,7 +579,6 @@ void ToneCurve::autolevels_toggled () {
|
||||
listener->panelChanged (EvFixedExp, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ToneCurve::clip_changed () {
|
||||
@@ -668,11 +663,8 @@ bool ToneCurve::autoExpComputed_ () {
|
||||
}
|
||||
|
||||
void ToneCurve::setBatchMode (bool batchMode) {
|
||||
//from HLrecovery
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
method->append_text (M("GENERAL_UNCHANGED"));
|
||||
//---------------
|
||||
|
||||
|
||||
removeIfThere (abox, autolevels, false);
|
||||
autolevels = Gtk::manage (new Gtk::CheckButton (M("TP_EXPOSURE_AUTOLEVELS")));
|
||||
@@ -688,35 +680,35 @@ void ToneCurve::setBatchMode (bool batchMode) {
|
||||
shcompr->showEditedCB ();
|
||||
brightness->showEditedCB ();
|
||||
contrast->showEditedCB ();
|
||||
saturation->showEditedCB ();
|
||||
saturation->showEditedCB ();
|
||||
|
||||
toneCurveMode->append_text (M("GENERAL_UNCHANGED"));
|
||||
toneCurveMode->append_text (M("GENERAL_UNCHANGED"));
|
||||
|
||||
curveEditorG->setBatchMode (batchMode);
|
||||
}
|
||||
|
||||
void ToneCurve::setAdjusterBehavior (bool expadd, bool hlcompadd, bool hlcompthreshadd, bool bradd, bool blackadd, bool shcompadd, bool contradd, bool satadd) {
|
||||
|
||||
expcomp->setAddMode(expadd);
|
||||
hlcompr->setAddMode(hlcompadd);
|
||||
hlcomprthresh->setAddMode(hlcompthreshadd);
|
||||
brightness->setAddMode(bradd);
|
||||
black->setAddMode(blackadd);
|
||||
shcompr->setAddMode(shcompadd);
|
||||
contrast->setAddMode(contradd);
|
||||
saturation->setAddMode(satadd);
|
||||
expcomp->setAddMode(expadd);
|
||||
hlcompr->setAddMode(hlcompadd);
|
||||
hlcomprthresh->setAddMode(hlcompthreshadd);
|
||||
brightness->setAddMode(bradd);
|
||||
black->setAddMode(blackadd);
|
||||
shcompr->setAddMode(shcompadd);
|
||||
contrast->setAddMode(contradd);
|
||||
saturation->setAddMode(satadd);
|
||||
}
|
||||
|
||||
void ToneCurve::trimValues (rtengine::procparams::ProcParams* pp) {
|
||||
|
||||
expcomp->trimValue(pp->toneCurve.expcomp);
|
||||
hlcompr->trimValue(pp->toneCurve.hlcompr);
|
||||
hlcomprthresh->trimValue(pp->toneCurve.hlcomprthresh);
|
||||
brightness->trimValue(pp->toneCurve.brightness);
|
||||
black->trimValue(pp->toneCurve.black);
|
||||
shcompr->trimValue(pp->toneCurve.shcompr);
|
||||
contrast->trimValue(pp->toneCurve.contrast);
|
||||
saturation->trimValue(pp->toneCurve.saturation);
|
||||
expcomp->trimValue(pp->toneCurve.expcomp);
|
||||
hlcompr->trimValue(pp->toneCurve.hlcompr);
|
||||
hlcomprthresh->trimValue(pp->toneCurve.hlcomprthresh);
|
||||
brightness->trimValue(pp->toneCurve.brightness);
|
||||
black->trimValue(pp->toneCurve.black);
|
||||
shcompr->trimValue(pp->toneCurve.shcompr);
|
||||
contrast->trimValue(pp->toneCurve.contrast);
|
||||
saturation->trimValue(pp->toneCurve.saturation);
|
||||
}
|
||||
|
||||
void ToneCurve::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve, LUTu & histCLurve, LUTu & histLLCurve, LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma) {
|
||||
|
||||
@@ -30,17 +30,17 @@
|
||||
class ToneCurve : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel, public rtengine::AutoExpListener, public rtengine::AutoHLListener,public CurveListener {
|
||||
|
||||
protected:
|
||||
// from HLRecovery
|
||||
// from HLRecovery
|
||||
Gtk::CheckButton* hrenabled;
|
||||
MyComboBoxText* method;
|
||||
sigc::connection methconn;
|
||||
sigc::connection enaconn;
|
||||
bool lasthrEnabled;
|
||||
bool nexthlrbool;
|
||||
bool nexthlrbool;
|
||||
|
||||
Gtk::HBox* abox;
|
||||
Gtk::HBox* hlrbox;
|
||||
|
||||
|
||||
Gtk::ToggleButton* autolevels;
|
||||
MySpinButton* sclip;
|
||||
Gtk::Button* neutral;
|
||||
@@ -69,10 +69,7 @@ class ToneCurve : public Gtk::VBox, public AdjusterListener, public FoldableTool
|
||||
int nextBlack;
|
||||
int nextHlcompr;
|
||||
int nextHlcomprthresh;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
ToneCurve ();
|
||||
@@ -105,15 +102,12 @@ class ToneCurve : public Gtk::VBox, public AdjusterListener, public FoldableTool
|
||||
bool isCurveExpanded ();
|
||||
void updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve, LUTu & histCLurve, LUTu & histLLCurve, LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma);
|
||||
|
||||
//from HLrecovery
|
||||
void setRaw (bool raw);
|
||||
void HLChanged (bool hlrbool);
|
||||
bool HLComputed_ ();
|
||||
void setRaw (bool raw);
|
||||
void HLChanged (bool hlrbool);
|
||||
bool HLComputed_ ();
|
||||
|
||||
void hrenabledChanged ();
|
||||
void methodChanged ();
|
||||
|
||||
|
||||
};
|
||||
void hrenabledChanged ();
|
||||
void methodChanged ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -63,7 +63,6 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
|
||||
pcvignette = Gtk::manage (new PCVignette ());
|
||||
perspective = Gtk::manage (new PerspCorrection ());
|
||||
cacorrection = Gtk::manage (new CACorrection ());
|
||||
// hlrecovery = Gtk::manage (new HLRecovery ());
|
||||
chmixer = Gtk::manage (new ChMixer ());
|
||||
blackwhite = Gtk::manage (new BlackWhite ());
|
||||
resize = Gtk::manage (new Resize ());
|
||||
@@ -82,7 +81,6 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
|
||||
|
||||
addPanel (colorPanel, whitebalance, M("TP_WBALANCE_LABEL")); toolPanels.push_back (whitebalance);
|
||||
addPanel (exposurePanel, toneCurve, M("TP_EXPOSURE_LABEL")); toolPanels.push_back (toneCurve);
|
||||
// addPanel (exposurePanel, hlrecovery, M("TP_HLREC_LABEL")); toolPanels.push_back (hlrecovery);
|
||||
addPanel (colorPanel, vibrance, M("TP_VIBRANCE_LABEL")); toolPanels.push_back (vibrance);
|
||||
addPanel (colorPanel, chmixer, M("TP_CHMIXER_LABEL")); toolPanels.push_back (chmixer);
|
||||
addPanel (colorPanel, blackwhite, M("TP_BWMIX_LABEL")); toolPanels.push_back (blackwhite);
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#include "resize.h"
|
||||
#include "chmixer.h"
|
||||
#include "blackwhite.h"
|
||||
//#include "hlrec.h"
|
||||
#include "cacorrection.h"
|
||||
#include "lensprofile.h"
|
||||
#include "distortion.h"
|
||||
@@ -97,7 +96,6 @@ class ToolPanelCoordinator : public ToolPanelListener,
|
||||
Distortion* distortion;
|
||||
PerspCorrection* perspective;
|
||||
CACorrection* cacorrection;
|
||||
// HLRecovery* hlrecovery;
|
||||
ColorAppearance* colorappearance;
|
||||
Vibrance* vibrance;
|
||||
ChMixer* chmixer;
|
||||
|
||||
Reference in New Issue
Block a user