From f8a2c847b5b23415fe275fa6c2ab0f116c70f7fc Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 13 Dec 2023 18:38:46 +0100 Subject: [PATCH] ui: correctly implement themable button outline color --- libs/widgets/ardour_button.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc index 7cd6386ed2..6bace1247e 100644 --- a/libs/widgets/ardour_button.cc +++ b/libs/widgets/ardour_button.cc @@ -783,13 +783,18 @@ ArdourButton::set_colors () { _update_colors = false; + std::string name = get_name(); + bool failed = false; + + outline_color = UIConfigurationBase::instance().color (string_compose ("%1: outline", name), &failed); + if (failed) { + outline_color = UIConfigurationBase::instance().color ("generic button: outline"); + } + if (_fixed_colors_set == 0x3) { return; } - std::string name = get_name(); - bool failed = false; - if (!(_fixed_colors_set & 0x1)) { fill_active_color = UIConfigurationBase::instance().color (string_compose ("%1: fill active", name), &failed); if (failed) { @@ -812,9 +817,6 @@ ArdourButton::set_colors () led_active_color = UIConfigurationBase::instance().color ("generic button: led active"); } - outline_color = UIConfigurationBase::instance().color ("generic button: outline"); - - /* The inactive color for the LED is just a fairly dark version of the * active color. */