diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-26 10:37:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-26 10:37:44 +0200 |
commit | 7bb92bc04059c32c38098b0ccf662f5a610e0380 (patch) | |
tree | 3ede59dea8948106c300a8becdea963474742ce4 /doc/classes/Control.xml | |
parent | 9f48db16c26319f87defa4221c4318494bc6dda0 (diff) | |
parent | 74eb2a70bd7ab881776b30fb34bf98d03651bf52 (diff) |
Merge pull request #62845 from AaronRecord/dont_update_theme_outside_of_tree
Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`
Diffstat (limited to 'doc/classes/Control.xml')
-rw-r--r-- | doc/classes/Control.xml | 8 |
1 files changed, 7 insertions, 1 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. |