summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Sizov <11782833+YuriSizov@users.noreply.github.com>2023-02-03 23:09:18 +0300
committerGitHub <noreply@github.com>2023-02-03 23:09:18 +0300
commite14cacb8da9ca00bc81a614b63df625855989bbb (patch)
tree4d56e97c766fe4389cc2087022e1529e5c6d44ee
parent604493eb6ee3def65aca089c1d4bc71ea03ca19a (diff)
parent386f62df968ff48170aca6cf52438c4897cb0007 (diff)
Merge pull request #71862 from RedMser/splitcontainer-fixes
Fix SplitContainer rendering and theming
-rw-r--r--editor/editor_themes.cpp2
-rw-r--r--scene/gui/split_container.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index d2c82ad013..6410821dcf 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1423,9 +1423,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("grabber", "VSplitContainer", theme->get_icon(SNAME("GuiVsplitter"), SNAME("EditorIcons")));
theme->set_icon("grabber", "HSplitContainer", theme->get_icon(SNAME("GuiHsplitter"), SNAME("EditorIcons")));
+ theme->set_constant("separation", "SplitContainer", default_margin_size * 2 * EDSCALE);
theme->set_constant("separation", "HSplitContainer", default_margin_size * 2 * EDSCALE);
theme->set_constant("separation", "VSplitContainer", default_margin_size * 2 * EDSCALE);
+ theme->set_constant("minimum_grab_thickness", "SplitContainer", 6 * EDSCALE);
theme->set_constant("minimum_grab_thickness", "HSplitContainer", 6 * EDSCALE);
theme->set_constant("minimum_grab_thickness", "VSplitContainer", 6 * EDSCALE);
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index ead9550b93..0c0125df76 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -115,7 +115,7 @@ void SplitContainerDragger::_notification(int p_what) {
return;
}
- Ref<Texture2D> tex = sc->get_theme_icon(SNAME("grabber"));
+ Ref<Texture2D> tex = sc->_get_grabber_icon();
draw_texture(tex, (get_size() - tex->get_size()) / 2);
} break;
}