From b5b9e1d1e5d356dc61b97484c0d44d965506a6d1 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 17 Feb 2017 20:51:15 +0100 Subject: Fix button sizing for IconRenderCallback --- gtk2_ardour/ardour_button.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index 3395486d35..91a1a9ab98 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -624,7 +624,7 @@ ArdourButton::on_size_request (Gtk::Requisition* req) * of text. */ - } else { //if (!_text.empty() || !_sizing_text.empty()) { + } else /*if (!_text.empty() || !_sizing_text.empty()) */ { req->height = std::max(req->height, (int) ceil(char_pixel_height() * BASELINESTRETCH + 1.0)); req->width += rint(1.75 * char_pixel_width()); // padding @@ -671,7 +671,7 @@ ArdourButton::on_size_request (Gtk::Requisition* req) req->width += _diameter + 4; } - if (_elements & VectorIcon) { + if (_elements & (VectorIcon | IconRenderCallback)) { assert(!(_elements & Text)); const int wh = std::max (6., std::max (rint (TRACKHEADERBTNW * char_avg_pixel_width()), ceil (char_pixel_height() * BASELINESTRETCH + 1.))); req->width += wh; -- cgit v1.2.3