From e78de225d45cffbd830e6690184f3c39e9dc1157 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 25 Jan 2021 19:18:18 +0100 Subject: [PATCH] ArdourButton: LED-sized buttons w/o LED This is useful for consistent layout in the recorder Window, where Buttons are either push-buttons or LED toggle-buttons. --- libs/widgets/ardour_button.cc | 2 +- libs/widgets/widgets/ardour_button.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc index 110bb2fea6..73efb155de 100644 --- a/libs/widgets/ardour_button.cc +++ b/libs/widgets/ardour_button.cc @@ -682,7 +682,7 @@ ArdourButton::on_size_request (Gtk::Requisition* req) req->height = std::max(req->height, _pixbuf->get_height() + 4); } - if (_elements & Indicator) { + if ((_elements & Indicator) || (_tweaks & OccasionalLED)) { req->width += ceil (_diameter + char_pixel_width()); req->height = std::max (req->height, (int) lrint (_diameter) + 4); } diff --git a/libs/widgets/widgets/ardour_button.h b/libs/widgets/widgets/ardour_button.h index 0cbd61bb0d..75690c4da6 100644 --- a/libs/widgets/widgets/ardour_button.h +++ b/libs/widgets/widgets/ardour_button.h @@ -64,7 +64,7 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ Square = 0x1, TrackHeader = 0x2, OccasionalText = 0x4, - unused4 = 0x8, + OccasionalLED = 0x8, }; Tweaks tweaks() const { return _tweaks; }