Godot Version
v4.3.stable.official [77dcf97d8]
Question
Why does Label's size does not change?
Label’s script
extends Label
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
print("Before edit")
print('self.get_theme_font_size("font_size") -> ', self.get_theme_font_size("font_size"))
print('self.size -> ', self.size)
self.add_theme_font_size_override("font_size", 50)
self.reset_size()
print("After edit")
print('self.get_theme_font_size("font_size") -> ', self.get_theme_font_size("font_size"))
print('self.size -> ', self.size)
Output
Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
OpenGL API 3.3 (Core Profile) Mesa 22.3.6 - Compatibility - Using Device: Intel - Mesa Intel(R) HD Graphics 3000 (SNB GT2)
Before edit
self.get_theme_font_size("font_size") -> 30
self.size -> (189, 42)
After edit
self.get_theme_font_size("font_size") -> 50
self.size -> (189, 69)
--- Debugging process stopped ---