summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-boot-editor.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-09-04 15:47:42 +1000
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-09-07 16:55:46 +1000
commitf84a33d3b924b3fff999826e4bf86d64067728b2 (patch)
tree4dc35ce6dc120569fa2185fa8d2ea80f7a5a47aa /ui/ncurses/nc-boot-editor.c
parentb4d338c2ae40f16091a4bb4a0cc4f2e322f4f4b9 (diff)
downloadtalos-petitboot-f84a33d3b924b3fff999826e4bf86d64067728b2.tar.gz
talos-petitboot-f84a33d3b924b3fff999826e4bf86d64067728b2.zip
ui/ncurses: Resize & adjust OK/Help/Cancel buttons
The localisation of 'OK' is cut short in a few languages by a character or two - adjust the buttons in each affected screen slightly to accommodate. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'ui/ncurses/nc-boot-editor.c')
-rw-r--r--ui/ncurses/nc-boot-editor.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/ncurses/nc-boot-editor.c b/ui/ncurses/nc-boot-editor.c
index f55fe4a..e2357f9 100644
--- a/ui/ncurses/nc-boot-editor.c
+++ b/ui/ncurses/nc-boot-editor.c
@@ -317,9 +317,12 @@ static void boot_editor_layout_widgets(struct boot_editor *boot_editor)
y++;
- widget_move(widget_button_base(boot_editor->widgets.ok_b), y, 9);
- widget_move(widget_button_base(boot_editor->widgets.help_b), y, 19);
- widget_move(widget_button_base(boot_editor->widgets.cancel_b), y, 33);
+ widget_move(widget_button_base(boot_editor->widgets.ok_b), y,
+ boot_editor->field_x);
+ widget_move(widget_button_base(boot_editor->widgets.help_b), y,
+ boot_editor->field_x + 14);
+ widget_move(widget_button_base(boot_editor->widgets.cancel_b), y,
+ boot_editor->field_x + 28);
}
static void boot_editor_widget_focus(struct nc_widget *widget, void *arg)
@@ -490,7 +493,7 @@ static void boot_editor_setup_widgets(struct boot_editor *boot_editor,
boot_editor->widgets.args_f = widget_new_textbox(set, 0, 0,
field_size, boot_editor->args);
- boot_editor->widgets.ok_b = widget_new_button(set, 0, 0, 6,
+ boot_editor->widgets.ok_b = widget_new_button(set, 0, 0, 10,
_("OK"), ok_click, boot_editor);
boot_editor->widgets.help_b = widget_new_button(set, 0, 0, 10,
_("Help"), help_click, boot_editor);
OpenPOWER on IntegriCloud