From 7a0263295beeb2ed8cd1a972e8bca11f4610b4f6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 24 Nov 2020 00:31:04 +0100 Subject: [PATCH] Allow to add notes to buttons in the prefs dialog --- gtk2_ardour/option_editor.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index 553871c14b..e47499d711 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -197,17 +197,21 @@ void RcActionButton::add_to_page (OptionEditorPage *p) { int const n = p->table.property_n_rows(); - const int m = n + 1; + int m = n + 1; + if (!_note.empty ()) { + ++m; + } 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, m); - p->table.attach (*a, 2, 3, n, m, FILL|EXPAND); + p->table.attach (*_label, 1, 2, n, n + 1); + p->table.attach (*a, 2, 3, n, n + 1, FILL|EXPAND); } else { - p->table.attach (*a, 1, 3, n, m, FILL|EXPAND); + p->table.attach (*a, 1, 3, n, n + 1, FILL|EXPAND); } + maybe_add_note (p, n + 1); } /*--------------------------*/