diff --git a/data/gui/widget/unit_preview_pane.cfg b/data/gui/widget/unit_preview_pane.cfg index c0991042769..9240a79ff5b 100644 --- a/data/gui/widget/unit_preview_pane.cfg +++ b/data/gui/widget/unit_preview_pane.cfg @@ -194,8 +194,8 @@ vertical_grow = false horizontal_alignment = "left" vertical_alignment = "top" - border = "top,right" - border_size = 3 + border = "top" + border_size = 2 [image] definition = "default" id = "image_range" @@ -207,8 +207,8 @@ vertical_grow = false horizontal_alignment = "left" vertical_alignment = "top" - border = "top,right" - border_size = 3 + border = "top" + border_size = 2 [image] definition = "default" id = "image_type" @@ -220,8 +220,8 @@ vertical_grow = false horizontal_alignment = "left" vertical_alignment = "top" - border = "top,bottom" - border_size = 1 + border = "left" + border_size = 5 [label] wrap = true definition = "default_small" diff --git a/src/gui/widgets/unit_preview_pane.cpp b/src/gui/widgets/unit_preview_pane.cpp index 1e27aae8ace..81de17eb50f 100644 --- a/src/gui/widgets/unit_preview_pane.cpp +++ b/src/gui/widgets/unit_preview_pane.cpp @@ -224,16 +224,16 @@ void unit_preview_pane::print_attack_details(T attacks, tree_view_node& parent_n const bool range_png_exists = ::image::locator(range_png).file_exists(); const bool type_png_exists = ::image::locator(type_png).file_exists(); - auto& subsection = add_name_tree_node( - header_node, - "item", - (formatter() << font::span_color(font::unit_type_color) << a.damage() << font::weapon_numbers_sep << a.num_attacks() << " " << a.name() << "").str() - ); - - subsection.add_child("item_image", + const std::string label = (formatter() + << font::span_color(font::unit_type_color) + << a.damage() << font::weapon_numbers_sep << a.num_attacks() + << " " << a.name() << "").str(); + auto& subsection = header_node.add_child( + "item_image", { - { "image_range", { { "label", range_png }, { "use_markup", "true" } } }, - { "image_type", { { "label", type_png }, { "use_markup", "true" } } }, + { "image_range", { { "label", range_png } } }, + { "image_type", { { "label", type_png } } }, + { "name", { { "label", label }, { "use_markup", "true" } } }, } );