gui2/unit_create: UI refinements

* Make the default variation's label "Default Variation" instead of
   just "Default" (see below).
 * Drop the "Variation:" and "Gender:" labels as they take up valuable
   real estate and aren't strictly necessary since the controls they are
   attached to are very much self-explanatory. This is a debug mode
   utility dialog anyway.
 * Swap the order according to option importance -- gender is usually
   thought of as more of an essential property of units than their type
   variation, especially since unit types with multiple variations are
   rare in mainline. This means that the gender options are now on the
   left instead of on the right.
 * Improve display alignment for the variation/gender options row.
This commit is contained in:
Iris Morelle 2020-07-06 01:18:29 -04:00
parent be4b927fd8
commit 3ecc7cb834
2 changed files with 37 additions and 44 deletions

View file

@ -201,25 +201,53 @@
[column]
grow_factor = 1
horizontal_alignment = "right"
horizontal_grow = true
[grid]
[row]
grow_factor=0
[column]
border = "all"
border_size = 5
horizontal_alignment = "left"
[label]
definition = "default"
label= _ "Variation:"
[/label]
[grid]
[row]
[column]
border = "all"
border_size = 5
[toggle_button]
id = "male_toggle"
definition = "radio"
label= _ "Male"
[/toggle_button]
[/column]
[column]
border = "all"
border_size = 5
[toggle_button]
id = "female_toggle"
definition = "radio"
label= _ "Female"
[/toggle_button]
[/column]
[/row]
[/grid]
[/column]
[column]
border = "all"
border_size = 5
horizontal_alignment = "left"
horizontal_alignment = "right"
[menu_button]
id = "variation_box"
@ -227,41 +255,6 @@
[/menu_button]
[/column]
[column]
border = "all"
border_size = 5
horizontal_alignment = "left"
[label]
definition = "default"
label= _ "Gender:"
[/label]
[/column]
[column]
border = "all"
border_size = 5
horizontal_alignment = "right"
[toggle_button]
id = "male_toggle"
definition = "radio"
label= _ "Male"
[/toggle_button]
[/column]
[column]
border = "all"
border_size = 5
horizontal_alignment = "right"
[toggle_button]
id = "female_toggle"
definition = "radio"
label= _ "Female"
[/toggle_button]
[/column]
[/row]
[/grid]

View file

@ -226,7 +226,7 @@ void unit_create::list_item_clicked(window& window)
menu_button& var_box = find_widget<menu_button>(&window, "variation_box", false);
std::vector<config> var_box_values;
var_box_values.emplace_back("label", _("unit_variation^Default"), "variation_id", "");
var_box_values.emplace_back("label", _("unit_variation^Default Variation"), "variation_id", "");
const auto& ut = *units_[selected_row];
const auto& uvars = ut.variation_types();