ardour-button - fix test+LED margin
authorRobin Gareus <robin@gareus.org>
Wed, 10 Jul 2013 20:34:39 +0000 (22:34 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 10 Jul 2013 20:34:39 +0000 (22:34 +0200)
gtk2_ardour/ardour_button.cc

index 2c191385f45ab163e2e5106971e53351318a90bb..bd9254f4c1bbceb66b9899c7374c2ec784682107 100644 (file)
@@ -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 {