From 7a41c44be2993b21260f4e1f6b9f99949b92dce7 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 7 Feb 2020 10:01:42 +0800 Subject: [PATCH] Completes doc for ItemList and Tree --- doc/classes/ItemList.xml | 14 +++++++ doc/classes/Tree.xml | 40 +++++++++++++++++-- .../resources/default_theme/default_theme.cpp | 2 - 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 006066dea38..5c4a956c088 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -513,32 +513,46 @@ + Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused. + [StyleBox] used when the [ItemList] is being focused. + [StyleBox] used for the cursor, when the [ItemList] is being focused. + [StyleBox] used for the cursor, when the [ItemList] is not being focused. + [Font] of the item's text. + Default text [Color] of the item. + Text [Color] used when the item is selected. + [Color] of the guideline. The guideline is a line drawn between each row of items. + The horizontal spacing between items. + The spacing between item's icon and text. + The vertical spacing between each line of text. + [StyleBox] for the selected items, used when the [ItemList] is not being focused. + [StyleBox] for the selected items, used when the [ItemList] is being focused. + The vertical spacing between items. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index a28dcec92b8..54aa85ff484 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -387,80 +387,112 @@ + The arrow icon used when a foldable item is not collapsed. + The arrow icon used when a foldable item is collapsed. + Default [StyleBox] for the [Tree], i.e. used when the control is not being focused. + [StyleBox] used when the [Tree] is being focused. + The horizontal space between each button in a cell. + [StyleBox] used when a button in the tree is pressed. + The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. - - + [StyleBox] used for the cursor, when the [Tree] is being focused. + [StyleBox] used for the cursor, when the [Tree] is not being focused. + Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell. + Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. + [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. + [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed. + Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item. + Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy. + [Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations. + [Font] of the item's text. + Default text [Color] of the item. + Text [Color] used when the item is selected. + [Color] of the guideline. + The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled. + The horizontal margin at the start of an item. This is used when folding is enabled for the item. + [Color] of the relationship lines. + The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging. + The speed of border scrolling. + The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. + [StyleBox] for the selected items, used when the [Tree] is not being focused. - - + [StyleBox] for the selected items, used when the [Tree] is being focused. + Default text [Color] of the title button. + [Font] of the title button's text. + [StyleBox] used when the title button is being hovered. + Default [StyleBox] for the title button. + [StyleBox] used when the title button is being pressed. + The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked. + The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. + The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border. diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index cc76df62e59..00c56e5eb22 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -647,8 +647,6 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("title_button_color", "Tree", control_font_color); theme->set_color("font_color", "Tree", control_font_color_low); theme->set_color("font_color_selected", "Tree", control_font_color_pressed); - theme->set_color("selection_color", "Tree", Color(0.1, 0.1, 1, 0.8)); - theme->set_color("cursor_color", "Tree", Color(0, 0, 0)); theme->set_color("guide_color", "Tree", Color(0, 0, 0, 0.1)); theme->set_color("drop_position_color", "Tree", Color(1, 0.3, 0.2)); theme->set_color("relationship_line_color", "Tree", Color(0.27, 0.27, 0.27));