Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

ThemeDB

Inherits: Object

A singleton that provides access to static information about Theme resources used by the engine and by your project.

Description

This singleton provides access to static information about Theme resources used by the engine and by your projects. You can fetch the default engine theme, as well as your project configured theme.

ThemeDB also contains fallback values for theme properties.

Properties

float

fallback_base_scale

1.0

Font

fallback_font

int

fallback_font_size

16

Texture2D

fallback_icon

StyleBox

fallback_stylebox

Methods

Theme

get_default_theme ( )

Theme

get_project_theme ( )


Signals

fallback_changed ( )

Emitted when one of the fallback values had been changed. Use it to refresh the look of controls that may rely on the fallback theme items.


Property Descriptions

float fallback_base_scale = 1.0

  • void set_fallback_base_scale ( float value )

  • float get_fallback_base_scale ( )

The fallback base scale factor of every Control node and Theme resource. Used when no other value is available to the control.

See also Theme.default_base_scale.


Font fallback_font

  • void set_fallback_font ( Font value )

  • Font get_fallback_font ( )

The fallback font of every Control node and Theme resource. Used when no other value is available to the control.

See also Theme.default_font.


int fallback_font_size = 16

  • void set_fallback_font_size ( int value )

  • int get_fallback_font_size ( )

The fallback font size of every Control node and Theme resource. Used when no other value is available to the control.

See also Theme.default_font_size.


Texture2D fallback_icon