merge with dev

This commit is contained in:
Desmis
2019-08-23 17:37:52 +02:00
5 changed files with 55 additions and 38 deletions

View File

@@ -1090,8 +1090,8 @@ void EditorPanel::close ()
if (iareapanel) {
iareapanel->imageArea->setPreviewHandler (nullptr);
iareapanel->imageArea->setImProcCoordinator (nullptr);
tpc->editModeSwitchedOff();
}
tpc->editModeSwitchedOff();
rtengine::StagedImageProcessor::destroy (ipc);
ipc = nullptr;

View File

@@ -29,9 +29,6 @@ using namespace rtengine::procparams;
LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"), false, true)
{
std::vector<GradientMilestone> milestones;
brightness = Gtk::manage (new Adjuster (M("TP_LABCURVE_BRIGHTNESS"), -100., 100., 1., 0.));
contrast = Gtk::manage (new Adjuster (M("TP_LABCURVE_CONTRAST"), -100., 100., 1., 0.));
chromaticity = Gtk::manage (new Adjuster (M("TP_LABCURVE_CHROMATICITY"), -100., 100., 1., 0.));
@@ -98,12 +95,12 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"),
M("TP_LABCURVE_CURVEEDITOR_A_RANGE3"), M("TP_LABCURVE_CURVEEDITOR_A_RANGE4")
);
//from green to magenta
milestones.clear();
milestones.push_back( GradientMilestone(0., 0., 1., 0.) );
milestones.push_back( GradientMilestone(1., 1., 0., 1.) );
std::vector<GradientMilestone> milestones = {
GradientMilestone(0., 0., 1., 0.),
GradientMilestone(1., 1., 0., 1.)
};
ashape->setBottomBarBgGradient(milestones);
ashape->setLeftBarBgGradient(milestones);
milestones.clear();
bshape = static_cast<DiagonalCurveEditor*>(curveEditorG->addCurve(CT_Diagonal, "b*"));
bshape->setRangeLabels(
@@ -113,12 +110,12 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"),
bshape->setEditID(EUID_Lab_bCurve, BT_SINGLEPLANE_FLOAT);
//from blue to yellow
milestones.clear();
milestones.push_back( GradientMilestone(0., 0., 0., 1.) );
milestones.push_back( GradientMilestone(1., 1., 1., 0.) );
milestones = {
GradientMilestone(0., 0., 0., 1.),
GradientMilestone(1., 1., 1., 0.)
};
bshape->setBottomBarBgGradient(milestones);
bshape->setLeftBarBgGradient(milestones);
milestones.clear();
curveEditorG->newLine(); // ------------------------------------------------ second line
@@ -171,21 +168,23 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"),
clshape->setLeftBarColorProvider(this, 7);
clshape->setRangeDefaultMilestones(0.25, 0.5, 0.75);
milestones.push_back( GradientMilestone(0., 0., 0., 0.) );
milestones.push_back( GradientMilestone(1., 1., 1., 1.) );
milestones = {
GradientMilestone(0., 0., 0., 0.),
GradientMilestone(1., 1., 1., 1.)
};
clshape->setBottomBarBgGradient(milestones);
// Setting the gradient milestones
// from black to white
milestones.push_back( GradientMilestone(0., 0., 0., 0.) );
milestones.push_back( GradientMilestone(1., 1., 1., 1.) );
milestones.emplace_back(0., 0., 0., 0.);
milestones.emplace_back(1., 1., 1., 1.);
lshape->setBottomBarBgGradient(milestones);
lshape->setLeftBarBgGradient(milestones);
milestones.push_back( GradientMilestone(0., 0., 0., 0.) );
milestones.push_back( GradientMilestone(1., 1., 1., 1.) );
milestones.emplace_back(0., 0., 0., 0.);
milestones.emplace_back(1., 1., 1., 1.);
lcshape->setRangeDefaultMilestones(0.05, 0.2, 0.58);
lcshape->setBottomBarBgGradient(milestones);
@@ -201,7 +200,7 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"),
float R, G, B;
float x = float(i) * (1.0f / 6.0);
Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B);
milestones.push_back( GradientMilestone(double(x), double(R), double(G), double(B)) );
milestones.emplace_back(x, R, G, B);
}
chshape->setBottomBarBgGradient(milestones);

View File

@@ -91,14 +91,13 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals
sbox->pack_start (*hbox);
sizeBox->pack_start (*sbox, Gtk::PACK_SHRINK, 0);
allowUpscaling = Gtk::manage(new Gtk::CheckButton(M("TP_RESIZE_ALLOW_UPSCALING")));
sizeBox->pack_start(*allowUpscaling);
allowUpscaling->signal_toggled().connect(sigc::mem_fun(*this, &Resize::allowUpscalingChanged));
sizeBox->show_all ();
sizeBox->reference ();
allowUpscaling = Gtk::manage(new Gtk::CheckButton(M("TP_RESIZE_ALLOW_UPSCALING")));
pack_start(*allowUpscaling);
allowUpscaling->signal_toggled().connect(sigc::mem_fun(*this, &Resize::allowUpscalingChanged));
w->set_digits (0);
w->set_increments (1, 100);
w->set_value (800);
@@ -572,11 +571,13 @@ void Resize::updateGUI ()
case (0):
// Scale mode
pack_start (*scale, Gtk::PACK_SHRINK, 4);
reorder_child(*allowUpscaling, 4);
break;
case (1):
// Width mode
pack_start (*sizeBox, Gtk::PACK_SHRINK, 4);
reorder_child(*allowUpscaling, 4);
w->set_sensitive (true);
h->set_sensitive (false);
break;
@@ -584,6 +585,7 @@ void Resize::updateGUI ()
case (2):
// Height mode
pack_start (*sizeBox, Gtk::PACK_SHRINK, 4);
reorder_child(*allowUpscaling, 4);
w->set_sensitive (false);
h->set_sensitive (true);
break;
@@ -591,6 +593,7 @@ void Resize::updateGUI ()
case (3):
// Bounding box mode
pack_start (*sizeBox, Gtk::PACK_SHRINK, 4);
reorder_child(*allowUpscaling, 4);
w->set_sensitive (true);
h->set_sensitive (true);
break;

View File

@@ -629,13 +629,8 @@ void ThresholdSelector::findBoundaries(double &min, double &max)
switch (movedCursor) {
case (TS_BOTTOMLEFT):
if (separatedSliders) {
if (movedCursor == TS_BOTTOMLEFT) {
min = minValBottom;
max = maxValBottom;
} else if (movedCursor == TS_TOPLEFT) {
min = minValTop;
max = maxValTop;
}
min = minValBottom;
max = maxValBottom;
} else if (initalEq1) {
min = secondaryMovedCursor == TS_UNDEFINED ? positions[TS_TOPLEFT] : minValTop + (positions[TS_BOTTOMLEFT] - positions[TS_TOPLEFT]);
max = positions[TS_BOTTOMRIGHT];
@@ -648,13 +643,8 @@ void ThresholdSelector::findBoundaries(double &min, double &max)
case (TS_TOPLEFT):
if (separatedSliders) {
if (movedCursor == TS_BOTTOMLEFT) {
min = minValBottom;
max = maxValBottom;
} else if (movedCursor == TS_TOPLEFT) {
min = minValTop;
max = maxValTop;
}
min = minValTop;
max = maxValTop;
} else if (initalEq1) {
min = minValTop;
max = secondaryMovedCursor == TS_UNDEFINED ? positions[TS_BOTTOMLEFT] : positions[TS_BOTTOMRIGHT] - (positions[TS_BOTTOMLEFT] - positions[TS_TOPLEFT]);