diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-05-21 15:10:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-21 15:10:14 +0200 |
commit | e3ead06c1d16cc1e7a0b4bd0434605cfa4f2eb3f (patch) | |
tree | 7f6de3f495b960bab7d236de6c5cfce8b85362eb /editor/plugins/theme_editor_plugin.cpp | |
parent | f62638367f274650d7e9259fd8642e3659ed039e (diff) | |
parent | 7ec7dba766557128fcdd7f30f44307156a8c93e8 (diff) |
Merge pull request #29062 from swarnimarun/theme-editor-improvements
Fix Theme Editor Preview
Diffstat (limited to 'editor/plugins/theme_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/theme_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 85743c96d6..672d5d3496 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -631,12 +631,14 @@ 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); @@ -646,11 +648,9 @@ 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); |