BaseWidget#

class ignis.base_widget.BaseWidget(setup: Callable | None = None, style_priority: Literal['application', 'fallback', 'settings', 'theme', 'user'] | None = None, vexpand: bool = False, hexpand: bool = False, visible: bool = True, **kwargs)#

Bases: IgnisGObject.

The base class for all widgets. Provides style property and allows overriding enums.

property style_priority: Literal['application', 'fallback', 'settings', 'theme', 'user']#
  • read-write

The style priority for this widget. Overrides widgets_style_priority.

More info about style priorities: Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION.

Warning

Changing this property won't affect an already applied style!

some_widget = WIDGET_NAME(
    style="some style",
    style_priority="user"
)
some_widget.style_priority = "application"  # nothing change for current style
some_widget.style = "new style"  # this style will have "application" priority
override_enum(property_name: str, enum: Any) None#

Override an enum.

Parameters:
  • property_name (str) -- The name of the property to override.

  • enum (GObject.GEnum) -- An enum that accepts the property to be overridden. For example, for valign it will be Gtk.Align.

Return type:

None