summaryrefslogtreecommitdiff
path: root/libs/widgets/ardour_button.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-09-01 16:57:48 +0200
committerRobin Gareus <robin@gareus.org>2019-09-01 16:57:48 +0200
commit7b3ca486a49d09611149a9b31139d3ea762e1a0c (patch)
treee0ea25481e89a25e13738d63ff510c2112dec42a /libs/widgets/ardour_button.cc
parent46bbe834009d51a652e03a7fd4fa57bfb6457e38 (diff)
Allow to un-set custom Ardour-button colors
Diffstat (limited to 'libs/widgets/ardour_button.cc')
-rw-r--r--libs/widgets/ardour_button.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc
index 2ccded83c0..4c1ac05a93 100644
--- a/libs/widgets/ardour_button.cc
+++ b/libs/widgets/ardour_button.cc
@@ -827,6 +827,16 @@ void ArdourButton::set_inactive_color (const uint32_t color)
CairoWidget::set_dirty ();
}
+void ArdourButton::reset_fixed_colors ()
+{
+ if (_fixed_colors_set == 0) {
+ return;
+ }
+ _fixed_colors_set = 0;
+ _update_colors = true;
+ CairoWidget::set_dirty ();
+}
+
void
ArdourButton::build_patterns ()
{
@@ -1096,6 +1106,7 @@ ArdourButton::set_active_state (Gtkmm2ext::ActiveState s)
bool changed = (_active_state != s);
CairoWidget::set_active_state (s);
if (changed) {
+ _update_colors = true;
CairoWidget::set_dirty ();
}
}