summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorAaron Record <aaronjrecord@gmail.com>2022-07-08 13:29:36 -0600
committerAaron Record <aaronjrecord@gmail.com>2022-08-25 14:50:49 -0600
commit74eb2a70bd7ab881776b30fb34bf98d03651bf52 (patch)
treee466586778b82947139193c011ace5e217139984 /doc/classes
parent6d196c1ce34340874c413e166e14933729346302 (diff)
Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Control.xml8
-rw-r--r--doc/classes/Window.xml9
2 files changed, 15 insertions, 2 deletions
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index b7a9ae235e..a3cd4d0752 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1145,6 +1145,7 @@
</signal>
<signal name="theme_changed">
<description>
+ Emitted when the [constant NOTIFICATION_THEME_CHANGED] notification is sent.
</description>
</signal>
</signals>
@@ -1174,7 +1175,12 @@
Sent when the node loses focus.
</constant>
<constant name="NOTIFICATION_THEME_CHANGED" value="45">
- Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_theme_*_override[/code] methods.
+ Sent when the node needs to refresh its theme items. This happens in one of the following cases:
+ - The [member theme] property is changed on this node or any of its ancestors.
+ - The [member theme_type_variation] property is changed on this node.
+ - One of the node's theme property overrides is changed.
+ - The node enters the scene tree.
+ [b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.
</constant>
<constant name="NOTIFICATION_SCROLL_BEGIN" value="47">
Sent when this node is inside a [ScrollContainer] which has begun being scrolled.
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index ce7ad1e64e..c3002a8a9f 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -448,7 +448,7 @@
</signal>
<signal name="theme_changed">
<description>
- Emitted when the [member theme] is modified or changed to another [Theme].
+ Emitted when the [constant NOTIFICATION_THEME_CHANGED] notification is sent.
</description>
</signal>
<signal name="visibility_changed">
@@ -467,6 +467,13 @@
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30">
Emitted when [Window]'s visibility changes, right before [signal visibility_changed].
</constant>
+ <constant name="NOTIFICATION_THEME_CHANGED" value="32">
+ Sent when the node needs to refresh its theme items. This happens in one of the following cases:
+ - The [member theme] property is changed on this node or any of its ancestors.
+ - The [member theme_type_variation] property is changed on this node.
+ - The node enters the scene tree.
+ [b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.
+ </constant>
<constant name="MODE_WINDOWED" value="0" enum="Mode">
Windowed mode, i.e. [Window] doesn't occupy whole screen (unless set to the size of the screen).
</constant>