Merge pull request #112371 from DeeJayLSP/treeitem-stylebox

Add custom `StyleBox` to `TreeItem`
This commit is contained in:
Thaddeus Crews
2025-11-05 13:05:46 -06:00
3 changed files with 45 additions and 0 deletions

View File

@ -203,6 +203,13 @@
Returns custom font size used to draw text in the column [param column].
</description>
</method>
<method name="get_custom_stylebox" qualifiers="const">
<return type="StyleBox" />
<param index="0" name="column" type="int" />
<description>
Returns the given column's custom [StyleBox] used to draw the background.
</description>
</method>
<method name="get_description" qualifiers="const">
<return type="String" />
<param index="0" name="column" type="int" />
@ -614,6 +621,7 @@
<param index="2" name="just_outline" type="bool" default="false" />
<description>
Sets the given column's custom background color and whether to just use it as an outline.
[b]Note:[/b] If a custom [StyleBox] is set, the background color will be drawn behind it.
</description>
</method>
<method name="set_custom_color">
@ -659,6 +667,15 @@
Sets custom font size used to draw text in the given [param column].
</description>
</method>
<method name="set_custom_stylebox">
<return type="void" />
<param index="0" name="column" type="int" />
<param index="1" name="stylebox" type="StyleBox" />
<description>
Sets the given column's custom [StyleBox] used to draw the background.
[b]Note:[/b] If a custom background color is set, the [StyleBox] will be drawn in front of it.
</description>
</method>
<method name="set_description">
<return type="void" />
<param index="0" name="column" type="int" />