Merge branch 'dev' into bayer_bilinear
This commit is contained in:
commit
8c363fc24c
@ -36,7 +36,7 @@ double one2one(double val)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Adjuster::Adjuster (
|
Adjuster::Adjuster(
|
||||||
Glib::ustring vlabel,
|
Glib::ustring vlabel,
|
||||||
double vmin,
|
double vmin,
|
||||||
double vmax,
|
double vmax,
|
||||||
@ -45,21 +45,20 @@ Adjuster::Adjuster (
|
|||||||
Gtk::Image *imgIcon1,
|
Gtk::Image *imgIcon1,
|
||||||
Gtk::Image *imgIcon2,
|
Gtk::Image *imgIcon2,
|
||||||
double2double_fun slider2value,
|
double2double_fun slider2value,
|
||||||
double2double_fun value2slider)
|
double2double_fun value2slider
|
||||||
|
) :
|
||||||
:
|
|
||||||
|
|
||||||
adjustmentName(std::move(vlabel)),
|
adjustmentName(std::move(vlabel)),
|
||||||
grid(nullptr),
|
grid(nullptr),
|
||||||
label(nullptr),
|
label(nullptr),
|
||||||
imageIcon1(imgIcon1),
|
imageIcon1(imgIcon1),
|
||||||
automatic(nullptr),
|
automatic(nullptr),
|
||||||
adjusterListener(nullptr),
|
adjusterListener(nullptr),
|
||||||
|
spinChange(options.adjusterMinDelay, options.adjusterMaxDelay),
|
||||||
|
sliderChange(options.adjusterMinDelay, options.adjusterMaxDelay),
|
||||||
editedCheckBox(nullptr),
|
editedCheckBox(nullptr),
|
||||||
afterReset(false),
|
afterReset(false),
|
||||||
blocked(false),
|
blocked(false),
|
||||||
addMode(false),
|
addMode(false),
|
||||||
eventPending(false),
|
|
||||||
vMin(vmin),
|
vMin(vmin),
|
||||||
vMax(vmax),
|
vMax(vmax),
|
||||||
vStep(vstep),
|
vStep(vstep),
|
||||||
@ -67,8 +66,7 @@ Adjuster::Adjuster (
|
|||||||
logPivot(0),
|
logPivot(0),
|
||||||
logAnchorMiddle(false),
|
logAnchorMiddle(false),
|
||||||
value2slider(value2slider ? value2slider : &one2one),
|
value2slider(value2slider ? value2slider : &one2one),
|
||||||
slider2value(slider2value ? slider2value : &one2one),
|
slider2value(slider2value ? slider2value : &one2one)
|
||||||
delay(options.adjusterMinDelay)
|
|
||||||
|
|
||||||
{
|
{
|
||||||
set_hexpand(true);
|
set_hexpand(true);
|
||||||
@ -155,8 +153,27 @@ Adjuster::Adjuster (
|
|||||||
defaultVal = ctorDefaultVal = shapeValue(vdefault);
|
defaultVal = ctorDefaultVal = shapeValue(vdefault);
|
||||||
editedState = defEditedState = Irrelevant;
|
editedState = defEditedState = Irrelevant;
|
||||||
|
|
||||||
sliderChange = slider->signal_value_changed().connect( sigc::mem_fun(*this, &Adjuster::sliderChanged) );
|
spinChange.connect(
|
||||||
spinChange = spin->signal_value_changed().connect( sigc::mem_fun(*this, &Adjuster::spinChanged), true);
|
spin->signal_value_changed(),
|
||||||
|
sigc::mem_fun(*this, &Adjuster::spinChanged),
|
||||||
|
[this]()
|
||||||
|
{
|
||||||
|
sliderChange.block(true);
|
||||||
|
setSliderValue(addMode ? spin->get_value() : this->value2slider(spin->get_value()));
|
||||||
|
sliderChange.block(false);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
sliderChange.connect(
|
||||||
|
slider->signal_value_changed(),
|
||||||
|
sigc::mem_fun(*this, &Adjuster::sliderChanged),
|
||||||
|
[this]()
|
||||||
|
{
|
||||||
|
spinChange.block();
|
||||||
|
const double v = shapeValue(getSliderValue());
|
||||||
|
spin->set_value(addMode ? v : this->slider2value(v));
|
||||||
|
spinChange.unblock();
|
||||||
|
}
|
||||||
|
);
|
||||||
reset->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &Adjuster::resetPressed) );
|
reset->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &Adjuster::resetPressed) );
|
||||||
|
|
||||||
show_all();
|
show_all();
|
||||||
@ -165,9 +182,8 @@ Adjuster::Adjuster (
|
|||||||
Adjuster::~Adjuster ()
|
Adjuster::~Adjuster ()
|
||||||
{
|
{
|
||||||
|
|
||||||
sliderChange.block(true);
|
sliderChange.block();
|
||||||
spinChange.block(true);
|
spinChange.block();
|
||||||
delayConnection.block(true);
|
|
||||||
adjusterListener = nullptr;
|
adjusterListener = nullptr;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -211,8 +227,6 @@ void Adjuster::throwOnButtonRelease(bool throwOnBRelease)
|
|||||||
buttonReleaseSpin.disconnect();
|
buttonReleaseSpin.disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eventPending = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Adjuster::setDefault (double def)
|
void Adjuster::setDefault (double def)
|
||||||
@ -239,9 +253,7 @@ void Adjuster::sliderReleased (GdkEventButton* event)
|
|||||||
{
|
{
|
||||||
|
|
||||||
if ((event != nullptr) && (event->button == 1)) {
|
if ((event != nullptr) && (event->button == 1)) {
|
||||||
if (delayConnection.connected()) {
|
sliderChange.cancel();
|
||||||
delayConnection.disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
notifyListener();
|
notifyListener();
|
||||||
}
|
}
|
||||||
@ -250,10 +262,8 @@ void Adjuster::sliderReleased (GdkEventButton* event)
|
|||||||
void Adjuster::spinReleased (GdkEventButton* event)
|
void Adjuster::spinReleased (GdkEventButton* event)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((event != nullptr) && delay == 0) {
|
if (event) {
|
||||||
if (delayConnection.connected()) {
|
spinChange.cancel();
|
||||||
delayConnection.disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
notifyListener();
|
notifyListener();
|
||||||
}
|
}
|
||||||
@ -351,31 +361,15 @@ void Adjuster::setAddMode(bool addM)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Adjuster::spinChanged ()
|
void Adjuster::spinChanged()
|
||||||
{
|
{
|
||||||
if (delayConnection.connected()) {
|
if (adjusterListener && !blocked) {
|
||||||
delayConnection.disconnect();
|
if (!buttonReleaseSlider.connected() || afterReset) {
|
||||||
}
|
if (automatic) {
|
||||||
|
setAutoValue(false);
|
||||||
sliderChange.block(true);
|
|
||||||
setSliderValue(addMode ? spin->get_value() : value2slider(spin->get_value()));
|
|
||||||
sliderChange.block(false);
|
|
||||||
|
|
||||||
if (delay == 0) {
|
|
||||||
if (adjusterListener && !blocked) {
|
|
||||||
if (!buttonReleaseSlider.connected() || afterReset) {
|
|
||||||
eventPending = false;
|
|
||||||
if (automatic) {
|
|
||||||
setAutoValue(false);
|
|
||||||
}
|
|
||||||
adjusterListener->adjusterChanged(this, spin->get_value());
|
|
||||||
} else {
|
|
||||||
eventPending = true;
|
|
||||||
}
|
}
|
||||||
|
adjusterListener->adjusterChanged(this, spin->get_value());
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
eventPending = true;
|
|
||||||
delayConnection = Glib::signal_timeout().connect(sigc::mem_fun(*this, &Adjuster::notifyListener), delay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editedState == UnEdited) {
|
if (editedState == UnEdited) {
|
||||||
@ -393,31 +387,13 @@ void Adjuster::spinChanged ()
|
|||||||
|
|
||||||
void Adjuster::sliderChanged ()
|
void Adjuster::sliderChanged ()
|
||||||
{
|
{
|
||||||
|
if (adjusterListener && !blocked) {
|
||||||
if (delayConnection.connected()) {
|
if (!buttonReleaseSlider.connected() || afterReset) {
|
||||||
delayConnection.disconnect();
|
if (automatic) {
|
||||||
}
|
setAutoValue(false);
|
||||||
|
|
||||||
spinChange.block(true);
|
|
||||||
const double v = shapeValue(getSliderValue());
|
|
||||||
spin->set_value(addMode ? v : slider2value(v));
|
|
||||||
spinChange.block(false);
|
|
||||||
|
|
||||||
if (delay == 0 || afterReset) {
|
|
||||||
if (adjusterListener && !blocked) {
|
|
||||||
if (!buttonReleaseSlider.connected() || afterReset) {
|
|
||||||
eventPending = false;
|
|
||||||
if (automatic) {
|
|
||||||
setAutoValue(false);
|
|
||||||
}
|
|
||||||
adjusterListener->adjusterChanged(this, spin->get_value());
|
|
||||||
} else {
|
|
||||||
eventPending = true;
|
|
||||||
}
|
}
|
||||||
|
adjusterListener->adjusterChanged(this, spin->get_value());
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
eventPending = true;
|
|
||||||
delayConnection = Glib::signal_timeout().connect(sigc::mem_fun(*this, &Adjuster::notifyListener), delay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!afterReset && editedState == UnEdited) {
|
if (!afterReset && editedState == UnEdited) {
|
||||||
@ -435,12 +411,12 @@ void Adjuster::sliderChanged ()
|
|||||||
|
|
||||||
void Adjuster::setValue (double a)
|
void Adjuster::setValue (double a)
|
||||||
{
|
{
|
||||||
spinChange.block(true);
|
spinChange.block();
|
||||||
sliderChange.block(true);
|
sliderChange.block(true);
|
||||||
spin->set_value(shapeValue(a));
|
spin->set_value(shapeValue(a));
|
||||||
setSliderValue(addMode ? shapeValue(a) : value2slider(shapeValue(a)));
|
setSliderValue(addMode ? shapeValue(a) : value2slider(shapeValue(a)));
|
||||||
sliderChange.block(false);
|
sliderChange.block(false);
|
||||||
spinChange.block(false);
|
spinChange.unblock();
|
||||||
afterReset = false;
|
afterReset = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,16 +431,13 @@ void Adjuster::setAutoValue (bool a)
|
|||||||
|
|
||||||
bool Adjuster::notifyListener ()
|
bool Adjuster::notifyListener ()
|
||||||
{
|
{
|
||||||
|
if (adjusterListener != nullptr && !blocked) {
|
||||||
if (eventPending && adjusterListener != nullptr && !blocked) {
|
|
||||||
if (automatic) {
|
if (automatic) {
|
||||||
setAutoValue(false);
|
setAutoValue(false);
|
||||||
}
|
}
|
||||||
adjusterListener->adjusterChanged(this, spin->get_value());
|
adjusterListener->adjusterChanged(this, spin->get_value());
|
||||||
}
|
}
|
||||||
|
|
||||||
eventPending = false;
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -555,8 +528,6 @@ void Adjuster::editedToggled ()
|
|||||||
}
|
}
|
||||||
adjusterListener->adjusterChanged(this, spin->get_value());
|
adjusterListener->adjusterChanged(this, spin->get_value());
|
||||||
}
|
}
|
||||||
|
|
||||||
eventPending = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Adjuster::trimValue (double &val) const
|
void Adjuster::trimValue (double &val) const
|
||||||
@ -706,3 +677,9 @@ bool Adjuster::getAddMode() const
|
|||||||
{
|
{
|
||||||
return addMode;
|
return addMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Adjuster::setDelay(unsigned int min_delay_ms, unsigned int max_delay_ms)
|
||||||
|
{
|
||||||
|
spinChange.setDelay(min_delay_ms, max_delay_ms);
|
||||||
|
sliderChange.setDelay(min_delay_ms, max_delay_ms);
|
||||||
|
}
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "editedstate.h"
|
#include "editedstate.h"
|
||||||
|
#include "delayed.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
|
||||||
class Adjuster;
|
class Adjuster;
|
||||||
@ -35,7 +36,6 @@ typedef double(*double2double_fun)(double val);
|
|||||||
|
|
||||||
class Adjuster final : public Gtk::Grid
|
class Adjuster final : public Gtk::Grid
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Glib::ustring adjustmentName;
|
Glib::ustring adjustmentName;
|
||||||
Gtk::Grid* grid;
|
Gtk::Grid* grid;
|
||||||
@ -46,9 +46,8 @@ protected:
|
|||||||
Gtk::Button* reset;
|
Gtk::Button* reset;
|
||||||
Gtk::CheckButton* automatic;
|
Gtk::CheckButton* automatic;
|
||||||
AdjusterListener* adjusterListener;
|
AdjusterListener* adjusterListener;
|
||||||
sigc::connection delayConnection;
|
DelayedConnection<> spinChange;
|
||||||
sigc::connection spinChange;
|
DelayedConnection<> sliderChange;
|
||||||
sigc::connection sliderChange;
|
|
||||||
sigc::connection editedChange;
|
sigc::connection editedChange;
|
||||||
sigc::connection autoChange;
|
sigc::connection autoChange;
|
||||||
sigc::connection buttonReleaseSlider;
|
sigc::connection buttonReleaseSlider;
|
||||||
@ -62,7 +61,6 @@ protected:
|
|||||||
bool afterReset;
|
bool afterReset;
|
||||||
bool blocked;
|
bool blocked;
|
||||||
bool addMode;
|
bool addMode;
|
||||||
bool eventPending;
|
|
||||||
double vMin;
|
double vMin;
|
||||||
double vMax;
|
double vMax;
|
||||||
double vStep;
|
double vStep;
|
||||||
@ -78,11 +76,18 @@ protected:
|
|||||||
void setSliderValue(double val);
|
void setSliderValue(double val);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Adjuster(
|
||||||
int delay;
|
Glib::ustring vlabel,
|
||||||
|
double vmin,
|
||||||
Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1 = nullptr, Gtk::Image *imgIcon2 = nullptr, double2double_fun slider2value = nullptr, double2double_fun value2slider = nullptr);
|
double vmax,
|
||||||
~Adjuster () override;
|
double vstep,
|
||||||
|
double vdefault,
|
||||||
|
Gtk::Image *imgIcon1 = nullptr,
|
||||||
|
Gtk::Image *imgIcon2 = nullptr,
|
||||||
|
double2double_fun slider2value = nullptr,
|
||||||
|
double2double_fun value2slider = nullptr
|
||||||
|
);
|
||||||
|
~Adjuster() override;
|
||||||
|
|
||||||
// Add an "Automatic" checkbox next to the reset button.
|
// Add an "Automatic" checkbox next to the reset button.
|
||||||
void addAutoButton(const Glib::ustring &tooltip = "");
|
void addAutoButton(const Glib::ustring &tooltip = "");
|
||||||
@ -127,4 +132,5 @@ public:
|
|||||||
void trimValue (float &val) const;
|
void trimValue (float &val) const;
|
||||||
void trimValue (int &val) const;
|
void trimValue (int &val) const;
|
||||||
void setLogScale(double base, double pivot, bool anchorMiddle = false);
|
void setLogScale(double base, double pivot, bool anchorMiddle = false);
|
||||||
|
void setDelay(unsigned int min_delay_ms, unsigned int max_delay_ms = 0);
|
||||||
};
|
};
|
||||||
|
@ -37,18 +37,14 @@ BayerPreProcess::BayerPreProcess() : FoldableToolPanel(this, "bayerpreprocess",
|
|||||||
lineDenoise = Gtk::manage(new Adjuster(M("TP_PREPROCESS_LINEDENOISE"), 0, 1000, 1, 0));
|
lineDenoise = Gtk::manage(new Adjuster(M("TP_PREPROCESS_LINEDENOISE"), 0, 1000, 1, 0));
|
||||||
lineDenoise->setAdjusterListener(this);
|
lineDenoise->setAdjusterListener(this);
|
||||||
|
|
||||||
if (lineDenoise->delay < options.adjusterMaxDelay) {
|
lineDenoise->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
lineDenoise->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
lineDenoise->show();
|
lineDenoise->show();
|
||||||
|
|
||||||
greenEqThreshold = Gtk::manage(new Adjuster(M("TP_PREPROCESS_GREENEQUIL"), 0, 100, 1, 0));
|
greenEqThreshold = Gtk::manage(new Adjuster(M("TP_PREPROCESS_GREENEQUIL"), 0, 100, 1, 0));
|
||||||
greenEqThreshold->setAdjusterListener(this);
|
greenEqThreshold->setAdjusterListener(this);
|
||||||
|
|
||||||
if (greenEqThreshold->delay < options.adjusterMaxDelay) {
|
greenEqThreshold->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
greenEqThreshold->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
greenEqThreshold->show();
|
greenEqThreshold->show();
|
||||||
|
|
||||||
|
@ -60,9 +60,7 @@ BayerProcess::BayerProcess () :
|
|||||||
dualDemosaicContrast->setAdjusterListener(this);
|
dualDemosaicContrast->setAdjusterListener(this);
|
||||||
dualDemosaicContrast->addAutoButton(M("TP_RAW_DUALDEMOSAICAUTOCONTRAST_TOOLTIP"));
|
dualDemosaicContrast->addAutoButton(M("TP_RAW_DUALDEMOSAICAUTOCONTRAST_TOOLTIP"));
|
||||||
dualDemosaicContrast->setAutoValue(true);
|
dualDemosaicContrast->setAutoValue(true);
|
||||||
if (dualDemosaicContrast->delay < options.adjusterMaxDelay) {
|
dualDemosaicContrast->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
dualDemosaicContrast->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
dualDemosaicContrast->show();
|
dualDemosaicContrast->show();
|
||||||
dualDemosaicOptions->pack_start(*dualDemosaicContrast);
|
dualDemosaicOptions->pack_start(*dualDemosaicContrast);
|
||||||
@ -72,9 +70,7 @@ BayerProcess::BayerProcess () :
|
|||||||
border = Gtk::manage(new Adjuster(M("TP_RAW_BORDER"), 0, 16, 1, 4));
|
border = Gtk::manage(new Adjuster(M("TP_RAW_BORDER"), 0, 16, 1, 4));
|
||||||
border->setAdjusterListener (this);
|
border->setAdjusterListener (this);
|
||||||
|
|
||||||
if (border->delay < options.adjusterMaxDelay) {
|
border->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
border->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
border->show();
|
border->show();
|
||||||
borderbox->pack_start(*border);
|
borderbox->pack_start(*border);
|
||||||
@ -96,22 +92,17 @@ BayerProcess::BayerProcess () :
|
|||||||
ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 ));
|
ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 ));
|
||||||
ccSteps->setAdjusterListener (this);
|
ccSteps->setAdjusterListener (this);
|
||||||
|
|
||||||
if (ccSteps->delay < options.adjusterMaxDelay) {
|
ccSteps->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
ccSteps->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
ccSteps->show();
|
ccSteps->show();
|
||||||
pack_start( *ccSteps, Gtk::PACK_SHRINK, 4);
|
pack_start( *ccSteps, Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
|
|
||||||
dcbOptions = Gtk::manage (new Gtk::VBox ());
|
dcbOptions = Gtk::manage (new Gtk::VBox ());
|
||||||
|
|
||||||
dcbIterations = Gtk::manage (new Adjuster (M("TP_RAW_DCBITERATIONS"), 0, 5, 1, 2));
|
dcbIterations = Gtk::manage (new Adjuster (M("TP_RAW_DCBITERATIONS"), 0, 5, 1, 2));
|
||||||
dcbIterations->setAdjusterListener (this);
|
dcbIterations->setAdjusterListener (this);
|
||||||
|
|
||||||
if (dcbIterations->delay < options.adjusterMaxDelay) {
|
dcbIterations->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
dcbIterations->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
dcbIterations->show();
|
dcbIterations->show();
|
||||||
dcbEnhance = Gtk::manage (new CheckBox(M("TP_RAW_DCBENHANCE"), multiImage));
|
dcbEnhance = Gtk::manage (new CheckBox(M("TP_RAW_DCBENHANCE"), multiImage));
|
||||||
@ -126,9 +117,7 @@ BayerProcess::BayerProcess () :
|
|||||||
lmmseIterations->setAdjusterListener (this);
|
lmmseIterations->setAdjusterListener (this);
|
||||||
lmmseIterations->set_tooltip_markup (M("TP_RAW_LMMSE_TOOLTIP"));
|
lmmseIterations->set_tooltip_markup (M("TP_RAW_LMMSE_TOOLTIP"));
|
||||||
|
|
||||||
if (lmmseIterations->delay < options.adjusterMaxDelay) {
|
lmmseIterations->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
lmmseIterations->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
lmmseIterations->show();
|
lmmseIterations->show();
|
||||||
lmmseOptions->pack_start(*lmmseIterations);
|
lmmseOptions->pack_start(*lmmseIterations);
|
||||||
@ -209,9 +198,7 @@ BayerProcess::BayerProcess () :
|
|||||||
pixelShiftSigma->set_tooltip_text (M("TP_RAW_PIXELSHIFTSIGMA_TOOLTIP"));
|
pixelShiftSigma->set_tooltip_text (M("TP_RAW_PIXELSHIFTSIGMA_TOOLTIP"));
|
||||||
pixelShiftSigma->setAdjusterListener (this);
|
pixelShiftSigma->setAdjusterListener (this);
|
||||||
|
|
||||||
if (pixelShiftSigma->delay < options.adjusterMaxDelay) {
|
pixelShiftSigma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
pixelShiftSigma->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
pixelShiftSigma->show();
|
pixelShiftSigma->show();
|
||||||
pixelShiftOptions->pack_start(*pixelShiftSigma);
|
pixelShiftOptions->pack_start(*pixelShiftSigma);
|
||||||
@ -221,9 +208,7 @@ BayerProcess::BayerProcess () :
|
|||||||
pixelShiftSmooth->set_tooltip_text (M("TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP"));
|
pixelShiftSmooth->set_tooltip_text (M("TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP"));
|
||||||
pixelShiftSmooth->setAdjusterListener (this);
|
pixelShiftSmooth->setAdjusterListener (this);
|
||||||
|
|
||||||
if (pixelShiftSmooth->delay < options.adjusterMaxDelay) {
|
pixelShiftSmooth->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
pixelShiftSmooth->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
pixelShiftSmooth->show();
|
pixelShiftSmooth->show();
|
||||||
pixelShiftOptions->pack_start(*pixelShiftSmooth);
|
pixelShiftOptions->pack_start(*pixelShiftSmooth);
|
||||||
@ -232,9 +217,7 @@ BayerProcess::BayerProcess () :
|
|||||||
pixelShiftEperIso->set_tooltip_text(M("TP_RAW_PIXELSHIFTEPERISO_TOOLTIP"));
|
pixelShiftEperIso->set_tooltip_text(M("TP_RAW_PIXELSHIFTEPERISO_TOOLTIP"));
|
||||||
pixelShiftEperIso->setAdjusterListener (this);
|
pixelShiftEperIso->setAdjusterListener (this);
|
||||||
|
|
||||||
if (pixelShiftEperIso->delay < options.adjusterMaxDelay) {
|
pixelShiftEperIso->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
pixelShiftEperIso->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
pixelShiftEperIso->show();
|
pixelShiftEperIso->show();
|
||||||
pixelShiftOptions->pack_start(*pixelShiftEperIso);
|
pixelShiftOptions->pack_start(*pixelShiftEperIso);
|
||||||
|
@ -31,33 +31,25 @@ BayerRAWExposure::BayerRAWExposure () : FoldableToolPanel(this, "bayerrawexposur
|
|||||||
PexBlack1 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_1"), -2048, 2048, 1.0, 0)); //black level
|
PexBlack1 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_1"), -2048, 2048, 1.0, 0)); //black level
|
||||||
PexBlack1->setAdjusterListener (this);
|
PexBlack1->setAdjusterListener (this);
|
||||||
|
|
||||||
if (PexBlack1->delay < options.adjusterMaxDelay) {
|
PexBlack1->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
PexBlack1->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
PexBlack1->show();
|
PexBlack1->show();
|
||||||
PexBlack2 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_2"), -2048, 2048, 1.0, 0)); //black level
|
PexBlack2 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_2"), -2048, 2048, 1.0, 0)); //black level
|
||||||
PexBlack2->setAdjusterListener (this);
|
PexBlack2->setAdjusterListener (this);
|
||||||
|
|
||||||
if (PexBlack2->delay < options.adjusterMaxDelay) {
|
PexBlack2->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
PexBlack2->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
PexBlack2->show();
|
PexBlack2->show();
|
||||||
PexBlack3 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_3"), -2048, 2048, 1.0, 0)); //black level
|
PexBlack3 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_3"), -2048, 2048, 1.0, 0)); //black level
|
||||||
PexBlack3->setAdjusterListener (this);
|
PexBlack3->setAdjusterListener (this);
|
||||||
|
|
||||||
if (PexBlack3->delay < options.adjusterMaxDelay) {
|
PexBlack3->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
PexBlack3->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
PexBlack3->show();
|
PexBlack3->show();
|
||||||
PexBlack0 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_0"), -2048, 2048, 1.0, 0)); //black level
|
PexBlack0 = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_0"), -2048, 2048, 1.0, 0)); //black level
|
||||||
PexBlack0->setAdjusterListener (this);
|
PexBlack0->setAdjusterListener (this);
|
||||||
|
|
||||||
if (PexBlack0->delay < options.adjusterMaxDelay) {
|
PexBlack0->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
PexBlack0->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
PexBlack0->show();
|
PexBlack0->show();
|
||||||
PextwoGreen = Gtk::manage(new CheckBox(M("TP_RAWEXPOS_TWOGREEN"), multiImage));// two green
|
PextwoGreen = Gtk::manage(new CheckBox(M("TP_RAWEXPOS_TWOGREEN"), multiImage));// two green
|
||||||
|
@ -244,9 +244,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
degree = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 90.));
|
degree = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 90.));
|
||||||
|
|
||||||
if (degree->delay < options.adjusterMaxDelay) {
|
degree->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
degree->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
degree->throwOnButtonRelease();
|
degree->throwOnButtonRelease();
|
||||||
degree->addAutoButton (M ("TP_COLORAPP_CAT02ADAPTATION_TOOLTIP"));
|
degree->addAutoButton (M ("TP_COLORAPP_CAT02ADAPTATION_TOOLTIP"));
|
||||||
@ -325,9 +323,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
// adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17
|
// adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17
|
||||||
adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 1997.4, NULL, NULL, &wbSlider2la, &wbla2Slider));
|
adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 1997.4, NULL, NULL, &wbSlider2la, &wbla2Slider));
|
||||||
|
|
||||||
if (adapscen->delay < options.adjusterMaxDelay) {
|
adapscen->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
adapscen->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
adapscen->throwOnButtonRelease();
|
adapscen->throwOnButtonRelease();
|
||||||
adapscen->addAutoButton();
|
adapscen->addAutoButton();
|
||||||
@ -335,9 +331,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_MEANLUMINANCE"), 1, 90, 1, 18));
|
ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_MEANLUMINANCE"), 1, 90, 1, 18));
|
||||||
|
|
||||||
if (ybscen->delay < options.adjusterMaxDelay) {
|
ybscen->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
ybscen->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
ybscen->throwOnButtonRelease();
|
ybscen->throwOnButtonRelease();
|
||||||
ybscen->addAutoButton();
|
ybscen->addAutoButton();
|
||||||
@ -386,9 +380,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
jlight = Gtk::manage (new Adjuster (M ("TP_COLORAPP_LIGHT"), -100.0, 100.0, 0.1, 0.));
|
jlight = Gtk::manage (new Adjuster (M ("TP_COLORAPP_LIGHT"), -100.0, 100.0, 0.1, 0.));
|
||||||
|
|
||||||
if (jlight->delay < options.adjusterMaxDelay) {
|
jlight->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
jlight->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
jlight->throwOnButtonRelease();
|
jlight->throwOnButtonRelease();
|
||||||
jlight->set_tooltip_markup (M ("TP_COLORAPP_LIGHT_TOOLTIP"));
|
jlight->set_tooltip_markup (M ("TP_COLORAPP_LIGHT_TOOLTIP"));
|
||||||
@ -396,9 +388,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
qbright = Gtk::manage (new Adjuster (M ("TP_COLORAPP_BRIGHT"), -100.0, 100.0, 0.1, 0.));
|
qbright = Gtk::manage (new Adjuster (M ("TP_COLORAPP_BRIGHT"), -100.0, 100.0, 0.1, 0.));
|
||||||
|
|
||||||
if (qbright->delay < options.adjusterMaxDelay) {
|
qbright->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
qbright->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
qbright->throwOnButtonRelease();
|
qbright->throwOnButtonRelease();
|
||||||
qbright->set_tooltip_markup (M ("TP_COLORAPP_BRIGHT_TOOLTIP"));
|
qbright->set_tooltip_markup (M ("TP_COLORAPP_BRIGHT_TOOLTIP"));
|
||||||
@ -406,9 +396,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
chroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA"), -100.0, 100.0, 0.1, 0.));
|
chroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA"), -100.0, 100.0, 0.1, 0.));
|
||||||
|
|
||||||
if (chroma->delay < options.adjusterMaxDelay) {
|
chroma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
chroma->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
chroma->throwOnButtonRelease();
|
chroma->throwOnButtonRelease();
|
||||||
chroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_TOOLTIP"));
|
chroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_TOOLTIP"));
|
||||||
@ -417,9 +405,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
schroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA_S"), -100.0, 100.0, 0.1, 0.));
|
schroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA_S"), -100.0, 100.0, 0.1, 0.));
|
||||||
|
|
||||||
if (schroma->delay < options.adjusterMaxDelay) {
|
schroma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
schroma->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
schroma->throwOnButtonRelease();
|
schroma->throwOnButtonRelease();
|
||||||
schroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_S_TOOLTIP"));
|
schroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_S_TOOLTIP"));
|
||||||
@ -427,9 +413,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
mchroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA_M"), -100.0, 100.0, 0.1, 0.));
|
mchroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA_M"), -100.0, 100.0, 0.1, 0.));
|
||||||
|
|
||||||
if (mchroma->delay < options.adjusterMaxDelay) {
|
mchroma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
mchroma->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
mchroma->throwOnButtonRelease();
|
mchroma->throwOnButtonRelease();
|
||||||
mchroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_M_TOOLTIP"));
|
mchroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_M_TOOLTIP"));
|
||||||
@ -437,9 +421,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
rstprotection = Gtk::manage ( new Adjuster (M ("TP_COLORAPP_RSTPRO"), 0., 100., 0.1, 0.) );
|
rstprotection = Gtk::manage ( new Adjuster (M ("TP_COLORAPP_RSTPRO"), 0., 100., 0.1, 0.) );
|
||||||
|
|
||||||
if (rstprotection->delay < options.adjusterMaxDelay) {
|
rstprotection->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
rstprotection->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
rstprotection->throwOnButtonRelease();
|
rstprotection->throwOnButtonRelease();
|
||||||
rstprotection->set_tooltip_markup (M ("TP_COLORAPP_RSTPRO_TOOLTIP"));
|
rstprotection->set_tooltip_markup (M ("TP_COLORAPP_RSTPRO_TOOLTIP"));
|
||||||
@ -447,9 +429,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
contrast = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CONTRAST"), -100.0, 100.0, 0.1, 0.));
|
contrast = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CONTRAST"), -100.0, 100.0, 0.1, 0.));
|
||||||
|
|
||||||
if (contrast->delay < options.adjusterMaxDelay) {
|
contrast->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
contrast->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
contrast->throwOnButtonRelease();
|
contrast->throwOnButtonRelease();
|
||||||
contrast->set_tooltip_markup (M ("TP_COLORAPP_CONTRAST_TOOLTIP"));
|
contrast->set_tooltip_markup (M ("TP_COLORAPP_CONTRAST_TOOLTIP"));
|
||||||
@ -457,9 +437,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
qcontrast = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CONTRAST_Q"), -100.0, 100.0, 0.1, 0.));
|
qcontrast = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CONTRAST_Q"), -100.0, 100.0, 0.1, 0.));
|
||||||
|
|
||||||
if (qcontrast->delay < options.adjusterMaxDelay) {
|
qcontrast->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
qcontrast->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
qcontrast->throwOnButtonRelease();
|
qcontrast->throwOnButtonRelease();
|
||||||
qcontrast->set_tooltip_markup (M ("TP_COLORAPP_CONTRAST_Q_TOOLTIP"));
|
qcontrast->set_tooltip_markup (M ("TP_COLORAPP_CONTRAST_Q_TOOLTIP"));
|
||||||
@ -468,9 +446,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
colorh = Gtk::manage (new Adjuster (M ("TP_COLORAPP_HUE"), -100.0, 100.0, 0.1, 0.));
|
colorh = Gtk::manage (new Adjuster (M ("TP_COLORAPP_HUE"), -100.0, 100.0, 0.1, 0.));
|
||||||
|
|
||||||
if (colorh->delay < options.adjusterMaxDelay) {
|
colorh->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
colorh->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
colorh->throwOnButtonRelease();
|
colorh->throwOnButtonRelease();
|
||||||
colorh->set_tooltip_markup (M ("TP_COLORAPP_HUE_TOOLTIP"));
|
colorh->set_tooltip_markup (M ("TP_COLORAPP_HUE_TOOLTIP"));
|
||||||
@ -618,9 +594,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
// adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), 0.1, 16384., 0.1, 16.));
|
// adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), 0.1, 16384., 0.1, 16.));
|
||||||
adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 16, NULL, NULL, &wbSlider2la, &wbla2Slider));
|
adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ABSOLUTELUMINANCE"), MINLA0, MAXLA0, 0.01, 16, NULL, NULL, &wbSlider2la, &wbla2Slider));
|
||||||
|
|
||||||
if (adaplum->delay < options.adjusterMaxDelay) {
|
adaplum->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
adaplum->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
adaplum->throwOnButtonRelease();
|
adaplum->throwOnButtonRelease();
|
||||||
adaplum->set_tooltip_markup (M ("TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP"));
|
adaplum->set_tooltip_markup (M ("TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP"));
|
||||||
@ -631,9 +605,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
|
|
||||||
degreeout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 90.));
|
degreeout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 90.));
|
||||||
|
|
||||||
if (degreeout->delay < options.adjusterMaxDelay) {
|
degreeout->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
degreeout->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
degreeout->throwOnButtonRelease();
|
degreeout->throwOnButtonRelease();
|
||||||
degreeout->addAutoButton (M ("TP_COLORAPP_CAT02ADAPTATION_TOOLTIP"));
|
degreeout->addAutoButton (M ("TP_COLORAPP_CAT02ADAPTATION_TOOLTIP"));
|
||||||
@ -694,9 +666,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
|
|||||||
*/
|
*/
|
||||||
badpixsl = Gtk::manage (new Adjuster (M ("TP_COLORAPP_BADPIXSL"), 0, 2, 1, 0));
|
badpixsl = Gtk::manage (new Adjuster (M ("TP_COLORAPP_BADPIXSL"), 0, 2, 1, 0));
|
||||||
|
|
||||||
if (badpixsl->delay < options.adjusterMaxDelay) {
|
badpixsl->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
badpixsl->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
badpixsl->throwOnButtonRelease();
|
badpixsl->throwOnButtonRelease();
|
||||||
badpixsl->set_tooltip_markup (M ("TP_COLORAPP_BADPIXSL_TOOLTIP"));
|
badpixsl->set_tooltip_markup (M ("TP_COLORAPP_BADPIXSL_TOOLTIP"));
|
||||||
|
@ -488,11 +488,11 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
|
|||||||
|
|
||||||
pack_start(*labRegionBox, Gtk::PACK_EXPAND_WIDGET, 4);
|
pack_start(*labRegionBox, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||||
|
|
||||||
labRegionSaturation->delay = options.adjusterMaxDelay;
|
labRegionSaturation->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
labRegionSlope->delay = options.adjusterMaxDelay;
|
labRegionSlope->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
labRegionOffset->delay = options.adjusterMaxDelay;
|
labRegionOffset->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
labRegionPower->delay = options.adjusterMaxDelay;
|
labRegionPower->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
labRegionMaskBlur->delay = options.adjusterMaxDelay;
|
labRegionMaskBlur->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
||||||
show_all();
|
show_all();
|
||||||
|
240
rtgui/delayed.h
Normal file
240
rtgui/delayed.h
Normal file
@ -0,0 +1,240 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of RawTherapee.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2020 Flössie <floessie.mail@gmail.com>
|
||||||
|
*
|
||||||
|
* RawTherapee is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* RawTherapee is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <functional>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
|
#include <glibmm/main.h>
|
||||||
|
#include <glibmm/signalproxy.h>
|
||||||
|
|
||||||
|
#include "../rtengine/noncopyable.h"
|
||||||
|
|
||||||
|
namespace delayed_helper
|
||||||
|
{
|
||||||
|
|
||||||
|
// C++14
|
||||||
|
|
||||||
|
// See https://gist.github.com/ntessore/dc17769676fb3c6daa1f
|
||||||
|
template<std::size_t... Is>
|
||||||
|
struct index_sequence
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<std::size_t N, std::size_t... Is>
|
||||||
|
struct make_index_sequence :
|
||||||
|
make_index_sequence<N-1, N-1, Is...>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<std::size_t... Is>
|
||||||
|
struct make_index_sequence<0, Is...> :
|
||||||
|
index_sequence<Is...>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
// C++17
|
||||||
|
|
||||||
|
// See https://aherrmann.github.io/programming/2016/02/28/unpacking-tuples-in-cpp14/
|
||||||
|
template<typename F, typename T, size_t... Is>
|
||||||
|
void apply_impl(F f, T t, index_sequence<Is...>)
|
||||||
|
{
|
||||||
|
f(std::get<Is>(t)...);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, typename F>
|
||||||
|
void apply(F f, T t)
|
||||||
|
{
|
||||||
|
apply_impl(f, t, make_index_sequence<std::tuple_size<T>{}>{});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename... Ts>
|
||||||
|
class DelayedCall final :
|
||||||
|
public rtengine::NonCopyable
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DelayedCall(std::function<void (Ts...)> _function, unsigned int _min_delay_ms, unsigned int _max_delay_ms = 0) :
|
||||||
|
function(_function),
|
||||||
|
min_delay_ms(_min_delay_ms),
|
||||||
|
max_delay_ms(_max_delay_ms)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
DelayedCall(unsigned int _min_delay_ms, unsigned int _max_delay_ms = 0) :
|
||||||
|
DelayedCall({}, _min_delay_ms, _max_delay_ms)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void setFunction(std::function<void (Ts...)> function)
|
||||||
|
{
|
||||||
|
this->function = function;
|
||||||
|
}
|
||||||
|
|
||||||
|
void operator ()(Ts... ts)
|
||||||
|
{
|
||||||
|
if (!function) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!min_delay_ms) {
|
||||||
|
function(ts...);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
params = std::make_tuple(ts...);
|
||||||
|
|
||||||
|
min_timeout.disconnect();
|
||||||
|
min_timeout = Glib::signal_timeout().connect(sigc::mem_fun(*this, &DelayedCall::onMinTimeout), min_delay_ms);
|
||||||
|
|
||||||
|
if (max_delay_ms && !max_timeout.connected()) {
|
||||||
|
max_timeout = Glib::signal_timeout().connect(sigc::mem_fun(*this, &DelayedCall::onMaxTimeout), max_delay_ms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void cancel()
|
||||||
|
{
|
||||||
|
min_timeout.disconnect();
|
||||||
|
max_timeout.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool onMinTimeout()
|
||||||
|
{
|
||||||
|
max_timeout.disconnect();
|
||||||
|
if (function) {
|
||||||
|
delayed_helper::apply(function, params);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool onMaxTimeout()
|
||||||
|
{
|
||||||
|
min_timeout.disconnect();
|
||||||
|
if (function) {
|
||||||
|
delayed_helper::apply(function, params);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::function<void (Ts...)> function;
|
||||||
|
|
||||||
|
unsigned int min_delay_ms;
|
||||||
|
unsigned int max_delay_ms;
|
||||||
|
|
||||||
|
sigc::connection min_timeout;
|
||||||
|
sigc::connection max_timeout;
|
||||||
|
|
||||||
|
std::tuple<Ts...> params;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename... Ts>
|
||||||
|
class DelayedConnection final :
|
||||||
|
public rtengine::NonCopyable
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DelayedConnection(unsigned int _min_delay_ms, unsigned int _max_delay_ms = 0) :
|
||||||
|
min_delay_ms(_min_delay_ms),
|
||||||
|
max_delay_ms(_max_delay_ms)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void connect(Glib::SignalProxy<void, Ts...> signal, const sigc::slot<void, Ts...>& slot, const sigc::slot<void, Ts...>& immediate_slot = {})
|
||||||
|
{
|
||||||
|
this->slot = slot;
|
||||||
|
this->immediate_slot = immediate_slot;
|
||||||
|
this->signal = signal.connect(sigc::mem_fun(*this, &DelayedConnection::onSignal));
|
||||||
|
}
|
||||||
|
|
||||||
|
void block(bool value = true)
|
||||||
|
{
|
||||||
|
signal.block(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void unblock()
|
||||||
|
{
|
||||||
|
signal.unblock();
|
||||||
|
}
|
||||||
|
|
||||||
|
void cancel()
|
||||||
|
{
|
||||||
|
min_timeout.disconnect();
|
||||||
|
max_timeout.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setDelay(unsigned int min_delay_ms, unsigned int max_delay_ms = 0)
|
||||||
|
{
|
||||||
|
this->min_delay_ms = min_delay_ms;
|
||||||
|
this->max_delay_ms = max_delay_ms;
|
||||||
|
|
||||||
|
min_timeout.disconnect();
|
||||||
|
max_timeout.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onSignal(Ts... ts)
|
||||||
|
{
|
||||||
|
if (immediate_slot) {
|
||||||
|
immediate_slot(ts...);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!min_delay_ms) {
|
||||||
|
slot(ts...);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
params = std::make_tuple(ts...);
|
||||||
|
|
||||||
|
min_timeout.disconnect();
|
||||||
|
min_timeout = Glib::signal_timeout().connect(sigc::mem_fun(*this, &DelayedConnection::onMinTimeout), min_delay_ms);
|
||||||
|
|
||||||
|
if (max_delay_ms && !max_timeout.connected()) {
|
||||||
|
max_timeout = Glib::signal_timeout().connect(sigc::mem_fun(*this, &DelayedConnection::onMaxTimeout), max_delay_ms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool onMinTimeout()
|
||||||
|
{
|
||||||
|
max_timeout.disconnect();
|
||||||
|
delayed_helper::apply(slot, params);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool onMaxTimeout()
|
||||||
|
{
|
||||||
|
min_timeout.disconnect();
|
||||||
|
delayed_helper::apply(slot, params);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int min_delay_ms;
|
||||||
|
unsigned int max_delay_ms;
|
||||||
|
|
||||||
|
sigc::connection signal;
|
||||||
|
sigc::connection min_timeout;
|
||||||
|
sigc::connection max_timeout;
|
||||||
|
|
||||||
|
sigc::slot<void, Ts...> slot;
|
||||||
|
sigc::slot<void, Ts...> immediate_slot;
|
||||||
|
|
||||||
|
std::tuple<Ts...> params;
|
||||||
|
};
|
@ -36,9 +36,7 @@ Adjuster* createExponentAdjuster(AdjusterListener* listener, const Glib::ustring
|
|||||||
adj->setAdjusterListener(listener);
|
adj->setAdjusterListener(listener);
|
||||||
adj->setLogScale(6, 1, true);
|
adj->setLogScale(6, 1, true);
|
||||||
|
|
||||||
if (adj->delay < options.adjusterMaxDelay) {
|
adj->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
adj->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
adj->show();
|
adj->show();
|
||||||
return adj;
|
return adj;
|
||||||
|
@ -47,9 +47,7 @@ FlatField::FlatField () : FoldableToolPanel(this, "flatfield", M("TP_FLATFIELD_L
|
|||||||
flatFieldBlurRadius = Gtk::manage(new Adjuster (M("TP_FLATFIELD_BLURRADIUS"), 0, 200, 2, 32));
|
flatFieldBlurRadius = Gtk::manage(new Adjuster (M("TP_FLATFIELD_BLURRADIUS"), 0, 200, 2, 32));
|
||||||
flatFieldBlurRadius->setAdjusterListener (this);
|
flatFieldBlurRadius->setAdjusterListener (this);
|
||||||
|
|
||||||
if (flatFieldBlurRadius->delay < options.adjusterMaxDelay) {
|
flatFieldBlurRadius->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
flatFieldBlurRadius->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
flatFieldBlurRadius->show();
|
flatFieldBlurRadius->show();
|
||||||
|
|
||||||
@ -67,9 +65,7 @@ FlatField::FlatField () : FoldableToolPanel(this, "flatfield", M("TP_FLATFIELD_L
|
|||||||
flatFieldClipControl->setAdjusterListener(this);
|
flatFieldClipControl->setAdjusterListener(this);
|
||||||
flatFieldClipControl->addAutoButton("");
|
flatFieldClipControl->addAutoButton("");
|
||||||
|
|
||||||
if (flatFieldClipControl->delay < options.adjusterMaxDelay) {
|
flatFieldClipControl->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
flatFieldClipControl->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
flatFieldClipControl->show();
|
flatFieldClipControl->show();
|
||||||
flatFieldClipControl->set_tooltip_markup (M("TP_FLATFIELD_CLIPCONTROL_TOOLTIP"));
|
flatFieldClipControl->set_tooltip_markup (M("TP_FLATFIELD_CLIPCONTROL_TOOLTIP"));
|
||||||
|
@ -32,7 +32,22 @@ using namespace rtengine;
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
// HistogramPanel
|
// HistogramPanel
|
||||||
HistogramPanel::HistogramPanel ()
|
HistogramPanel::HistogramPanel() :
|
||||||
|
pointer_moved_delayed_call(
|
||||||
|
[this](bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int r, int g, int b)
|
||||||
|
{
|
||||||
|
if (!validPos) {
|
||||||
|
// do something to un-show vertical bars
|
||||||
|
histogramRGBArea->updateBackBuffer(-1, -1, -1);
|
||||||
|
} else {
|
||||||
|
// do something to show vertical bars
|
||||||
|
histogramRGBArea->updateBackBuffer(r, g, b, profile, profileW);
|
||||||
|
}
|
||||||
|
histogramRGBArea->queue_draw ();
|
||||||
|
},
|
||||||
|
50,
|
||||||
|
100
|
||||||
|
)
|
||||||
{
|
{
|
||||||
setExpandAlignProperties(this, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
|
setExpandAlignProperties(this, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
|
||||||
set_name("HistogramPanel");
|
set_name("HistogramPanel");
|
||||||
@ -192,6 +207,8 @@ HistogramPanel::HistogramPanel ()
|
|||||||
|
|
||||||
HistogramPanel::~HistogramPanel ()
|
HistogramPanel::~HistogramPanel ()
|
||||||
{
|
{
|
||||||
|
pointer_moved_delayed_call.cancel();
|
||||||
|
|
||||||
delete redImage;
|
delete redImage;
|
||||||
delete greenImage;
|
delete greenImage;
|
||||||
delete blueImage;
|
delete blueImage;
|
||||||
@ -311,15 +328,7 @@ void HistogramPanel::setHistRGBInvalid ()
|
|||||||
|
|
||||||
void HistogramPanel::pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw)
|
void HistogramPanel::pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw)
|
||||||
{
|
{
|
||||||
|
pointer_moved_delayed_call(validPos, profile, profileW, r, g, b);
|
||||||
if (!validPos) {
|
|
||||||
// do something to un-show vertical bars
|
|
||||||
histogramRGBArea->updateBackBuffer(-1, -1, -1);
|
|
||||||
} else {
|
|
||||||
// do something to show vertical bars
|
|
||||||
histogramRGBArea->updateBackBuffer(r, g, b, profile, profileW);
|
|
||||||
}
|
|
||||||
histogramRGBArea->queue_draw ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -372,7 +381,6 @@ HistogramRGBArea::HistogramRGBArea () :
|
|||||||
needLuma(options.histogramLuma), needChroma(options.histogramChroma), rawMode(options.histogramRAW),
|
needLuma(options.histogramLuma), needChroma(options.histogramChroma), rawMode(options.histogramRAW),
|
||||||
showMode(options.histogramBar), barDisplayed(options.histogramBar), parent(nullptr)
|
showMode(options.histogramBar), barDisplayed(options.histogramBar), parent(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
get_style_context()->add_class("drawingarea");
|
get_style_context()->add_class("drawingarea");
|
||||||
set_name("HistogramRGBArea");
|
set_name("HistogramRGBArea");
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <cairomm/cairomm.h>
|
#include <cairomm/cairomm.h>
|
||||||
|
|
||||||
|
#include "delayed.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
#include "pointermotionlistener.h"
|
#include "pointermotionlistener.h"
|
||||||
|
|
||||||
@ -180,6 +181,8 @@ private:
|
|||||||
|
|
||||||
class HistogramPanel final : public Gtk::Grid, public PointerMotionListener, public DrawModeListener, public rtengine::NonCopyable
|
class HistogramPanel final : public Gtk::Grid, public PointerMotionListener, public DrawModeListener, public rtengine::NonCopyable
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
DelayedCall<bool, Glib::ustring, Glib::ustring, int, int, int> pointer_moved_delayed_call;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -151,9 +151,7 @@ ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow)
|
|||||||
aGamma = Gtk::manage(new Adjuster(M("ICCPROFCREATOR_GAMMA"), 1, 3.5, 0.00001, 2.4));
|
aGamma = Gtk::manage(new Adjuster(M("ICCPROFCREATOR_GAMMA"), 1, 3.5, 0.00001, 2.4));
|
||||||
setExpandAlignProperties(aGamma, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
|
setExpandAlignProperties(aGamma, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
|
||||||
|
|
||||||
if (aGamma->delay < options.adjusterMaxDelay) {
|
aGamma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
aGamma->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
aGamma->show();
|
aGamma->show();
|
||||||
mainGrid->attach(*aGamma, 1, 3, 1, 1); //gamma
|
mainGrid->attach(*aGamma, 1, 3, 1, 1); //gamma
|
||||||
@ -161,9 +159,7 @@ ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow)
|
|||||||
aSlope = Gtk::manage(new Adjuster(M("ICCPROFCREATOR_SLOPE"), 0, 15, 0.00001, 12.92310));
|
aSlope = Gtk::manage(new Adjuster(M("ICCPROFCREATOR_SLOPE"), 0, 15, 0.00001, 12.92310));
|
||||||
setExpandAlignProperties(aSlope, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
|
setExpandAlignProperties(aSlope, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
|
||||||
|
|
||||||
if (aSlope->delay < options.adjusterMaxDelay) {
|
aSlope->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
aSlope->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
aSlope->show();
|
aSlope->show();
|
||||||
mainGrid->attach(*aSlope, 1, 4, 1, 1); //slope
|
mainGrid->attach(*aSlope, 1, 4, 1, 1); //slope
|
||||||
@ -328,7 +324,7 @@ ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow)
|
|||||||
close->signal_clicked().connect(sigc::mem_fun(*this, &ICCProfileCreator::closePressed));
|
close->signal_clicked().connect(sigc::mem_fun(*this, &ICCProfileCreator::closePressed));
|
||||||
get_action_area()->pack_start(*close);
|
get_action_area()->pack_start(*close);
|
||||||
|
|
||||||
//--------------- Show childrens
|
//--------------- Show children
|
||||||
|
|
||||||
show_all_children();
|
show_all_children();
|
||||||
|
|
||||||
|
@ -214,13 +214,9 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iuncha
|
|||||||
wGamma->setAdjusterListener(this);
|
wGamma->setAdjusterListener(this);
|
||||||
wSlope->setAdjusterListener(this);
|
wSlope->setAdjusterListener(this);
|
||||||
|
|
||||||
if (wGamma->delay < options.adjusterMaxDelay) {
|
wGamma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
wGamma->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wSlope->delay < options.adjusterMaxDelay) {
|
wSlope->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
wSlope->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
wFrame->add(*wProfVBox);
|
wFrame->add(*wProfVBox);
|
||||||
|
|
||||||
|
@ -26,8 +26,50 @@
|
|||||||
|
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
|
|
||||||
Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(options.navHSVUnit)
|
Navigator::Navigator() :
|
||||||
|
pointer_moved_delayed_call(50, 100),
|
||||||
|
currentRGBUnit(options.navRGBUnit),
|
||||||
|
currentHSVUnit(options.navHSVUnit)
|
||||||
{
|
{
|
||||||
|
pointer_moved_delayed_call.setFunction(
|
||||||
|
[this](bool validPos, Glib::ustring profile, Glib::ustring profileW, int x, int y, int r, int g, int b, bool isRaw)
|
||||||
|
{
|
||||||
|
if (!validPos) {
|
||||||
|
setInvalid (x, y);
|
||||||
|
} else {
|
||||||
|
Glib::ustring s1, s2, s3;
|
||||||
|
|
||||||
|
position->set_text (Glib::ustring::compose ("x: %1, y: %2", x, y));
|
||||||
|
|
||||||
|
getRGBText (r, g, b, s1, s2, s3, isRaw);
|
||||||
|
R->set_text (s1);
|
||||||
|
G->set_text (s2);
|
||||||
|
B->set_text (s3);
|
||||||
|
if (isRaw) {
|
||||||
|
H->set_text ("--");
|
||||||
|
S->set_text ("--");
|
||||||
|
V->set_text ("--");
|
||||||
|
LAB_L->set_text ("--");
|
||||||
|
LAB_A->set_text ("--");
|
||||||
|
LAB_B->set_text ("--");
|
||||||
|
} else {
|
||||||
|
float h, s, v;
|
||||||
|
float LAB_a, LAB_b, LAB_l;
|
||||||
|
Color::rgb2hsv01(r / 255.f, g / 255.f, b / 255.f, h, s, v);
|
||||||
|
getHSVText (h, s, v, s1, s2, s3);
|
||||||
|
H->set_text (s1);
|
||||||
|
S->set_text (s2);
|
||||||
|
V->set_text (s3);
|
||||||
|
|
||||||
|
Color::rgb2lab01(profile, profileW, r / 255.f, g / 255.f, b / 255.f, LAB_l, LAB_a, LAB_b, options.rtSettings.HistogramWorking); // TODO: Really sure this function works?
|
||||||
|
getLABText (LAB_l, LAB_a, LAB_b, s1, s2, s3);
|
||||||
|
LAB_L->set_text (s1);
|
||||||
|
LAB_A->set_text (s2);
|
||||||
|
LAB_B->set_text (s3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
set_label (M("MAIN_MSG_NAVIGATOR"));
|
set_label (M("MAIN_MSG_NAVIGATOR"));
|
||||||
Gtk::VBox* mbox = Gtk::manage (new Gtk::VBox ());
|
Gtk::VBox* mbox = Gtk::manage (new Gtk::VBox ());
|
||||||
@ -202,6 +244,11 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt
|
|||||||
show_all ();
|
show_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Navigator::~Navigator()
|
||||||
|
{
|
||||||
|
pointer_moved_delayed_call.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
void Navigator::setInvalid (int fullWidth, int fullHeight)
|
void Navigator::setInvalid (int fullWidth, int fullHeight)
|
||||||
{
|
{
|
||||||
if (fullWidth > 0 && fullHeight > 0) {
|
if (fullWidth > 0 && fullHeight > 0) {
|
||||||
@ -278,41 +325,7 @@ void Navigator::getLABText (float l, float a, float b, Glib::ustring &sL, Glib::
|
|||||||
// if !validPos then x/y contain the full image size
|
// if !validPos then x/y contain the full image size
|
||||||
void Navigator::pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw)
|
void Navigator::pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw)
|
||||||
{
|
{
|
||||||
|
pointer_moved_delayed_call(validPos, profile, profileW, x, y, r, g, b, isRaw);
|
||||||
if (!validPos) {
|
|
||||||
setInvalid (x, y);
|
|
||||||
} else {
|
|
||||||
Glib::ustring s1, s2, s3;
|
|
||||||
|
|
||||||
position->set_text (Glib::ustring::compose ("x: %1, y: %2", x, y));
|
|
||||||
|
|
||||||
getRGBText (r, g, b, s1, s2, s3, isRaw);
|
|
||||||
R->set_text (s1);
|
|
||||||
G->set_text (s2);
|
|
||||||
B->set_text (s3);
|
|
||||||
if (isRaw) {
|
|
||||||
H->set_text ("--");
|
|
||||||
S->set_text ("--");
|
|
||||||
V->set_text ("--");
|
|
||||||
LAB_L->set_text ("--");
|
|
||||||
LAB_A->set_text ("--");
|
|
||||||
LAB_B->set_text ("--");
|
|
||||||
} else {
|
|
||||||
float h, s, v;
|
|
||||||
float LAB_a, LAB_b, LAB_l;
|
|
||||||
Color::rgb2hsv01(r / 255.f, g / 255.f, b / 255.f, h, s, v);
|
|
||||||
getHSVText (h, s, v, s1, s2, s3);
|
|
||||||
H->set_text (s1);
|
|
||||||
S->set_text (s2);
|
|
||||||
V->set_text (s3);
|
|
||||||
|
|
||||||
Color::rgb2lab01(profile, profileW, r / 255.f, g / 255.f, b / 255.f, LAB_l, LAB_a, LAB_b, options.rtSettings.HistogramWorking); // TODO: Really sure this function works?
|
|
||||||
getLABText (LAB_l, LAB_a, LAB_b, s1, s2, s3);
|
|
||||||
LAB_L->set_text (s1);
|
|
||||||
LAB_A->set_text (s2);
|
|
||||||
LAB_B->set_text (s3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Navigator::cycleUnitsRGB (GdkEventButton *event) {
|
void Navigator::cycleUnitsRGB (GdkEventButton *event) {
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
|
#include "delayed.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "pointermotionlistener.h"
|
#include "pointermotionlistener.h"
|
||||||
|
|
||||||
@ -33,6 +34,8 @@ class Navigator final :
|
|||||||
typedef const double (*TMatrix)[3];
|
typedef const double (*TMatrix)[3];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
DelayedCall<bool, Glib::ustring, Glib::ustring, int, int, int, int, int, bool> pointer_moved_delayed_call;
|
||||||
|
|
||||||
Options::NavigatorUnit currentRGBUnit;
|
Options::NavigatorUnit currentRGBUnit;
|
||||||
Options::NavigatorUnit currentHSVUnit;
|
Options::NavigatorUnit currentHSVUnit;
|
||||||
void cycleUnitsRGB (GdkEventButton *event);
|
void cycleUnitsRGB (GdkEventButton *event);
|
||||||
@ -53,7 +56,8 @@ protected:
|
|||||||
public:
|
public:
|
||||||
PreviewWindow* previewWindow;
|
PreviewWindow* previewWindow;
|
||||||
|
|
||||||
Navigator ();
|
Navigator();
|
||||||
|
~Navigator() override;
|
||||||
|
|
||||||
// pointermotionlistener interface
|
// pointermotionlistener interface
|
||||||
// void pointerMoved (bool validPos, int x, int y, int r, int g, int b);
|
// void pointerMoved (bool validPos, int x, int y, int r, int g, int b);
|
||||||
|
@ -81,10 +81,10 @@ PdSharpening::PdSharpening() :
|
|||||||
dradiusOffset->setAdjusterListener(this);
|
dradiusOffset->setAdjusterListener(this);
|
||||||
diter->setAdjusterListener(this);
|
diter->setAdjusterListener(this);
|
||||||
|
|
||||||
contrast->delay = std::max(contrast->delay, options.adjusterMaxDelay);
|
contrast->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
dradius->delay = std::max(dradius->delay, options.adjusterMaxDelay);
|
dradius->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
dradiusOffset->delay = std::max(dradiusOffset->delay, options.adjusterMaxDelay);
|
dradiusOffset->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
diter->delay = std::max(diter->delay, options.adjusterMaxDelay);
|
diter->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
}
|
}
|
||||||
|
|
||||||
PdSharpening::~PdSharpening()
|
PdSharpening::~PdSharpening()
|
||||||
|
@ -46,9 +46,7 @@ PreProcess::PreProcess () : FoldableToolPanel(this, "preprocess", M("TP_PREPROCE
|
|||||||
hdThreshold->set_tooltip_markup (M("TP_RAW_HD_TOOLTIP"));
|
hdThreshold->set_tooltip_markup (M("TP_RAW_HD_TOOLTIP"));
|
||||||
hdThreshold->setAdjusterListener (this);
|
hdThreshold->setAdjusterListener (this);
|
||||||
|
|
||||||
if (hdThreshold->delay < options.adjusterMaxDelay) {
|
hdThreshold->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
hdThreshold->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
hdThreshold->show();
|
hdThreshold->show();
|
||||||
pack_start( *hdThreshold, Gtk::PACK_SHRINK, 4);
|
pack_start( *hdThreshold, Gtk::PACK_SHRINK, 4);
|
||||||
|
@ -47,24 +47,18 @@ RAWCACorr::RAWCACorr () : FoldableToolPanel(this, "rawcacorrection", M("TP_RAWCA
|
|||||||
caAutoiterations->setAdjusterListener (this);
|
caAutoiterations->setAdjusterListener (this);
|
||||||
caAutoiterations->set_tooltip_markup(M("TP_RAWCACORR_AUTOIT_TOOLTIP"));
|
caAutoiterations->set_tooltip_markup(M("TP_RAWCACORR_AUTOIT_TOOLTIP"));
|
||||||
|
|
||||||
if (caAutoiterations->delay < options.adjusterMaxDelay) {
|
caAutoiterations->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
caAutoiterations->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
caRed = Gtk::manage(new Adjuster (M("TP_RAWCACORR_CARED"), -4.0, 4.0, 0.1, 0, icaredL, icaredR));
|
caRed = Gtk::manage(new Adjuster (M("TP_RAWCACORR_CARED"), -4.0, 4.0, 0.1, 0, icaredL, icaredR));
|
||||||
caRed->setAdjusterListener (this);
|
caRed->setAdjusterListener (this);
|
||||||
|
|
||||||
if (caRed->delay < options.adjusterMaxDelay) {
|
caRed->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
caRed->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
caRed->show();
|
caRed->show();
|
||||||
caBlue = Gtk::manage(new Adjuster (M("TP_RAWCACORR_CABLUE"), -8.0, 8.0, 0.1, 0, icablueL, icablueR));
|
caBlue = Gtk::manage(new Adjuster (M("TP_RAWCACORR_CABLUE"), -8.0, 8.0, 0.1, 0, icablueL, icablueR));
|
||||||
caBlue->setAdjusterListener (this);
|
caBlue->setAdjusterListener (this);
|
||||||
|
|
||||||
if (caBlue->delay < options.adjusterMaxDelay) {
|
caBlue->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
caBlue->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
caBlue->show();
|
caBlue->show();
|
||||||
|
|
||||||
|
@ -33,9 +33,7 @@ RAWExposure::RAWExposure () : FoldableToolPanel(this, "rawexposure", M("TP_EXPOS
|
|||||||
PexPos = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_LINEAR"), 0.1, 16.0, 0.01, 1));
|
PexPos = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_LINEAR"), 0.1, 16.0, 0.01, 1));
|
||||||
PexPos->setAdjusterListener (this);
|
PexPos->setAdjusterListener (this);
|
||||||
|
|
||||||
if (PexPos->delay < options.adjusterMaxDelay) {
|
PexPos->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
PexPos->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
PexPos->show();
|
PexPos->show();
|
||||||
pack_start( *PexPos, Gtk::PACK_SHRINK, 4);//exposi
|
pack_start( *PexPos, Gtk::PACK_SHRINK, 4);//exposi
|
||||||
|
@ -502,112 +502,58 @@ Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL")
|
|||||||
|
|
||||||
|
|
||||||
str->setAdjusterListener (this);
|
str->setAdjusterListener (this);
|
||||||
|
str->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (str->delay < 200) {
|
|
||||||
str->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
scal->setAdjusterListener (this);
|
scal->setAdjusterListener (this);
|
||||||
|
scal->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (scal->delay < 200) {
|
|
||||||
scal->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
iter->setAdjusterListener (this);
|
iter->setAdjusterListener (this);
|
||||||
|
iter->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (iter->delay < 200) {
|
|
||||||
iter->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
grad->setAdjusterListener (this);
|
grad->setAdjusterListener (this);
|
||||||
|
grad->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (grad->delay < 200) {
|
|
||||||
grad->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
grads->setAdjusterListener (this);
|
grads->setAdjusterListener (this);
|
||||||
|
grads->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (grads->delay < 200) {
|
|
||||||
grads->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
gam->setAdjusterListener (this);
|
gam->setAdjusterListener (this);
|
||||||
|
gam->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay) * 2.5f);
|
||||||
if (gam->delay < 500) {
|
|
||||||
gam->delay = 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
slope->setAdjusterListener (this);
|
slope->setAdjusterListener (this);
|
||||||
|
slope->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay) * 2.5f);
|
||||||
if (slope->delay < 500) {
|
|
||||||
slope->delay = 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
neigh->setAdjusterListener (this);
|
neigh->setAdjusterListener (this);
|
||||||
|
neigh->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (neigh->delay < 200) {
|
|
||||||
neigh->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
offs->setAdjusterListener (this);
|
offs->setAdjusterListener (this);
|
||||||
|
offs->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (offs->delay < 200) {
|
|
||||||
offs->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
vart->setAdjusterListener (this);
|
vart->setAdjusterListener (this);
|
||||||
|
offs->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (vart->delay < 200) {
|
|
||||||
vart->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
limd->setAdjusterListener (this);
|
limd->setAdjusterListener (this);
|
||||||
|
limd->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (limd->delay < 200) {
|
|
||||||
limd->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
highl->setAdjusterListener (this);
|
highl->setAdjusterListener (this);
|
||||||
|
highl->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (highl->delay < 200) {
|
|
||||||
highl->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
radius->setAdjusterListener (this);
|
radius->setAdjusterListener (this);
|
||||||
|
radius->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (radius->delay < 200) {
|
|
||||||
radius->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
highlights->setAdjusterListener (this);
|
highlights->setAdjusterListener (this);
|
||||||
|
highlights->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (highlights->delay < 200) {
|
|
||||||
highlights->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
h_tonalwidth->setAdjusterListener (this);
|
h_tonalwidth->setAdjusterListener (this);
|
||||||
|
h_tonalwidth->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (h_tonalwidth->delay < 200) {
|
|
||||||
h_tonalwidth->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
shadows->setAdjusterListener (this);
|
shadows->setAdjusterListener (this);
|
||||||
|
shadows->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (shadows->delay < 200) {
|
|
||||||
shadows->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
s_tonalwidth->setAdjusterListener (this);
|
s_tonalwidth->setAdjusterListener (this);
|
||||||
|
s_tonalwidth->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (s_tonalwidth->delay < 200) {
|
|
||||||
s_tonalwidth->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
skal->setAdjusterListener (this);
|
skal->setAdjusterListener (this);
|
||||||
|
skal->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
if (skal->delay < 200) {
|
|
||||||
skal->delay = 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
disableListener();
|
disableListener();
|
||||||
retinexColorSpaceChanged();
|
retinexColorSpaceChanged();
|
||||||
|
@ -36,16 +36,12 @@ SharpenEdge::SharpenEdge () : FoldableToolPanel(this, "sharpenedge", M("TP_SHARP
|
|||||||
passes = Gtk::manage(new Adjuster (M("TP_SHARPENEDGE_PASSES"), 1, 4, 1, 2));
|
passes = Gtk::manage(new Adjuster (M("TP_SHARPENEDGE_PASSES"), 1, 4, 1, 2));
|
||||||
passes->setAdjusterListener (this);
|
passes->setAdjusterListener (this);
|
||||||
|
|
||||||
if (passes->delay < options.adjusterMaxDelay) {
|
passes->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
passes->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
amount = Gtk::manage(new Adjuster (M("TP_SHARPENEDGE_AMOUNT"), 0, 100, 1, 50));
|
amount = Gtk::manage(new Adjuster (M("TP_SHARPENEDGE_AMOUNT"), 0, 100, 1, 50));
|
||||||
amount->setAdjusterListener (this);
|
amount->setAdjusterListener (this);
|
||||||
|
|
||||||
if (amount->delay < options.adjusterMaxDelay) {
|
amount->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
amount->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
threechannels = Gtk::manage(new Gtk::CheckButton((M("TP_SHARPENEDGE_THREE"))));// L + a + b
|
threechannels = Gtk::manage(new Gtk::CheckButton((M("TP_SHARPENEDGE_THREE"))));// L + a + b
|
||||||
threechannels->set_active (false);
|
threechannels->set_active (false);
|
||||||
|
@ -79,9 +79,7 @@ XTransProcess::XTransProcess () : FoldableToolPanel(this, "xtransprocess", M("TP
|
|||||||
dualDemosaicContrast->addAutoButton(M("TP_RAW_DUALDEMOSAICAUTOCONTRAST_TOOLTIP"));
|
dualDemosaicContrast->addAutoButton(M("TP_RAW_DUALDEMOSAICAUTOCONTRAST_TOOLTIP"));
|
||||||
dualDemosaicContrast->setAutoValue(true);
|
dualDemosaicContrast->setAutoValue(true);
|
||||||
|
|
||||||
if (dualDemosaicContrast->delay < options.adjusterMaxDelay) {
|
dualDemosaicContrast->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
dualDemosaicContrast->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
dualDemosaicContrast->show();
|
dualDemosaicContrast->show();
|
||||||
dualDemosaicOptions->pack_start(*dualDemosaicContrast);
|
dualDemosaicOptions->pack_start(*dualDemosaicContrast);
|
||||||
@ -91,9 +89,7 @@ XTransProcess::XTransProcess () : FoldableToolPanel(this, "xtransprocess", M("TP
|
|||||||
border = Gtk::manage(new Adjuster(M("TP_RAW_BORDER"), 0, 16, 1, 7));
|
border = Gtk::manage(new Adjuster(M("TP_RAW_BORDER"), 0, 16, 1, 7));
|
||||||
border->setAdjusterListener (this);
|
border->setAdjusterListener (this);
|
||||||
|
|
||||||
if (border->delay < options.adjusterMaxDelay) {
|
border->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
border->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
border->show();
|
border->show();
|
||||||
borderbox->pack_start(*border);
|
borderbox->pack_start(*border);
|
||||||
@ -103,9 +99,7 @@ XTransProcess::XTransProcess () : FoldableToolPanel(this, "xtransprocess", M("TP
|
|||||||
ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 ));
|
ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 ));
|
||||||
ccSteps->setAdjusterListener (this);
|
ccSteps->setAdjusterListener (this);
|
||||||
|
|
||||||
if (ccSteps->delay < options.adjusterMaxDelay) {
|
ccSteps->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
ccSteps->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
ccSteps->show();
|
ccSteps->show();
|
||||||
pack_start( *ccSteps, Gtk::PACK_SHRINK, 4);
|
pack_start( *ccSteps, Gtk::PACK_SHRINK, 4);
|
||||||
|
@ -33,25 +33,19 @@ XTransRAWExposure::XTransRAWExposure () : FoldableToolPanel(this, "xtransrawexpo
|
|||||||
PexBlackRed = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_RED"), -2048, 2048, 1.0, 0)); //black level
|
PexBlackRed = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_RED"), -2048, 2048, 1.0, 0)); //black level
|
||||||
PexBlackRed->setAdjusterListener (this);
|
PexBlackRed->setAdjusterListener (this);
|
||||||
|
|
||||||
if (PexBlackRed->delay < options.adjusterMaxDelay) {
|
PexBlackRed->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
PexBlackRed->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
PexBlackRed->show();
|
PexBlackRed->show();
|
||||||
PexBlackGreen = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_GREEN"), -2048, 2048, 1.0, 0)); //black level
|
PexBlackGreen = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_GREEN"), -2048, 2048, 1.0, 0)); //black level
|
||||||
PexBlackGreen->setAdjusterListener (this);
|
PexBlackGreen->setAdjusterListener (this);
|
||||||
|
|
||||||
if (PexBlackGreen->delay < options.adjusterMaxDelay) {
|
PexBlackGreen->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
PexBlackGreen->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
PexBlackGreen->show();
|
PexBlackGreen->show();
|
||||||
PexBlackBlue = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_BLUE"), -2048, 2048, 1.0, 0)); //black level
|
PexBlackBlue = Gtk::manage(new Adjuster (M("TP_RAWEXPOS_BLACK_BLUE"), -2048, 2048, 1.0, 0)); //black level
|
||||||
PexBlackBlue->setAdjusterListener (this);
|
PexBlackBlue->setAdjusterListener (this);
|
||||||
|
|
||||||
if (PexBlackBlue->delay < options.adjusterMaxDelay) {
|
PexBlackBlue->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
|
||||||
PexBlackBlue->delay = options.adjusterMaxDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
PexBlackBlue->show();
|
PexBlackBlue->show();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user