From 29cc86fa6c19c32b44522bdac9726e2392b7182b Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Tue, 29 Nov 2022 23:01:45 +0300 Subject: Copy local theme overrides from Control to Window --- doc/classes/Control.xml | 3 +- doc/classes/Window.xml | 210 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 188 insertions(+), 25 deletions(-) (limited to 'doc') diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 8a38deeebe..fd6aab6a49 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1071,7 +1071,8 @@ Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. - The [Theme] resource this node and all its [Control] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority. + The [Theme] resource this node and all its [Control] and [Window] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority. + [b]Note:[/b] [Window] styles will have no effect unless the window is embedded. The name of a theme type variation used by this [Control] to look up its own theme items. When empty, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance). diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index d736f103ab..16ca486e4a 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -10,6 +10,66 @@ + + + + + + Creates a local override for a theme [Color] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override]. + See also [method get_theme_color] and [method Control.add_theme_color_override] for more details. + + + + + + + + Creates a local override for a theme constant with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override]. + See also [method get_theme_constant]. + + + + + + + + Creates a local override for a theme [Font] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override]. + See also [method get_theme_font]. + + + + + + + + Creates a local override for a theme font size with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override]. + See also [method get_theme_font_size]. + + + + + + + + Creates a local override for a theme icon with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override]. + See also [method get_theme_icon]. + + + + + + + + Creates a local override for a theme [StyleBox] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override]. + See also [method get_theme_stylebox] and [method Control.add_theme_stylebox_override] for more details. + + + + + + Prevents [code]*_theme_*_override[/code] methods from emitting [constant NOTIFICATION_THEME_CHANGED] until [method end_bulk_theme_override] is called. + + @@ -22,6 +82,12 @@ Requests an update of the [Window] size to fit underlying [Control] nodes. + + + + Ends a bulk theme override update. See [method begin_bulk_theme_override]. + + @@ -58,7 +124,7 @@ - Returns the [Color] at [param name] if the theme has [param theme_type]. + Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for more details. @@ -67,29 +133,29 @@ - Returns the constant at [param name] if the theme has [param theme_type]. + Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for more details. - Returns the default base scale defined in the attached [Theme]. - See [member Theme.default_base_scale] for more details. + Returns the default base scale value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_base_scale] value. + See [method Control.get_theme_color] for details. - Returns the default [Font] defined in the attached [Theme]. - See [member Theme.default_font] for more details. + Returns the default font from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font] value. + See [method Control.get_theme_color] for details. - Returns the default font size defined in the attached [Theme]. - See [member Theme.default_font_size] for more details. + Returns the default font size value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font_size] value. + See [method Control.get_theme_color] for details. @@ -97,8 +163,8 @@ - Returns the [Font] at [param name] if the theme has [param theme_type]. - See [method Control.get_theme_color] for more details. + Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. @@ -106,8 +172,8 @@ - Returns the font size at [param name] if the theme has [param theme_type]. - See [method Control.get_theme_color] for more details. + Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. @@ -115,8 +181,8 @@ - Returns the icon at [param name] if the theme has [param theme_type]. - See [method Control.get_theme_color] for more details. + Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. @@ -124,8 +190,8 @@ - Returns the [StyleBox] at [param name] if the theme has [param theme_type]. - See [method Control.get_theme_color] for more details. + Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. @@ -145,7 +211,16 @@ - Returns [code]true[/code] if [Color] with [param name] is in [param theme_type]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. + + + + + + + Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [param name] in this [Control] node. + See [method add_theme_color_override]. @@ -153,7 +228,16 @@ - Returns [code]true[/code] if constant with [param name] is in [param theme_type]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. + + + + + + + Returns [code]true[/code] if there is a local override for a theme constant with the specified [param name] in this [Control] node. + See [method add_theme_constant_override]. @@ -161,7 +245,16 @@ - Returns [code]true[/code] if [Font] with [param name] is in [param theme_type]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. + + + + + + + Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [param name] in this [Control] node. + See [method add_theme_font_override]. @@ -169,7 +262,16 @@ - Returns [code]true[/code] if font size with [param name] is in [param theme_type]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. + + + + + + + Returns [code]true[/code] if there is a local override for a theme font size with the specified [param name] in this [Control] node. + See [method add_theme_font_size_override]. @@ -177,7 +279,16 @@ - Returns [code]true[/code] if icon with [param name] is in [param theme_type]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. + + + + + + + Returns [code]true[/code] if there is a local override for a theme icon with the specified [param name] in this [Control] node. + See [method add_theme_icon_override]. @@ -185,7 +296,16 @@ - Returns [code]true[/code] if [StyleBox] with [param name] is in [param theme_type]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [param name] and [param theme_type]. + See [method Control.get_theme_color] for details. + + + + + + + Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [param name] in this [Control] node. + See [method add_theme_stylebox_override]. @@ -264,6 +384,48 @@ If the [Window] is embedded, has the same effect as [method popup]. + + + + + Removes a local override for a theme [Color] with the specified [param name] previously added by [method add_theme_color_override] or via the Inspector dock. + + + + + + + Removes a local override for a theme constant with the specified [param name] previously added by [method add_theme_constant_override] or via the Inspector dock. + + + + + + + Removes a local override for a theme [Font] with the specified [param name] previously added by [method add_theme_font_override] or via the Inspector dock. + + + + + + + Removes a local override for a theme font size with the specified [param name] previously added by [method add_theme_font_size_override] or via the Inspector dock. + + + + + + + Removes a local override for a theme icon with the specified [param name] previously added by [method add_theme_icon_override] or via the Inspector dock. + + + + + + + Removes a local override for a theme [StyleBox] with the specified [param name] previously added by [method add_theme_stylebox_override] or via the Inspector dock. + + @@ -373,8 +535,8 @@ The window's size in pixels. - The [Theme] resource that determines the style of the underlying [Control] nodes. - [Window] styles will have no effect unless the window is embedded. + The [Theme] resource this node and all its [Control] and [Window] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority. + [b]Note:[/b] [Window] styles will have no effect unless the window is embedded. The name of a theme type variation used by this [Window] to look up its own theme items. See [member Control.theme_type_variation] for more details. -- cgit v1.2.3