ModeSwitch
Object Hierarchy:
Description:
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.Box
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Gtk.Accessible
All known members inherited from interface Gtk.Buildable
All known members inherited from interface Gtk.Orientable