Allow disabling the transition

This commit is contained in:
Romain Vigier
2022-02-19 11:38:39 +01:00
parent 533c6788f9
commit caba6a8848
5 changed files with 80 additions and 50 deletions
+3
View File
@@ -16,6 +16,7 @@ var SchedulePage = GObject.registerClass({
GTypeName: 'SchedulePage',
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'SchedulePage.ui'])}`,
InternalChildren: [
'transition_switch',
'manual_time_source_switch',
'time_source_combo_row',
'always_show_ondemand_switch',
@@ -35,6 +36,8 @@ var SchedulePage = GObject.registerClass({
const colorSettings = new Gio.Settings({ schema: 'org.gnome.settings-daemon.plugins.color' });
const locationSettings = new Gio.Settings({ schema: 'org.gnome.system.location' });
settings.bind('transition', this._transition_switch, 'active', Gio.SettingsBindFlags.DEFAULT);
settings.bind('manual-time-source', this._manual_time_source_switch, 'active', Gio.SettingsBindFlags.DEFAULT);
const choiceFilter = new Gtk.BoolFilter({ expression: Gtk.PropertyExpression.new(DropDownChoice, null, 'enabled') });
+16
View File
@@ -8,6 +8,22 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="name">schedule</property>
<property name="title" translatable="yes">Schedule</property>
<property name="icon-name">nightthemeswitcher-schedule-symbolic</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Transition</property>
<property name="subtitle" translatable="yes">Smooth transition between day and night appearance.</property>
<property name="activatable-widget">transition_switch</property>
<child>
<object class="GtkSwitch" id="transition_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>