Merge branch 'dev' into waveform

This commit is contained in:
Flössie
2020-08-16 10:08:28 +02:00
54 changed files with 2532 additions and 1630 deletions

View File

@@ -33,7 +33,36 @@ using namespace rtengine;
//
//
// HistogramPanel
HistogramPanel::HistogramPanel () : panel_listener(nullptr)
HistogramPanel::HistogramPanel () :
pointer_moved_delayed_call(
[this](bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int r, int g, int b)
{
bool update_hist_area;
if (!validPos) {
// do something to un-show vertical bars
if (histogramRGBArea) {
histogramRGBArea->updateBackBuffer(-1, -1, -1);
}
update_hist_area = histogramArea->updatePointer(-1, -1, -1);
} else {
// do something to show vertical bars
if (histogramRGBArea) {
histogramRGBArea->updateBackBuffer(r, g, b, profile, profileW);
}
update_hist_area = histogramArea->updatePointer(r, g, b, profile, profileW);
}
if (histogramRGBArea) {
histogramRGBArea->queue_draw();
}
if (update_hist_area) {
histogramArea->queue_draw();
}
},
50,
100
),
panel_listener(nullptr)
{
setExpandAlignProperties(this, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
set_name("HistogramPanel");
@@ -233,6 +262,8 @@ HistogramPanel::HistogramPanel () : panel_listener(nullptr)
HistogramPanel::~HistogramPanel ()
{
pointer_moved_delayed_call.cancel();
delete redImage;
delete greenImage;
delete blueImage;
@@ -463,27 +494,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)
{
bool update_hist_area;
if (!validPos) {
// do something to un-show vertical bars
if (histogramRGBArea) {
histogramRGBArea->updateBackBuffer(-1, -1, -1);
}
update_hist_area = histogramArea->updatePointer(-1, -1, -1);
} else {
// do something to show vertical bars
if (histogramRGBArea) {
histogramRGBArea->updateBackBuffer(r, g, b, profile, profileW);
}
update_hist_area = histogramArea->updatePointer(r, g, b, profile, profileW);
}
if (histogramRGBArea) {
histogramRGBArea->queue_draw();
}
if (update_hist_area) {
histogramArea->queue_draw();
}
pointer_moved_delayed_call(validPos, profile, profileW, r, g, b);
}
/*
@@ -572,7 +583,6 @@ HistogramRGBArea::HistogramRGBArea () :
needLuma(options.histogramLuma), needChroma(options.histogramChroma), rawMode(options.histogramRAW),
showMode(options.histogramBar), barDisplayed(options.histogramBar), parent(nullptr)
{
get_style_context()->add_class("drawingarea");
set_name("HistogramRGBArea");