diff options
author | João Pedro Braz <brazjoaopedro@ymail.com> | 2023-04-27 15:16:28 -0300 |
---|---|---|
committer | João Pedro Braz <josaid@localhost.localdomain> | 2023-06-02 11:32:40 +0200 |
commit | 670b7bec9aeb5e31ed840e9dfcdd1e3171acc5e5 (patch) | |
tree | b89af0f860c9b7d497c931a63c8e6a6074279664 /scene/resources/default_theme | |
parent | 150acefb39baf20f28ef92ee438add6571d1826b (diff) | |
download | redot-engine-670b7bec9aeb5e31ed840e9dfcdd1e3171acc5e5.tar.gz |
Add the "inner_item_margin" Theme constant to the Tree control
This PR adds the "inner_item_margin" Theme constant to the Tree Control.
It behaves like a horizontal padding (in CSS), but only in the active
writing direction (So on LTR it'll apply a left padding and on RTL right
padding).
The Editor Theme has been updated to make use of this and a result items
in Trees and ItemLists no longer "hugs" their border, expressing a proper
spacing instead.
Diffstat (limited to 'scene/resources/default_theme')
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 1bfcf8d3ac..ea56e07608 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -774,6 +774,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_constant("h_separation", "Tree", 4 * scale); theme->set_constant("v_separation", "Tree", 4 * scale); theme->set_constant("item_margin", "Tree", 16 * scale); + theme->set_constant("inner_item_margin_bottom", "Tree", 0); + theme->set_constant("inner_item_margin_left", "Tree", 0); + theme->set_constant("inner_item_margin_right", "Tree", 0); + theme->set_constant("inner_item_margin_top", "Tree", 0); theme->set_constant("button_margin", "Tree", 4 * scale); theme->set_constant("draw_relationship_lines", "Tree", 0); theme->set_constant("relationship_line_width", "Tree", 1); |