Merge pull request #7650 from irydacea/feature/gui-dropdown-checkbox-tweak

gui: Use true labelless checkboxes in the dropdown menu implementation
This commit is contained in:
Charles Dang 2023-05-24 22:48:28 -04:00 committed by GitHub
commit 8f112d287e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);