diff options
author | Robin Gareus <robin@gareus.org> | 2014-09-03 22:06:45 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-09-03 22:06:45 +0200 |
commit | a2a399d6f9d013fba9afe36dcca88183237b3402 (patch) | |
tree | daf096330f51b8d27dabc46356ebabe392ad4d5f /gtk2_ardour/ardour_button.cc | |
parent | ba3eb177c757300e88903d9f847c1da24698197f (diff) |
tweak button size request
Diffstat (limited to 'gtk2_ardour/ardour_button.cc')
-rw-r--r-- | gtk2_ardour/ardour_button.cc | 7 |
1 files 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) |