diff options
author | Robin Gareus <robin@gareus.org> | 2019-09-01 16:57:48 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-09-01 16:57:48 +0200 |
commit | 7b3ca486a49d09611149a9b31139d3ea762e1a0c (patch) | |
tree | e0ea25481e89a25e13738d63ff510c2112dec42a /libs/widgets | |
parent | 46bbe834009d51a652e03a7fd4fa57bfb6457e38 (diff) |
Allow to un-set custom Ardour-button colors
Diffstat (limited to 'libs/widgets')
-rw-r--r-- | libs/widgets/ardour_button.cc | 11 | ||||
-rw-r--r-- | libs/widgets/widgets/ardour_button.h | 1 |
2 files changed, 12 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 (); } } diff --git a/libs/widgets/widgets/ardour_button.h b/libs/widgets/widgets/ardour_button.h index a7fc4a6b2d..0cbd61bb0d 100644 --- a/libs/widgets/widgets/ardour_button.h +++ b/libs/widgets/widgets/ardour_button.h @@ -124,6 +124,7 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ void set_fixed_colors (const uint32_t active_color, const uint32_t inactive_color); void set_active_color (const uint32_t active_color); void set_inactive_color (const uint32_t inactive_color); + void reset_fixed_colors (); void set_fallthrough_to_parent(bool fall) { _fallthrough_to_parent = fall; } |