Panel.ThemeSelector

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Panel.ThemeSelector Panel.ThemeSelector Gtk.Widget->Panel.ThemeSelector

Subclasses:

None

Methods

Inherited:

Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

get_action_name ()

set_action_name (action_name)

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)

Properties

Inherited:

Gtk.Widget (34), Gtk.Accessible (1)

Name

Type

Flags

Short Description

action-name

str

r/w/en

The action to bind choices to

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Class Details

class Panel.ThemeSelector(**kwargs)
Bases:

Gtk.Widget

Abstract:

No

Structure:

Panel.ThemeSelectorClass

A widget that allow selecting theme preference between “dark”, “light” and “follow” the system preference.

<picture> <source srcset=”theme-selector-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”theme-selector.png” alt=”theme-selector”> </picture>

Upon activation it will activate the named action in Panel.ThemeSelector :action-name.

classmethod new()
Returns:

a newly created Panel.ThemeSelector.

Return type:

Gtk.Widget

Create a new #ThemeSelector.

get_action_name()
Returns:

the name of the action.

Return type:

str

Gets the name of the action that will be activated.

set_action_name(action_name)
Parameters:

action_name (str) – the action name.

Sets the name of the action that will be activated.

Property Details

Panel.ThemeSelector.props.action_name
Name:

action-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The name of the action activated on activation.