Skip to content

Items that are not exposed as overrides cannot be set #5

@nyxkn

Description

@nyxkn

We use _type_has_property to check if the type/item name is valid. But I've come across a few situations where an item is not exposed as a theme property and does not appear as an override, but can still be set in the theme editor.

For example, AcceptDialog has an embedded_border item which does not appear as override but still shows up in the theme editor.

If I manually add the correct type for this item in _get_data_type_for_value then it works correctly:

	if type_name == "AcceptDialog" and item_name == "embedded_border":
		return Theme.DATA_TYPE_STYLEBOX

Not sure if there's a way to get these properties in some other way, instead of relying on the theme property being exposed as an override?

A similar situation is the hidden but useful use-case of adding styles to the Control node, e.g. setting the font_color so that it's shared between all controls. This works fine in the theme editor, but none of the overrides are exposed from a Control node. And again this works fine if I manually return the correct type in _get_data_type_for_value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions