Port tone equalizer from ART

Merge with local adjustments tone equalizer image processing function
for consistent results.

To-do: Enable for batch editing and add pivot/colormap to the local
adjustments version.
This commit is contained in:
Lawrence Lee
2022-05-01 16:13:27 -07:00
parent b989c271d8
commit bd3bd809b5
23 changed files with 794 additions and 266 deletions

View File

@@ -51,6 +51,7 @@ Adjuster::Adjuster(
grid(nullptr),
label(nullptr),
imageIcon1(imgIcon1),
imageIcon2(imgIcon2),
automatic(nullptr),
adjusterListener(nullptr),
spinChange(options.adjusterMinDelay, options.adjusterMaxDelay),
@@ -76,8 +77,8 @@ Adjuster::Adjuster(
setExpandAlignProperties(imageIcon1, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
}
if (imgIcon2) {
setExpandAlignProperties(imgIcon2, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
if (imageIcon2) {
setExpandAlignProperties(imageIcon2, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
}
set_column_spacing(0);
@@ -120,9 +121,9 @@ Adjuster::Adjuster(
attach_next_to(*imageIcon1, *slider, Gtk::POS_LEFT, 1, 1);
}
if (imgIcon2) {
attach_next_to(*imgIcon2, *slider, Gtk::POS_RIGHT, 1, 1);
attach_next_to(*spin, *imgIcon2, Gtk::POS_RIGHT, 1, 1);
if (imageIcon2) {
attach_next_to(*imageIcon2, *slider, Gtk::POS_RIGHT, 1, 1);
attach_next_to(*spin, *imageIcon2, Gtk::POS_RIGHT, 1, 1);
} else {
attach_next_to(*spin, *slider, Gtk::POS_RIGHT, 1, 1);
}
@@ -140,9 +141,9 @@ Adjuster::Adjuster(
grid->attach_next_to(*imageIcon1, *slider, Gtk::POS_LEFT, 1, 1);
}
if (imgIcon2) {
grid->attach_next_to(*imgIcon2, Gtk::POS_RIGHT, 1, 1);
grid->attach_next_to(*reset, *imgIcon2, Gtk::POS_RIGHT, 1, 1);
if (imageIcon2) {
grid->attach_next_to(*imageIcon2, Gtk::POS_RIGHT, 1, 1);
grid->attach_next_to(*reset, *imageIcon2, Gtk::POS_RIGHT, 1, 1);
} else {
grid->attach_next_to(*reset, *slider, Gtk::POS_RIGHT, 1, 1);
}
@@ -683,3 +684,13 @@ 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);
}
void Adjuster::showIcons(bool yes)
{
if (imageIcon1) {
imageIcon1->set_visible(yes);
}
if (imageIcon2) {
imageIcon2->set_visible(yes);
}
}