diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index d63bad7cadc..055d5091c74 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -78,7 +78,7 @@
Button's icon, if text is present the icon will be placed before the text.
- To edit margin and spacing of the icon, use [code]hseparation[/code] theme property of [Button] and [code]content_margin_*[/code] properties of the used [StyleBox]es.
+ To edit margin and spacing of the icon, use [theme_item hseparation] theme property and [code]content_margin_*[/code] properties of the used [StyleBox]es.
Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum TextAlign] constants as the text alignment. If centered, text will draw on top of the icon.
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 673bf191222..e9629924914 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -141,7 +141,7 @@
- Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [code]activity[/code] theme property.
+ Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [theme_item activity] theme property.
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index ff6271d2aaf..e9226f7c1df 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -285,10 +285,10 @@
No overlay is shown.
- Show overlay set in the [code]breakpoint[/code] theme property.
+ Show overlay set in the [theme_item breakpoint] theme property.
- Show overlay set in the [code]position[/code] theme property.
+ Show overlay set in the [theme_item position] theme property.
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py
index 5d3167a773c..0d88ce49989 100755
--- a/doc/tools/make_rst.py
+++ b/doc/tools/make_rst.py
@@ -328,7 +328,7 @@ class State:
theme_item.text,
default_value,
)
- class_def.theme_items[theme_item_id] = theme_item_def
+ class_def.theme_items[theme_item_name] = theme_item_def
tutorials = class_root.find("tutorials")
if tutorials is not None:
@@ -905,6 +905,7 @@ def rstize_text(text, state): # type: (str, State) -> str
or cmd.startswith("member")
or cmd.startswith("signal")
or cmd.startswith("constant")
+ or cmd.startswith("theme_item")
):
param = tag_text[space_pos + 1 :]
@@ -941,6 +942,13 @@ def rstize_text(text, state): # type: (str, State) -> str
print_error("Unresolved member '{}', file: {}".format(param, state.current_class), state)
ref_type = "_property"
+ elif cmd.startswith("theme_item"):
+ if method_param not in class_def.theme_items:
+ print_error(
+ "Unresolved theme item '{}', file: {}".format(param, state.current_class), state
+ )
+ ref_type = "_theme_item"
+
elif cmd.startswith("signal"):
if method_param not in class_def.signals:
print_error("Unresolved signal '{}', file: {}".format(param, state.current_class), state)
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 05f4e385c63..f5208772566 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -109,6 +109,9 @@ void EditorHelp::_class_desc_select(const String &p_select) {
} else if (tag == "constant") {
topic = "class_constant";
table = &this->constant_line;
+ } else if (tag == "theme_item") {
+ topic = "theme_item";
+ table = &this->theme_property_line;
} else {
return;
}
@@ -1538,7 +1541,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
p_rt->add_text("[");
pos = brk_pos + 1;
- } else if (tag.begins_with("method ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ")) {
+ } else if (tag.begins_with("method ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ")) {
int tag_end = tag.find(" ");
String link_tag = tag.substr(0, tag_end);