ModeSwitch


Object Hierarchy:

Granite.ModeSwitch Granite.ModeSwitch Granite.ModeSwitch Gtk.Grid Gtk.Grid Gtk.Grid->Granite.ModeSwitch Gtk.Container Gtk.Container Gtk.Container->Gtk.Grid Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.Grid Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.Grid Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Orientable Gtk.Orientable Gtk.Orientable->Gtk.Grid

Description:


public class ModeSwitch : Grid

ModeSwitch is a selection control for choosing between two options that can be described with an icon.

Example

	var gtk_settings = Gtk.Settings.get_default ();

var mode_switch = new ModeSwitch.from_icon_name ("display-brightness-symbolic", "weather-clear-night-symbolic");
mode_switch.primary_icon_tooltip_text = _("Light background");
mode_switch.secondary_icon_tooltip_text = _("Dark background");
mode_switch.bind_property ("active", gtk_settings, "gtk_application_prefer_dark_theme");

Namespace: Granite
Package: granite

Content:

Properties:

Creation methods:

Inherited Members:

All known members inherited from class Gtk.Grid
All known members inherited from class Gtk.Container
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Buildable
All known members inherited from interface Gtk.Orientable



2022 vala-language.org