RcActionButton is now always its natural width
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 7 Jun 2019 00:30:12 +0000 (18:30 -0600)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 7 Jun 2019 00:32:13 +0000 (18:32 -0600)
gtk2_ardour/option_editor.cc

index 63fe44e484e19904212d215c12873c4eb26995a2..9cf4920121cea9721816170915ec1c64e008acf4 100644 (file)
@@ -190,13 +190,16 @@ void
 RcActionButton::add_to_page (OptionEditorPage *p)
 {
        int const n = p->table.property_n_rows();
-       int m = n + 1;
+       const int m = n + 1;
        p->table.resize (m, 3);
+       Alignment* a = manage (new Alignment (0, 0.5, 0, 1.0));
+       a->add (*_button);
+
        if (_label) {
-               p->table.attach (*_label,  1, 2, n, n + 1, FILL | EXPAND);
-               p->table.attach (*_button, 2, 3, n, n + 1, FILL | EXPAND);
+               p->table.attach (*_label,  1, 2, n, m);
+               p->table.attach (*a, 2, 3, n, m, FILL|EXPAND);
        } else {
-               p->table.attach (*_button, 1, 3, n, n + 1, FILL | EXPAND);
+               p->table.attach (*a, 1, 3, n, m, FILL|EXPAND);
        }
 }