13
0

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.
This commit is contained in:
Robin Gareus 2021-01-25 19:18:18 +01:00
parent 98847b115e
commit e78de225d4
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 2 additions and 2 deletions

View File

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

View File

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