ModeSwitch


Object Hierarchy:

Granite.ModeSwitch Granite.ModeSwitch Granite.ModeSwitch Gtk.Box Gtk.Box Gtk.Box->Granite.ModeSwitch Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Box GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Gtk.Box Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.Box Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Gtk.Box Gtk.ConstraintTarget->Gtk.Widget Gtk.Orientable Gtk.Orientable Gtk.Orientable->Gtk.Box

Description:


public class ModeSwitch : Box

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-7

Content:

Properties:

Creation methods:

Inherited Members:

All known members inherited from class Gtk.Widget
All known members inherited from interface Gtk.Orientable