diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-12 09:59:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-12 09:59:29 +0200 |
commit | a1dde733726cfd4a86235e42bf691024a964dc35 (patch) | |
tree | be8c5ba4636bb8a935bb618db428af54ef17295d /editor/plugins/theme_editor_plugin.cpp | |
parent | 2e0525a16147e662ceedb898797fd4cff596f042 (diff) | |
parent | 1c872c75dbca070b63f8355cb0aa85f1a7f369ad (diff) |
Merge pull request #31247 from YeldhamDev/theme_editor_fixup
Minor fixups to the theme editor
Diffstat (limited to 'editor/plugins/theme_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/theme_editor_plugin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 5b67d259ba..873b125200 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -631,14 +631,12 @@ ThemeEditor::ThemeEditor() { scroll = memnew(ScrollContainer); add_child(scroll); - scroll->set_theme(Theme::get_default()); scroll->set_enable_v_scroll(true); scroll->set_enable_h_scroll(false); scroll->set_v_size_flags(SIZE_EXPAND_FILL); main_container = memnew(MarginContainer); scroll->add_child(main_container); - main_container->set_theme(Theme::get_default()); main_container->set_clip_contents(true); main_container->set_custom_minimum_size(Size2(700, 0) * EDSCALE); main_container->set_v_size_flags(SIZE_EXPAND_FILL); @@ -648,9 +646,11 @@ ThemeEditor::ThemeEditor() { Panel *panel = memnew(Panel); main_container->add_child(panel); + panel->set_theme(Theme::get_default()); MarginContainer *mc = memnew(MarginContainer); main_container->add_child(mc); + mc->set_theme(Theme::get_default()); mc->add_constant_override("margin_right", 4 * EDSCALE); mc->add_constant_override("margin_top", 4 * EDSCALE); mc->add_constant_override("margin_left", 4 * EDSCALE); @@ -695,19 +695,19 @@ ThemeEditor::ThemeEditor() { test_menu_button->get_popup()->add_separator(); test_menu_button->get_popup()->add_check_item(TTR("Check Item")); test_menu_button->get_popup()->add_check_item(TTR("Checked Item")); - test_menu_button->get_popup()->set_item_checked(3, true); + test_menu_button->get_popup()->set_item_checked(4, true); test_menu_button->get_popup()->add_separator(); test_menu_button->get_popup()->add_radio_check_item(TTR("Radio Item")); test_menu_button->get_popup()->add_radio_check_item(TTR("Checked Radio Item")); - test_menu_button->get_popup()->set_item_checked(6, true); + test_menu_button->get_popup()->set_item_checked(7, true); test_menu_button->get_popup()->add_separator(TTR("Named Sep.")); PopupMenu *test_submenu = memnew(PopupMenu); test_menu_button->get_popup()->add_child(test_submenu); test_submenu->set_name("submenu"); test_menu_button->get_popup()->add_submenu_item(TTR("Submenu"), "submenu"); - test_submenu->add_item(TTR("Item 1")); - test_submenu->add_item(TTR("Item 2")); + test_submenu->add_item(TTR("Subitem 1")); + test_submenu->add_item(TTR("Subitem 2")); first_vb->add_child(test_menu_button); OptionButton *test_option_button = memnew(OptionButton); |