From a2a399d6f9d013fba9afe36dcca88183237b3402 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 3 Sep 2014 22:06:45 +0200 Subject: [PATCH] tweak button size request --- gtk2_ardour/ardour_button.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index 21bc34e964..c29f4568ce 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -570,7 +570,7 @@ ArdourButton::on_size_request (Gtk::Requisition* req) _text_height = 0; } - if (_pixbuf) { + if ((_elements & RecButton) || _pixbuf) { xpad = 6; } @@ -598,11 +598,12 @@ ArdourButton::on_size_request (Gtk::Requisition* req) if ((_elements & RecButton) && !_pixbuf) { assert(!(_elements & Text)); - req->width += char_pixel_height(); - req->height += char_pixel_height(); + req->width += std::max(char_pixel_width(), char_pixel_height()); + req->height += std::max(char_pixel_width(), char_pixel_height()); } req->width += _corner_radius; + req->height += _corner_radius; if ((_tweaks & Square)==Square) { if (req->width < req->height)