mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 00:38:07 +02:00
tui: don't center the buttons in a button box
Since we can't align buttons to half-character positions, they end up looking more random than centered: | <Add> | | <Edit...> | | <Delete> | So just let them be left-aligned instead. It looks better.
This commit is contained in:
parent
33d544f472
commit
8c12177f78
1 changed files with 4 additions and 10 deletions
|
|
@ -291,14 +291,10 @@ nmt_newt_button_box_size_allocate (NmtNewtWidget *widget,
|
|||
nmt_newt_widget_size_request (child, &child_width, &child_height);
|
||||
|
||||
if (priv->orientation == NMT_NEWT_BUTTON_BOX_HORIZONTAL) {
|
||||
nmt_newt_widget_size_allocate (child,
|
||||
child_x, child_y + (height - child_height) / 2,
|
||||
child_width, child_height);
|
||||
nmt_newt_widget_size_allocate (child, child_x, child_y, child_width, child_height);
|
||||
child_x += child_width + 1;
|
||||
} else {
|
||||
nmt_newt_widget_size_allocate (child,
|
||||
child_x + (width - child_width) / 2, child_y,
|
||||
child_width, child_height);
|
||||
nmt_newt_widget_size_allocate (child, child_x, child_y, child_width, child_height);
|
||||
child_y += child_height + 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -314,14 +310,12 @@ nmt_newt_button_box_size_allocate (NmtNewtWidget *widget,
|
|||
|
||||
if (priv->orientation == NMT_NEWT_BUTTON_BOX_HORIZONTAL) {
|
||||
nmt_newt_widget_size_allocate (child,
|
||||
child_x - child_width,
|
||||
child_y + (height - child_height) / 2,
|
||||
child_x - child_width, child_y,
|
||||
child_width, child_height);
|
||||
child_x -= child_width + 1;
|
||||
} else {
|
||||
nmt_newt_widget_size_allocate (child,
|
||||
child_x + (width - child_width) / 2,
|
||||
child_y - child_height,
|
||||
child_x, child_y - child_height,
|
||||
child_width, child_height);
|
||||
child_y -= child_height + 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue