Button-sizing Tweak:TransportIcon alternative to ExpandToSquare

This commit is contained in:
Ben Loftis
2025-01-09 10:29:07 -06:00
committed by Robin Gareus
parent 5208fdce2c
commit d9176fd862
2 changed files with 6 additions and 0 deletions

View File

@@ -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 ());

View File

@@ -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;