From 399f6679112087461ad9dc3a72996c13658a4f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Sep 2018 12:14:58 +0200 Subject: [PATCH] Use plain text instead of icons for video driver toggle Fixes #21660, supersedes and closes #21724. --- editor/editor_node.cpp | 13 +++---- editor/icons/icon_g_l_e_s_2.svg | 69 --------------------------------- editor/icons/icon_g_l_e_s_3.svg | 67 -------------------------------- 3 files changed, 5 insertions(+), 144 deletions(-) delete mode 100644 editor/icons/icon_g_l_e_s_2.svg delete mode 100644 editor/icons/icon_g_l_e_s_3.svg diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index bef754853c9..b652a25b6bb 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5358,22 +5358,20 @@ EditorNode::EditorNode() { play_custom_scene_button->set_shortcut(ED_SHORTCUT("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F5)); #endif + // Toggle for video driver video_driver = memnew(OptionButton); video_driver->set_flat(true); video_driver->set_focus_mode(Control::FOCUS_NONE); video_driver->set_v_size_flags(Control::SIZE_SHRINK_CENTER); + video_driver->connect("item_selected", this, "_video_driver_selected"); + menu_hb->add_child(video_driver); + String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/quality/driver/driver_name"].hint_string; String current_video_driver = OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver()); - menu_hb->add_child(video_driver); video_driver_current = 0; for (int i = 0; i < video_drivers.get_slice_count(","); i++) { String driver = video_drivers.get_slice(",", i); - if (gui_base->has_icon(driver, "EditorIcons")) { - video_driver->add_icon_item(gui_base->get_icon(driver, "EditorIcons"), ""); - } else { - video_driver->add_item(driver); - } - + video_driver->add_item(driver); video_driver->set_item_metadata(i, driver); if (current_video_driver == driver) { @@ -5382,7 +5380,6 @@ EditorNode::EditorNode() { } } - video_driver->connect("item_selected", this, "_video_driver_selected"); video_restart_dialog = memnew(ConfirmationDialog); video_restart_dialog->set_text(TTR("Changing the video driver requires restarting the editor.")); video_restart_dialog->get_ok()->set_text(TTR("Save & Restart")); diff --git a/editor/icons/icon_g_l_e_s_2.svg b/editor/icons/icon_g_l_e_s_2.svg deleted file mode 100644 index efc4f01e4fc..00000000000 --- a/editor/icons/icon_g_l_e_s_2.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/editor/icons/icon_g_l_e_s_3.svg b/editor/icons/icon_g_l_e_s_3.svg deleted file mode 100644 index dfa3c26b384..00000000000 --- a/editor/icons/icon_g_l_e_s_3.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - -