Skip to content

Commit

Permalink
Merge pull request godotengine#51247 from pycbouh/docs-extract-theme-…
Browse files Browse the repository at this point in the history
…items

Add theme item descriptions to the online documentation
  • Loading branch information
akien-mga authored Aug 4, 2021
2 parents 73b1f5a + bf2839e commit a544e77
Show file tree
Hide file tree
Showing 48 changed files with 654 additions and 578 deletions.
13 changes: 12 additions & 1 deletion core/doc_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@ class DocData {
}
};

struct ThemeItemDoc {
String name;
String type;
String data_type;
String description;
String default_value;
bool operator<(const ThemeItemDoc &p_theme_item) const {
return name < p_theme_item.name;
}
};

struct TutorialDoc {
String link;
String title;
Expand All @@ -133,7 +144,7 @@ class DocData {
Vector<ConstantDoc> constants;
Map<String, String> enums;
Vector<PropertyDoc> properties;
Vector<PropertyDoc> theme_properties;
Vector<ThemeItemDoc> theme_properties;
bool is_script_doc = false;
String script_path;
bool operator<(const ClassDoc &p_class) const {
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/AcceptDialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<constants>
</constants>
<theme_items>
<theme_item name="panel" type="StyleBox">
<theme_item name="panel" data_type="style" type="StyleBox">
Panel that fills up the background of the window.
</theme_item>
</theme_items>
Expand Down
40 changes: 20 additions & 20 deletions doc/classes/Button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,64 +104,64 @@
</constant>
</constants>
<theme_items>
<theme_item name="disabled" type="StyleBox">
<theme_item name="disabled" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
<theme_item name="focus" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="font" type="Font">
<theme_item name="font" data_type="font" type="Font">
[Font] of the [Button]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the [Button].
</theme_item>
<theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
Text [Color] used when the [Button] is disabled.
</theme_item>
<theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Text [Color] used when the [Button] is being hovered.
</theme_item>
<theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [Button] is being hovered and pressed.
</theme_item>
<theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [Button].
</theme_item>
<theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [Button]'s text.
</theme_item>
<theme_item name="hover" type="StyleBox">
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is being hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="2">
<theme_item name="hseparation" data_type="constant" type="int" default="2">
The horizontal space between [Button]'s icon and text.
</theme_item>
<theme_item name="icon_disabled_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="icon_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is disabled.
</theme_item>
<theme_item name="icon_hover_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="icon_hover_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is being hovered.
</theme_item>
<theme_item name="icon_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="icon_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is being hovered and pressed.
</theme_item>
<theme_item name="icon_normal_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="icon_normal_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Default icon modulate [Color] of the [Button].
</theme_item>
<theme_item name="icon_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="icon_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="normal" type="StyleBox">
<theme_item name="normal" data_type="style" type="StyleBox">
Default [StyleBox] for the [Button].
</theme_item>
<theme_item name="outline_size" type="int" default="0">
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
<theme_item name="pressed" type="StyleBox">
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is being pressed.
</theme_item>
</theme_items>
Expand Down
50 changes: 25 additions & 25 deletions doc/classes/CheckBox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,76 +18,76 @@
<constants>
</constants>
<theme_items>
<theme_item name="check_vadjust" type="int" default="0">
<theme_item name="check_vadjust" data_type="constant" type="int" default="0">
The vertical offset used when rendering the check icons (in pixels).
</theme_item>
<theme_item name="checked" type="Texture2D">
<theme_item name="checked" data_type="icon" type="Texture2D">
The check icon to display when the [CheckBox] is checked.
</theme_item>
<theme_item name="checked_disabled" type="Texture2D">
<theme_item name="checked_disabled" data_type="icon" type="Texture2D">
</theme_item>
<theme_item name="disabled" type="StyleBox">
<theme_item name="disabled" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
<theme_item name="focus" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is focused.
</theme_item>
<theme_item name="font" type="Font">
<theme_item name="font" data_type="font" type="Font">
The [Font] to use for the [CheckBox] text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
The [CheckBox] text's font color.
</theme_item>
<theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
The [CheckBox] text's font color when it's disabled.
</theme_item>
<theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
The [CheckBox] text's font color when it's hovered.
</theme_item>
<theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckBox] text's font color when it's hovered and pressed.
</theme_item>
<theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [CheckBox].
</theme_item>
<theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckBox] text's font color when it's pressed.
</theme_item>
<theme_item name="font_size" type="int">
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [CheckBox]'s text.
</theme_item>
<theme_item name="hover" type="StyleBox">
<theme_item name="hover" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is hovered.
</theme_item>
<theme_item name="hover_pressed" type="StyleBox">
<theme_item name="hover_pressed" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The separation between the check icon and the text (in pixels).
</theme_item>
<theme_item name="normal" type="StyleBox">
<theme_item name="normal" data_type="style" type="StyleBox">
The [StyleBox] to display as a background.
</theme_item>
<theme_item name="outline_size" type="int" default="0">
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
<theme_item name="pressed" type="StyleBox">
<theme_item name="pressed" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is pressed.
</theme_item>
<theme_item name="radio_checked" type="Texture2D">
<theme_item name="radio_checked" data_type="icon" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
</theme_item>
<theme_item name="radio_checked_disabled" type="Texture2D">
<theme_item name="radio_checked_disabled" data_type="icon" type="Texture2D">
</theme_item>
<theme_item name="radio_unchecked" type="Texture2D">
<theme_item name="radio_unchecked" data_type="icon" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
</theme_item>
<theme_item name="radio_unchecked_disabled" type="Texture2D">
<theme_item name="radio_unchecked_disabled" data_type="icon" type="Texture2D">
</theme_item>
<theme_item name="unchecked" type="Texture2D">
<theme_item name="unchecked" data_type="icon" type="Texture2D">
The check icon to display when the [CheckBox] is unchecked.
</theme_item>
<theme_item name="unchecked_disabled" type="Texture2D">
<theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
</theme_item>
</theme_items>
</class>
50 changes: 25 additions & 25 deletions doc/classes/CheckButton.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,79 +18,79 @@
<constants>
</constants>
<theme_items>
<theme_item name="check_vadjust" type="int" default="0">
<theme_item name="check_vadjust" data_type="constant" type="int" default="0">
The vertical offset used when rendering the toggle icons (in pixels).
</theme_item>
<theme_item name="disabled" type="StyleBox">
<theme_item name="disabled" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
<theme_item name="focus" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is focused.
</theme_item>
<theme_item name="font" type="Font">
<theme_item name="font" data_type="font" type="Font">
The [Font] to use for the [CheckButton] text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
The [CheckButton] text's font color.
</theme_item>
<theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
The [CheckButton] text's font color when it's disabled.
</theme_item>
<theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
The [CheckButton] text's font color when it's hovered.
</theme_item>
<theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckButton] text's font color when it's hovered and pressed.
</theme_item>
<theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [CheckButton].
</theme_item>
<theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)">
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckButton] text's font color when it's pressed.
</theme_item>
<theme_item name="font_size" type="int">
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [CheckButton]'s text.
</theme_item>
<theme_item name="hover" type="StyleBox">
<theme_item name="hover" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is hovered.
</theme_item>
<theme_item name="hover_pressed" type="StyleBox">
<theme_item name="hover_pressed" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The separation between the toggle icon and the text (in pixels).
</theme_item>
<theme_item name="normal" type="StyleBox">
<theme_item name="normal" data_type="style" type="StyleBox">
The [StyleBox] to display as a background.
</theme_item>
<theme_item name="off" type="Texture2D">
<theme_item name="off" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked (for left-to-right layouts).
</theme_item>
<theme_item name="off_disabled" type="Texture2D">
<theme_item name="off_disabled" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked and disabled (for left-to-right layouts).
</theme_item>
<theme_item name="off_disabled_mirrored" type="Texture2D">
<theme_item name="off_disabled_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked and disabled (for right-to-left layouts).
</theme_item>
<theme_item name="off_mirrored" type="Texture2D">
<theme_item name="off_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked (for right-to-left layouts).
</theme_item>
<theme_item name="on" type="Texture2D">
<theme_item name="on" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked (for left-to-right layouts).
</theme_item>
<theme_item name="on_disabled" type="Texture2D">
<theme_item name="on_disabled" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked and disabled (for left-to-right layouts).
</theme_item>
<theme_item name="on_disabled_mirrored" type="Texture2D">
<theme_item name="on_disabled_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked and disabled (for right-to-left layouts).
</theme_item>
<theme_item name="on_mirrored" type="Texture2D">
<theme_item name="on_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked (for right-to-left layouts).
</theme_item>
<theme_item name="outline_size" type="int" default="0">
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
<theme_item name="pressed" type="StyleBox">
<theme_item name="pressed" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is pressed.
</theme_item>
</theme_items>
Expand Down
Loading

0 comments on commit a544e77

Please sign in to comment.