gui: Use true labelless checkboxes in the dropdown menu implementation

Using checkboxes with an empty label doesn't quite do the trick and it
results in some (minimal) wasted horizontal space.
This commit is contained in:
Iris Morelle 2023-05-22 03:45:23 -04:00
parent b1f632b85d
commit 0fa13e9894
No known key found for this signature in database
GPG key ID: BB9666228F278524
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,8 @@
#textdomain wesnoth-lib
###
### Definition of a toggle button without a label.
### (Note that this is also used by the implementation of the dropdown menu on
### the C++ side.)
###
#define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT

View file

@ -195,7 +195,7 @@ void drop_down_menu::pre_show(window& window)
find_widget<toggle_panel>(&new_row, "panel", false).set_tooltip(entry.tooltip);
if(entry.checkbox) {
auto checkbox = build_single_widget_instance<toggle_button>();
auto checkbox = build_single_widget_instance<toggle_button>(config{"definition", "no_label"});
checkbox->set_id("checkbox");
checkbox->set_value_bool(*entry.checkbox);