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.
This commit is contained in:
João Pedro Braz 2023-04-27 15:16:28 -03:00 committed by João Pedro Braz
parent 150acefb39
commit 670b7bec9a
5 changed files with 31 additions and 4 deletions

View file

@ -542,6 +542,18 @@
<theme_item name="icon_max_width" data_type="constant" type="int" default="0">
The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with [method TreeItem.set_icon_max_width]. The height is adjusted according to the icon's ratio.
</theme_item>
<theme_item name="inner_item_margin_bottom" data_type="constant" type="int" default="0">
The inner bottom margin of an item.
</theme_item>
<theme_item name="inner_item_margin_left" data_type="constant" type="int" default="0">
The inner left margin of an item.
</theme_item>
<theme_item name="inner_item_margin_right" data_type="constant" type="int" default="0">
The inner right margin of an item.
</theme_item>
<theme_item name="inner_item_margin_top" data_type="constant" type="int" default="0">
The inner top margin of an item.
</theme_item>
<theme_item name="item_margin" data_type="constant" type="int" default="16">
The horizontal margin at the start of an item. This is used when folding is enabled for the item.
</theme_item>