diff --git a/rtdata/images/svg/histogram-bayer-off-small.svg b/rtdata/images/svg/histogram-bayer-off-small.svg
deleted file mode 100644
index 5d6c439fb..000000000
--- a/rtdata/images/svg/histogram-bayer-off-small.svg
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
-
diff --git a/rtdata/images/svg/histogram-type-histogram-off-small.svg b/rtdata/images/svg/histogram-type-histogram-off-small.svg
deleted file mode 100644
index 456ead7e2..000000000
--- a/rtdata/images/svg/histogram-type-histogram-off-small.svg
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
diff --git a/rtdata/images/svg/histogram-bayer-on-small.svg b/rtdata/images/svg/histogram-type-histogram-raw-small.svg
similarity index 100%
rename from rtdata/images/svg/histogram-bayer-on-small.svg
rename to rtdata/images/svg/histogram-type-histogram-raw-small.svg
diff --git a/rtdata/images/svg/histogram-type-parade-off-small.svg b/rtdata/images/svg/histogram-type-parade-off-small.svg
deleted file mode 100644
index 015960fcc..000000000
--- a/rtdata/images/svg/histogram-type-parade-off-small.svg
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
diff --git a/rtdata/images/svg/histogram-type-vectorscope-hc-off-small.svg b/rtdata/images/svg/histogram-type-vectorscope-hc-off-small.svg
deleted file mode 100644
index 3a105a671..000000000
--- a/rtdata/images/svg/histogram-type-vectorscope-hc-off-small.svg
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
diff --git a/rtdata/images/svg/histogram-type-vectorscope-hs-off-small.svg b/rtdata/images/svg/histogram-type-vectorscope-hs-off-small.svg
deleted file mode 100644
index 253d2d9c3..000000000
--- a/rtdata/images/svg/histogram-type-vectorscope-hs-off-small.svg
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
diff --git a/rtdata/images/svg/histogram-type-waveform-off-small.svg b/rtdata/images/svg/histogram-type-waveform-off-small.svg
deleted file mode 100644
index 787d6fe09..000000000
--- a/rtdata/images/svg/histogram-type-waveform-off-small.svg
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css
index 76f0004ee..07877c33f 100644
--- a/rtdata/themes/RawTherapee-GTK3-20_.css
+++ b/rtdata/themes/RawTherapee-GTK3-20_.css
@@ -720,6 +720,19 @@ flowboxchild:selected {
margin: 0;
}
+/* Copied from button.flat style. */
+button.radio#histButton {
+ background-image: none;
+}
+
+button.radio#histButton:checked {
+ background-image: linear-gradient(#343434, #2E2E2E, #292929);
+}
+
+button.radio#histButton:hover {
+ background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3));
+}
+
/*** end ***************************************************************************************/
#MyExpander {
diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css
index ce4bb8d28..af3445650 100644
--- a/rtdata/themes/TooWaBlue-GTK3-20_.css
+++ b/rtdata/themes/TooWaBlue-GTK3-20_.css
@@ -453,6 +453,26 @@ filechooser placessidebar list row:selected {
padding-bottom: 0.25em;
margin: 0;
}
+/* Copied from button.flat style. */
+button.radio#histButton {
+ border: 0.083333333333333333em solid transparent;
+ box-shadow: none;
+ background-image: none;
+ background-color: transparent;
+}
+button.radio#histButton:hover {
+ border-color: @bg-button-border;
+ box-shadow: inset 0 0.083333333333333333em rgba(242, 242, 242, 0.1);
+ background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
+ background-color: @bg-button-hover;
+}
+button.radio#histButton:active,
+button.radio#histButton:checked {
+ border-color: @bg-button-border;
+ box-shadow: inset 0 0.1em rgba(242, 242, 242, 0.08);
+ background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
+ background-color: @bg-button-active;
+}
/*** end ***************************************************************************************/
diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc
index 480a80c92..8946a5e35 100644
--- a/rtgui/histogrampanel.cc
+++ b/rtgui/histogrampanel.cc
@@ -128,18 +128,12 @@ HistogramPanel::HistogramPanel () :
mode1Image = new RTImage ("histogram-mode-logx-small.png");
mode2Image = new RTImage ("histogram-mode-logxy-small.png");
- histImageOn.reset(new RTImage("histogram-type-histogram-small.png"));
- histRawImageOn.reset(new RTImage("histogram-bayer-on-small.png"));
- paradeImageOn.reset(new RTImage("histogram-type-parade-small.png"));
- waveImageOn.reset(new RTImage("histogram-type-waveform-small.png"));
- vectHcImageOn.reset(new RTImage("histogram-type-vectorscope-hc-small.png"));
- vectHsImageOn.reset(new RTImage("histogram-type-vectorscope-hs-small.png"));
- histImageOff.reset(new RTImage("histogram-type-histogram-off-small.png"));
- histRawImageOff.reset(new RTImage("histogram-bayer-off-small.png"));
- paradeImageOff.reset(new RTImage("histogram-type-parade-off-small.png"));
- waveImageOff.reset(new RTImage("histogram-type-waveform-off-small.png"));
- vectHcImageOff.reset(new RTImage("histogram-type-vectorscope-hc-off-small.png"));
- vectHsImageOff.reset(new RTImage("histogram-type-vectorscope-hs-off-small.png"));
+ Gtk::Image* histImage = Gtk::manage(new RTImage("histogram-type-histogram-small.png"));
+ Gtk::Image* histRawImage = Gtk::manage(new RTImage("histogram-type-histogram-raw-small.png"));
+ Gtk::Image* paradeImage = Gtk::manage(new RTImage("histogram-type-parade-small.png"));
+ Gtk::Image* waveImage = Gtk::manage(new RTImage("histogram-type-waveform-small.png"));
+ Gtk::Image* vectHcImage = Gtk::manage(new RTImage("histogram-type-vectorscope-hc-small.png"));
+ Gtk::Image* vectHsImage = Gtk::manage(new RTImage("histogram-type-vectorscope-hs-small.png"));
showRed = Gtk::manage (new Gtk::ToggleButton ());
showGreen = Gtk::manage (new Gtk::ToggleButton ());
@@ -249,36 +243,30 @@ HistogramPanel::HistogramPanel () :
showMode->set_image(*mode1Image);
else
showMode->set_image(*mode2Image);
- scopeHistBtn->set_image(*histImageOff);
- scopeHistRawBtn->set_image(*histRawImageOff);
- scopeParadeBtn->set_image(*paradeImageOff);
- scopeWaveBtn->set_image(*waveImageOff);
- scopeVectHcBtn->set_image(*vectHcImageOff);
- scopeVectHsBtn->set_image(*vectHsImageOff);
+ scopeHistBtn->set_image(*histImage);
+ scopeHistRawBtn->set_image(*histRawImage);
+ scopeParadeBtn->set_image(*paradeImage);
+ scopeWaveBtn->set_image(*waveImage);
+ scopeVectHcBtn->set_image(*vectHcImage);
+ scopeVectHsBtn->set_image(*vectHsImage);
switch(options.histogramScopeType) {
case ScopeType::HISTOGRAM:
scopeHistBtn->set_active();
- scopeHistBtn->set_image(*histImageOn);
break;
case ScopeType::HISTOGRAM_RAW:
scopeHistRawBtn->set_active();
- scopeHistRawBtn->set_image(*histRawImageOn);
break;
case ScopeType::PARADE:
scopeParadeBtn->set_active();
- scopeParadeBtn->set_image(*paradeImageOn);
break;
case ScopeType::WAVEFORM:
scopeWaveBtn->set_active();
- scopeWaveBtn->set_image(*waveImageOn);
break;
case ScopeType::VECTORSCOPE_HS:
scopeVectHsBtn->set_active();
- scopeVectHsBtn->set_image(*vectHsImageOn);
break;
case ScopeType::VECTORSCOPE_HC:
scopeVectHcBtn->set_active();
- scopeVectHcBtn->set_image(*vectHcImageOn);
break;
case ScopeType::NONE:
break;
@@ -294,6 +282,13 @@ HistogramPanel::HistogramPanel () :
setExpandAlignProperties(showMode , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
setExpandAlignProperties(scopeOptions, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
setExpandAlignProperties(showBAR , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
+ setExpandAlignProperties(scopeOptions, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
+ setExpandAlignProperties(scopeHistBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
+ setExpandAlignProperties(scopeHistRawBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
+ setExpandAlignProperties(scopeParadeBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
+ setExpandAlignProperties(scopeWaveBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
+ setExpandAlignProperties(scopeVectHcBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
+ setExpandAlignProperties(scopeVectHsBtn, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
setExpandAlignProperties(persistentButtons, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL);
setExpandAlignProperties(optionButtons, false, true, Gtk::ALIGN_START, Gtk::ALIGN_FILL);
@@ -321,7 +316,7 @@ HistogramPanel::HistogramPanel () :
optionButtons->add(*showBAR);
Gtk::VSeparator* separator = Gtk::manage(new Gtk::VSeparator());
- setExpandAlignProperties(separator, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_END);
+ setExpandAlignProperties(separator, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
persistentButtons->add(*scopeHistBtn);
persistentButtons->add(*scopeHistRawBtn);
persistentButtons->add(*scopeParadeBtn);
@@ -495,52 +490,6 @@ void HistogramPanel::type_selected(Gtk::RadioButton* button)
return;
}
- switch (options.histogramScopeType) {
- case ScopeType::HISTOGRAM:
- scopeHistBtn->set_image(*histImageOff);
- break;
- case ScopeType::HISTOGRAM_RAW:
- scopeHistRawBtn->set_image(*histRawImageOff);
- break;
- case ScopeType::PARADE:
- scopeParadeBtn->set_image(*paradeImageOff);
- break;
- case ScopeType::WAVEFORM:
- scopeWaveBtn->set_image(*waveImageOff);
- break;
- case ScopeType::VECTORSCOPE_HC:
- scopeVectHcBtn->set_image(*vectHcImageOff);
- break;
- case ScopeType::VECTORSCOPE_HS:
- scopeVectHsBtn->set_image(*vectHsImageOff);
- break;
- case ScopeType::NONE:
- break;
- }
-
- switch (new_type) {
- case ScopeType::HISTOGRAM:
- scopeHistBtn->set_image(*histImageOn);
- break;
- case ScopeType::HISTOGRAM_RAW:
- scopeHistRawBtn->set_image(*histRawImageOn);
- break;
- case ScopeType::PARADE:
- scopeParadeBtn->set_image(*paradeImageOn);
- break;
- case ScopeType::WAVEFORM:
- scopeWaveBtn->set_image(*waveImageOn);
- break;
- case ScopeType::VECTORSCOPE_HC:
- scopeVectHcBtn->set_image(*vectHcImageOn);
- break;
- case ScopeType::VECTORSCOPE_HS:
- scopeVectHsBtn->set_image(*vectHsImageOn);
- break;
- case ScopeType::NONE:
- break;
- }
-
options.histogramScopeType = new_type;
type_changed();
diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h
index 5ecf378b8..7cf1c5e6f 100644
--- a/rtgui/histogrampanel.h
+++ b/rtgui/histogrampanel.h
@@ -292,19 +292,6 @@ protected:
Gtk::Image *barImage_g;
Gtk::Image *chroImage_g;
- std::unique_ptr histImageOn;
- std::unique_ptr histRawImageOn;
- std::unique_ptr paradeImageOn;
- std::unique_ptr waveImageOn;
- std::unique_ptr vectHcImageOn;
- std::unique_ptr vectHsImageOn;
- std::unique_ptr histImageOff;
- std::unique_ptr histRawImageOff;
- std::unique_ptr paradeImageOff;
- std::unique_ptr waveImageOff;
- std::unique_ptr vectHcImageOff;
- std::unique_ptr vectHsImageOff;
-
Gtk::Image *mode0Image;
Gtk::Image *mode1Image;
Gtk::Image *mode2Image;