+static int layout_pair(struct boot_editor *boot_editor, int y,
+ struct nc_widget_label *label,
+ struct nc_widget_textbox *field)
+{
+ struct nc_widget *label_w = widget_label_base(label);
+ struct nc_widget *field_w = widget_textbox_base(field);
+ widget_move(label_w, y, boot_editor->label_x);
+ widget_move(field_w, y, boot_editor->field_x);
+ return max(widget_height(label_w), widget_height(field_w));
+}
+
+static void boot_editor_layout_widgets(struct boot_editor *boot_editor)
+{
+ int y = 1;
+
+ y += layout_pair(boot_editor, y, boot_editor->widgets.image_l,
+ boot_editor->widgets.image_f);
+
+ y += layout_pair(boot_editor, y, boot_editor->widgets.initrd_l,
+ boot_editor->widgets.initrd_f);
+
+ y += layout_pair(boot_editor, y, boot_editor->widgets.dtb_l,
+ boot_editor->widgets.dtb_f);
+
+ y += layout_pair(boot_editor, y, boot_editor->widgets.args_l,
+ boot_editor->widgets.args_f);
+
+
+ y++;
+ widget_move(widget_button_base(boot_editor->widgets.ok_b), y, 9);
+ widget_move(widget_button_base(boot_editor->widgets.cancel_b), y, 19);
+}
+