mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-20 23:06:57 +00:00
Preferences: move the Apply button and disable it unless needed
this also makes it obvious that the Apply button is used only for UI theme selection, and is not a global Apply button
This commit is contained in:
parent
b316ee518b
commit
14732806c9
@ -425,16 +425,6 @@
|
||||
|
||||
[grid]
|
||||
[row]
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
[button]
|
||||
id = "apply"
|
||||
definition = "default"
|
||||
label = _ "Apply"
|
||||
[/button]
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
|
@ -194,6 +194,9 @@
|
||||
[/label]
|
||||
[/column]
|
||||
[/row]
|
||||
[row]
|
||||
[column]
|
||||
[grid]
|
||||
[row]
|
||||
[column]
|
||||
border = "all"
|
||||
@ -205,6 +208,18 @@
|
||||
tooltip = _ "Change the UI (GUI2) theme. Additional themes may be provided by community-made add-ons"
|
||||
[/menu_button]
|
||||
[/column]
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
[button]
|
||||
id = "apply"
|
||||
definition = "default"
|
||||
label = _ "Apply"
|
||||
[/button]
|
||||
[/column]
|
||||
[/row]
|
||||
[/grid]
|
||||
[/column]
|
||||
[/row]
|
||||
[/grid]
|
||||
[/column]
|
||||
|
@ -591,6 +591,10 @@ void preferences_dialog::initialize_callbacks()
|
||||
/* SELECT GUI2 THEME */
|
||||
menu_button& gui2_theme_list = find_widget<menu_button>(this, "choose_gui2_theme", false);
|
||||
set_gui2_theme_list(gui2_theme_list);
|
||||
connect_signal_notify_modified(find_widget<menu_button>(this, "choose_gui2_theme", false), std::bind([&]() {
|
||||
find_widget<button>(this, "apply", false).set_active(true);
|
||||
}));
|
||||
find_widget<button>(this, "apply", false).set_active(false);
|
||||
connect_signal_mouse_left_click(find_widget<button>(this, "apply", false),
|
||||
std::bind(&preferences_dialog::handle_gui2_theme_select, this));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user