summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-11-13 23:06:47 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-01-07 20:51:22 +0100
commitf6443beade093a1413e87c53fb9821e5e25c859f (patch)
treedb7af9fbae268faf1512e421243c4ed277efeb57 /doc
parent6e4da909aaa7ca70864016bac3a8fe424ee7194a (diff)
Add a theme constant to change LineEdit and TextEdit's caret width
This can be useful to improve caret visibility, especially at larger font sizes. This can also be used for accessibility purposes.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/LineEdit.xml5
-rw-r--r--doc/classes/TextEdit.xml5
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index c3e3088d69..f9a5d76c80 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -383,7 +383,7 @@
</constants>
<theme_items>
<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
- Color of the [LineEdit]'s caret (text cursor).
+ Color of the [LineEdit]'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely.
</theme_item>
<theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Color used as default tint for the clear button.
@@ -406,6 +406,9 @@
<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
Color of the selection rectangle.
</theme_item>
+ <theme_item name="caret_width" data_type="constant" type="int" default="1">
+ The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size.
+ </theme_item>
<theme_item name="minimum_character_width" data_type="constant" type="int" default="4">
Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling).
</theme_item>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 26ad20e85b..5c93ca180d 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -1223,7 +1223,7 @@
[Color] of the text behind the caret when using a block caret.
</theme_item>
<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
- [Color] of the caret.
+ [Color] of the caret. This can be set to a fully transparent color to hide the caret entirely.
</theme_item>
<theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
Background [Color] of the line containing the caret.
@@ -1252,6 +1252,9 @@
<theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
</theme_item>
+ <theme_item name="caret_width" data_type="constant" type="int" default="1">
+ The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size. If set to [code]0[/code] or lower, the caret width is automatically set to 1 pixel and multiplied by the display scaling factor.
+ </theme_item>
<theme_item name="line_spacing" data_type="constant" type="int" default="4">
Sets the spacing between the lines.
</theme_item>