From: Robin Gareus Date: Wed, 10 Jul 2013 20:34:39 +0000 (+0200) Subject: ardour-button - fix test+LED margin X-Git-Tag: 3.3~59 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=03fa5fcd3a2c707c66bdc22bc1ffd68266df3a0c;p=ardour.git ardour-button - fix test+LED margin --- diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index 2c191385f4..bd9254f4c1 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -421,6 +421,7 @@ ArdourButton::set_diameter (float d) } set_colors (); + queue_resize (); } void @@ -443,7 +444,7 @@ ArdourButton::on_size_request (Gtk::Requisition* req) if (_text_width + _diameter < 75) { xpad = 7; } else { - xpad = 20; + xpad = 12; } } else { _text_width = 0; @@ -459,7 +460,7 @@ ArdourButton::on_size_request (Gtk::Requisition* req) req->width = _pixbuf->get_width() + lrint (_diameter) + xpad; req->height = max (_pixbuf->get_height(), (int) lrint (_diameter)) + ypad; } else { - req->width = _text_width + lrint (_diameter) + xpad; + req->width = _text_width + lrint (_diameter) + xpad * 2; // margin left+right * 2 req->height = max (_text_height, (int) lrint (_diameter)) + ypad; } } else {