:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ThemeDB.xml. .. _class_ThemeDB: ThemeDB ======= **Inherits:** :ref:`Object` A singleton that provides access to static information about :ref:`Theme` resources used by the engine and by your project. .. rst-class:: classref-introduction-group Description ----------- This singleton provides access to static information about :ref:`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. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------------------+------------------------------------------------------------------------+---------+ | :ref:`float` | :ref:`fallback_base_scale` | ``1.0`` | +-----------------------------------+------------------------------------------------------------------------+---------+ | :ref:`Font` | :ref:`fallback_font` | | +-----------------------------------+------------------------------------------------------------------------+---------+ | :ref:`int` | :ref:`fallback_font_size` | ``16`` | +-----------------------------------+------------------------------------------------------------------------+---------+ | :ref:`Texture2D` | :ref:`fallback_icon` | | +-----------------------------------+------------------------------------------------------------------------+---------+ | :ref:`StyleBox` | :ref:`fallback_stylebox` | | +-----------------------------------+------------------------------------------------------------------------+---------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------+------------------------------------------------------------------------+ | :ref:`Theme` | :ref:`get_default_theme`\ (\ ) | +---------------------------+------------------------------------------------------------------------+ | :ref:`Theme` | :ref:`get_project_theme`\ (\ ) | +---------------------------+------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_ThemeDB_signal_fallback_changed: .. rst-class:: classref-signal **fallback_changed**\ (\ ) :ref:`🔗` 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. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ThemeDB_property_fallback_base_scale: .. rst-class:: classref-property :ref:`float` **fallback_base_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_fallback_base_scale**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_fallback_base_scale**\ (\ ) The fallback base scale factor of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. See also :ref:`Theme.default_base_scale`. .. rst-class:: classref-item-separator ---- .. _class_ThemeDB_property_fallback_font: .. rst-class:: classref-property :ref:`Font` **fallback_font** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_fallback_font**\ (\ value\: :ref:`Font`\ ) - :ref:`Font` **get_fallback_font**\ (\ ) The fallback font of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. See also :ref:`Theme.default_font`. .. rst-class:: classref-item-separator ---- .. _class_ThemeDB_property_fallback_font_size: .. rst-class:: classref-property :ref:`int` **fallback_font_size** = ``16`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_fallback_font_size**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_fallback_font_size**\ (\ ) The fallback font size of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. See also :ref:`Theme.default_font_size`. .. rst-class:: classref-item-separator ---- .. _class_ThemeDB_property_fallback_icon: .. rst-class:: classref-property :ref:`Texture2D` **fallback_icon** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_fallback_icon**\ (\ value\: :ref:`Texture2D`\ ) - :ref:`Texture2D` **get_fallback_icon**\ (\ ) The fallback icon of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. .. rst-class:: classref-item-separator ---- .. _class_ThemeDB_property_fallback_stylebox: .. rst-class:: classref-property :ref:`StyleBox` **fallback_stylebox** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_fallback_stylebox**\ (\ value\: :ref:`StyleBox`\ ) - :ref:`StyleBox` **get_fallback_stylebox**\ (\ ) The fallback stylebox of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ThemeDB_method_get_default_theme: .. rst-class:: classref-method :ref:`Theme` **get_default_theme**\ (\ ) :ref:`🔗` Returns a reference to the default engine :ref:`Theme`. This theme resource is responsible for the out-of-the-box look of :ref:`Control` nodes and cannot be overridden. .. rst-class:: classref-item-separator ---- .. _class_ThemeDB_method_get_project_theme: .. rst-class:: classref-method :ref:`Theme` **get_project_theme**\ (\ ) :ref:`🔗` Returns a reference to the custom project :ref:`Theme`. This theme resources allows to override the default engine theme for every control node in the project. To set the project theme, see :ref:`ProjectSettings.gui/theme/custom`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`