From d9176fd862fcfb2c481c443083284aa09501d453 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Thu, 9 Jan 2025 10:29:07 -0600 Subject: [PATCH] Button-sizing Tweak:TransportIcon alternative to ExpandToSquare --- libs/widgets/ardour_button.cc | 5 +++++ libs/widgets/widgets/ardour_button.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc index 822f6b2ebd..8e1ff086c2 100644 --- a/libs/widgets/ardour_button.cc +++ b/libs/widgets/ardour_button.cc @@ -789,6 +789,11 @@ ArdourButton::on_size_request (Gtk::Requisition* req) req->width = wh; req->height = wh; } + else if (_tweaks & TransportIcon) { // same logic as above, but 4x bigger + const int wh = std::max (rint (TRACKHEADERBTNW * char_avg_pixel_width()), ceil (char_pixel_height() * BASELINESTRETCH + 1.)); + req->width = 2 * wh; + req->height = 2 * wh; + } else if (_tweaks & (Square | ExpandtoSquare)) { if (_squaresize.has_value ()) { req->width = std::max (req->width, _squaresize.value ()); diff --git a/libs/widgets/widgets/ardour_button.h b/libs/widgets/widgets/ardour_button.h index 276971de4e..288c8b1878 100644 --- a/libs/widgets/widgets/ardour_button.h +++ b/libs/widgets/widgets/ardour_button.h @@ -69,6 +69,7 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ ForceBoxy = 0x10, ForceFlat = 0x20, ExpandtoSquare = 0x40, + TransportIcon = 0x80, }; static Tweaks default_tweaks;