Cleaining the "Clarity and Sharpening" tool's GUI
This commit is contained in:
parent
8fa4667ee3
commit
fe8d3d5abc
105
rtgui/clarity.cc
105
rtgui/clarity.cc
@ -32,48 +32,46 @@ using namespace rtengine::procparams;
|
|||||||
|
|
||||||
Clarity::Clarity () : Gtk::VBox(), FoldableToolPanel(this)
|
Clarity::Clarity () : Gtk::VBox(), FoldableToolPanel(this)
|
||||||
{
|
{
|
||||||
|
set_border_width(4);
|
||||||
|
set_spacing(4);
|
||||||
|
|
||||||
Gtk::HSeparator *hsep66aa = Gtk::manage (new Gtk::HSeparator());
|
//******************************** SHARPEN
|
||||||
pack_start(*hsep66aa, Gtk::PACK_SHRINK, 2);
|
|
||||||
hsep66aa->show ();
|
Gtk::Frame *sharpenFrame = Gtk::manage (new Gtk::Frame(M("TP_CLARITY_SHARPEN")));
|
||||||
Gtk::Label* clsh = Gtk::manage (new Gtk::Label ());
|
Gtk::VBox *sharpenVBox = Gtk::manage (new Gtk::VBox());
|
||||||
clsh->set_alignment (0.0, 0.5);
|
sharpenVBox->set_spacing(2);
|
||||||
clsh->set_markup (Glib::ustring("<b>") + M("TP_CLARITY_SHARPEN") + "</b>");
|
|
||||||
clsh->show ();
|
enabled = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLED")));
|
||||||
pack_start (*clsh);
|
enabled->set_active (true);
|
||||||
enabled = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLED")));
|
sharpenVBox->pack_start(*enabled, Gtk::PACK_SHRINK, 0);
|
||||||
enabled->set_active (true);
|
|
||||||
pack_start(*enabled);
|
|
||||||
enabled->show ();
|
|
||||||
|
|
||||||
Claritypasses = Gtk::manage(new Adjuster (M("TP_CLARITY_PASSES"),1,4,1,1));
|
Claritypasses = Gtk::manage(new Adjuster (M("TP_CLARITY_PASSES"),1,4,1,1));
|
||||||
Claritypasses->setAdjusterListener (this);
|
Claritypasses->setAdjusterListener (this);
|
||||||
if (Claritypasses->delay < 1000) Claritypasses->delay = 1000;
|
if (Claritypasses->delay < 1000) Claritypasses->delay = 1000;
|
||||||
Claritypasses->show();
|
|
||||||
Claritystrength = Gtk::manage(new Adjuster (M("TP_CLARITY_STRENGTH"),0,100,1,40));
|
Claritystrength = Gtk::manage(new Adjuster (M("TP_CLARITY_STRENGTH"),0,100,1,40));
|
||||||
Claritystrength->setAdjusterListener (this);
|
Claritystrength->setAdjusterListener (this);
|
||||||
if (Claritystrength->delay < 1000) Claritystrength->delay = 1000;
|
if (Claritystrength->delay < 1000) Claritystrength->delay = 1000;
|
||||||
Claritystrength->show();
|
|
||||||
|
|
||||||
Claritythreechannels = Gtk::manage(new Gtk::CheckButton((M("TP_CLARITY_THREE"))));// L + a + b
|
Claritythreechannels = Gtk::manage(new Gtk::CheckButton((M("TP_CLARITY_THREE"))));// L + a + b
|
||||||
Claritythreechannels->set_active (false);
|
Claritythreechannels->set_active (false);
|
||||||
pack_start( *Claritypasses, Gtk::PACK_SHRINK, 4);//passes
|
sharpenVBox->pack_start( *Claritypasses, Gtk::PACK_SHRINK, 0);//passes
|
||||||
pack_start( *Claritystrength, Gtk::PACK_SHRINK, 4);//strength
|
sharpenVBox->pack_start( *Claritystrength, Gtk::PACK_SHRINK, 0);//strength
|
||||||
pack_start( *Claritythreechannels, Gtk::PACK_SHRINK, 4);//one or 3 channels Lab
|
sharpenVBox->pack_start( *Claritythreechannels, Gtk::PACK_SHRINK, 0);//one or 3 channels Lab
|
||||||
Claritythreechannels->show();
|
|
||||||
Gtk::HSeparator *hsep67aa = Gtk::manage (new Gtk::HSeparator());
|
|
||||||
pack_start(*hsep67aa, Gtk::PACK_SHRINK, 2);
|
|
||||||
hsep67aa->show ();
|
|
||||||
Gtk::Label* clmc = Gtk::manage (new Gtk::Label ());
|
|
||||||
clmc->set_alignment (0.0, 0.5);
|
|
||||||
clmc->set_markup (Glib::ustring("<b>") + M("TP_CLARITY_MICRO") + "</b>");
|
|
||||||
clmc->show ();
|
|
||||||
pack_start (*clmc);
|
|
||||||
enabledtwo = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLED")));
|
|
||||||
enabledtwo->set_active (true);
|
|
||||||
pack_start(*enabledtwo);
|
|
||||||
enabledtwo->show ();
|
|
||||||
|
|
||||||
|
sharpenFrame->add (*sharpenVBox);
|
||||||
|
pack_start(*sharpenFrame, Gtk::PACK_SHRINK, 0);
|
||||||
|
sharpenFrame->show ();
|
||||||
|
|
||||||
|
//******************************** MICRO
|
||||||
|
|
||||||
|
Gtk::Frame *microFrame = Gtk::manage (new Gtk::Frame(M("TP_CLARITY_MICRO")));
|
||||||
|
Gtk::VBox *microVBox = Gtk::manage (new Gtk::VBox());
|
||||||
|
microVBox->set_spacing(2);
|
||||||
|
|
||||||
|
enabledtwo = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLED")));
|
||||||
|
enabledtwo->set_active (true);
|
||||||
|
microVBox->pack_start(*enabledtwo, Gtk::PACK_SHRINK, 0);
|
||||||
|
enabledtwo->show ();
|
||||||
|
|
||||||
MLmicrostrength= Gtk::manage(new Adjuster (M("TP_MLMICRO_STRENGTH"),0,100,1,25));
|
MLmicrostrength= Gtk::manage(new Adjuster (M("TP_MLMICRO_STRENGTH"),0,100,1,25));
|
||||||
MLmicrostrength->setAdjusterListener (this);
|
MLmicrostrength->setAdjusterListener (this);
|
||||||
@ -86,16 +84,20 @@ Clarity::Clarity () : Gtk::VBox(), FoldableToolPanel(this)
|
|||||||
uniformity->show();
|
uniformity->show();
|
||||||
MLmicromatrix = Gtk::manage (new Gtk::CheckButton (M("TP_CLARITY_MATRIX")));
|
MLmicromatrix = Gtk::manage (new Gtk::CheckButton (M("TP_CLARITY_MATRIX")));
|
||||||
MLmicromatrix->set_active (true);
|
MLmicromatrix->set_active (true);
|
||||||
pack_start(*MLmicromatrix);
|
microVBox->pack_start(*MLmicromatrix, Gtk::PACK_SHRINK, 0);
|
||||||
MLmicromatrix->show ();
|
MLmicromatrix->show ();
|
||||||
|
|
||||||
pack_start( *MLmicrostrength, Gtk::PACK_SHRINK, 4);//microcontraste strength
|
microVBox->pack_start( *MLmicrostrength, Gtk::PACK_SHRINK, 0);//microcontraste strength
|
||||||
pack_start( *uniformity, Gtk::PACK_SHRINK, 4);//uniformity
|
microVBox->pack_start( *uniformity, Gtk::PACK_SHRINK, 0);//uniformity
|
||||||
|
|
||||||
enaconn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &Clarity::enabled_toggled) );
|
microFrame->add (*microVBox);
|
||||||
chanthreeconn = Claritythreechannels->signal_toggled().connect( sigc::mem_fun(*this, &Clarity::chanthree_toggled) );
|
pack_start(*microFrame, Gtk::PACK_SHRINK, 0);
|
||||||
enatwoconn = enabledtwo->signal_toggled().connect( sigc::mem_fun(*this, &Clarity::enabledtwo_toggled) );
|
microFrame->show ();
|
||||||
matrixconn = MLmicromatrix->signal_toggled().connect( sigc::mem_fun(*this, &Clarity::MLmicromatrix_toggled) );
|
|
||||||
|
enaconn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &Clarity::enabled_toggled) );
|
||||||
|
chanthreeconn = Claritythreechannels->signal_toggled().connect( sigc::mem_fun(*this, &Clarity::chanthree_toggled) );
|
||||||
|
enatwoconn = enabledtwo->signal_toggled().connect( sigc::mem_fun(*this, &Clarity::enabledtwo_toggled) );
|
||||||
|
matrixconn = MLmicromatrix->signal_toggled().connect( sigc::mem_fun(*this, &Clarity::MLmicromatrix_toggled) );
|
||||||
|
|
||||||
}
|
}
|
||||||
Clarity::~Clarity () {
|
Clarity::~Clarity () {
|
||||||
@ -158,15 +160,14 @@ void Clarity::write( ProcParams* pp, ParamsEdited* pedited)
|
|||||||
|
|
||||||
|
|
||||||
if (pedited) {
|
if (pedited) {
|
||||||
pedited->clarity.clpasses = Claritypasses->getEditedState ();
|
pedited->clarity.clpasses = Claritypasses->getEditedState ();
|
||||||
pedited->clarity.enabled = !enabled->get_inconsistent();
|
pedited->clarity.enabled = !enabled->get_inconsistent();
|
||||||
pedited->clarity.clthreechannels = !Claritythreechannels->get_inconsistent();
|
pedited->clarity.clthreechannels = !Claritythreechannels->get_inconsistent();
|
||||||
pedited->clarity.clstrength = Claritystrength->getEditedState ();
|
pedited->clarity.clstrength = Claritystrength->getEditedState ();
|
||||||
pedited->clarity.mlstrength = MLmicrostrength->getEditedState ();
|
pedited->clarity.mlstrength = MLmicrostrength->getEditedState ();
|
||||||
pedited->clarity.uniformity = uniformity->getEditedState ();
|
pedited->clarity.uniformity = uniformity->getEditedState ();
|
||||||
pedited->clarity.enabledtwo = !enabledtwo->get_inconsistent();
|
pedited->clarity.enabledtwo = !enabledtwo->get_inconsistent();
|
||||||
pedited->clarity.MLmicromatrix = !MLmicromatrix->get_inconsistent();
|
pedited->clarity.MLmicromatrix = !MLmicromatrix->get_inconsistent();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user