These are, indeed, different.
First of all, your Control
might not have a Theme
, and thus the line:
print(theme.get_font_size("normal_font_size", "RichTextLabel"))
Is an error (trying to call a method on a null value).
But more importantly, using get_theme_font_size
et.al. will have in consideration the theme overrides that might be set on the Control
, while accessing the theme
directly will not.
Note that different Control
classes offer different theme overrides.
And yes, theme overrides are available even without a Theme
.
Addendum:
It is worth noting that it is intended that you set the Theme
at the root of your UI, and all children Control
s will use that same Theme
, so you do not have to set the theme
of every Control
.
To be clear, the theme
property is the Theme
explicitly set on a Control
. But a Theme
might be applied on a Control
because it is set on its theme
property or on the theme
property of one of its ancestors on the scene tree.
On the same logic, get_theme_font_size
and similar methods will pick up the Theme
that is applied to the Control
, which might or might be set on the theme
on the same Control
or an ancestor.
By the way, theme overrides are specific of the Control
. They do not propagate on the same manner.