Enhancement: BW toning in Lab (see issue 1424)
This commit is contained in:
@@ -44,6 +44,10 @@ LCurve::LCurve () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
//%%%%%%%%%%%%%%%%%%
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
bwtoning = Gtk::manage (new Gtk::CheckButton (M("TP_LABCURVE_BWTONING")));
|
||||
bwtoning->set_tooltip_markup (M("TP_LABCURVE_BWTONING_TIP"));
|
||||
pack_start (*bwtoning);
|
||||
|
||||
avoidclip = Gtk::manage (new Gtk::CheckButton (M("TP_LABCURVE_AVOIDCOLORCLIP")));
|
||||
|
||||
pack_start (*avoidclip);
|
||||
@@ -59,6 +63,7 @@ LCurve::LCurve () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
//saturation->setAdjusterListener (this);
|
||||
saturationlimiter->setAdjusterListener (this);
|
||||
bwtconn= bwtoning->signal_toggled().connect( sigc::mem_fun(*this, &LCurve::bwtoning_toggled) );
|
||||
acconn = avoidclip->signal_toggled().connect( sigc::mem_fun(*this, &LCurve::avoidclip_toggled) );
|
||||
elconn = enablelimiter->signal_toggled().connect( sigc::mem_fun(*this, &LCurve::enablelimiter_toggled) );
|
||||
//%%%%%%%%%%%%%%%%%%%
|
||||
@@ -97,6 +102,7 @@ void LCurve::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%
|
||||
saturationlimiter->setEditedState (pedited->labCurve.saturationlimit ? Edited : UnEdited);
|
||||
bwtoning->set_inconsistent (!pedited->labCurve.bwtoning);
|
||||
avoidclip->set_inconsistent (!pedited->labCurve.avoidclip);
|
||||
enablelimiter->set_inconsistent (!pedited->labCurve.enable_saturationlimiter);
|
||||
//%%%%%%%%%%%%%%%%%%%%%%
|
||||
@@ -114,6 +120,8 @@ void LCurve::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
//%%%%%%%%%%%%%%%%%%%%%%
|
||||
saturationlimiter->setValue (pp->labCurve.saturationlimit);
|
||||
acconn.block (true);
|
||||
bwtoning->set_active (pp->labCurve.bwtoning);
|
||||
saturation->set_sensitive(!(bwtoning->get_active ())); //at bwtoning enabled saturation value has no effect
|
||||
avoidclip->set_active (pp->labCurve.avoidclip);
|
||||
acconn.block (false);
|
||||
elconn.block (true);
|
||||
@@ -124,6 +132,7 @@ void LCurve::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
// if (enablelimiter->get_active () || enablelimiter->get_inconsistent())
|
||||
// pack_start (*saturationlimiter);
|
||||
|
||||
lastBWTVal = pp->labCurve.bwtoning;
|
||||
lastACVal = pp->labCurve.avoidclip;
|
||||
lastELVal = pp->labCurve.enable_saturationlimiter;
|
||||
//%%%%%%%%%%%%%%%%%%%%%%
|
||||
@@ -147,6 +156,7 @@ void LCurve::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
pp->labCurve.saturation = (int)saturation->getValue ();
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%
|
||||
pp->labCurve.bwtoning = bwtoning->get_active ();
|
||||
pp->labCurve.avoidclip = avoidclip->get_active ();
|
||||
pp->labCurve.enable_saturationlimiter = enablelimiter->get_active ();
|
||||
pp->labCurve.saturationlimit = saturationlimiter->getValue ();
|
||||
@@ -162,6 +172,7 @@ void LCurve::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
pedited->labCurve.saturation = saturation->getEditedState ();
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%
|
||||
pedited->labCurve.bwtoning = !bwtoning->get_inconsistent();
|
||||
pedited->labCurve.avoidclip = !avoidclip->get_inconsistent();
|
||||
pedited->labCurve.enable_saturationlimiter = !enablelimiter->get_inconsistent();
|
||||
pedited->labCurve.saturationlimit = saturationlimiter->getEditedState ();
|
||||
@@ -220,6 +231,33 @@ void LCurve::avoidclip_toggled () {
|
||||
}
|
||||
}
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%
|
||||
//BW toning control changed
|
||||
void LCurve::bwtoning_toggled () {
|
||||
|
||||
if (batchMode) {
|
||||
if (bwtoning->get_inconsistent()) {
|
||||
bwtoning->set_inconsistent (false);
|
||||
bwtconn.block (true);
|
||||
bwtoning->set_active (false);
|
||||
bwtconn.block (false);
|
||||
}
|
||||
else if (lastBWTVal)
|
||||
bwtoning->set_inconsistent (true);
|
||||
|
||||
lastBWTVal = bwtoning->get_active ();
|
||||
}
|
||||
|
||||
saturation->set_sensitive(!(bwtoning->get_active ())); //at bwtoning enabled saturation value has no effect
|
||||
|
||||
if (listener) {
|
||||
if (bwtoning->get_active ())
|
||||
listener->panelChanged (EvLBWtoning, M("GENERAL_ENABLED"));
|
||||
else
|
||||
listener->panelChanged (EvLBWtoning, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
|
||||
void LCurve::enablelimiter_toggled () {
|
||||
|
||||
if (batchMode) {
|
||||
|
Reference in New Issue
Block a user