Allow to add notes to buttons in the prefs dialog

This commit is contained in:
Robin Gareus 2020-11-24 00:31:04 +01:00
parent ce43161d4e
commit 7a0263295b
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 8 additions and 4 deletions

View File

@ -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);
}
/*--------------------------*/