Themes page: Use expander rows
This commit is contained in:
@@ -14,7 +14,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
<schema id="org.gnome.shell.extensions.nightthemeswitcher.gtk-variants" path="/org/gnome/shell/extensions/nightthemeswitcher/gtk-variants/">
|
<schema id="org.gnome.shell.extensions.nightthemeswitcher.gtk-variants" path="/org/gnome/shell/extensions/nightthemeswitcher/gtk-variants/">
|
||||||
<key name="enabled" type="b">
|
<key name="enabled" type="b">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
<summary>Switch GTK variants</summary>
|
<summary>Switch GTK theme</summary>
|
||||||
<description>Enable GTK variants switching</description>
|
<description>Enable GTK variants switching</description>
|
||||||
</key>
|
</key>
|
||||||
<key name="day" type="s">
|
<key name="day" type="s">
|
||||||
@@ -31,7 +31,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
<schema id="org.gnome.shell.extensions.nightthemeswitcher.shell-variants" path="/org/gnome/shell/extensions/nightthemeswitcher/shell-variants/">
|
<schema id="org.gnome.shell.extensions.nightthemeswitcher.shell-variants" path="/org/gnome/shell/extensions/nightthemeswitcher/shell-variants/">
|
||||||
<key name="enabled" type="b">
|
<key name="enabled" type="b">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
<summary>Switch shell variants</summary>
|
<summary>Switch Shell theme</summary>
|
||||||
<description>Enable shell variants switching</description>
|
<description>Enable shell variants switching</description>
|
||||||
</key>
|
</key>
|
||||||
<key name="day" type="s">
|
<key name="day" type="s">
|
||||||
@@ -48,7 +48,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
<schema id="org.gnome.shell.extensions.nightthemeswitcher.icon-variants" path="/org/gnome/shell/extensions/nightthemeswitcher/icon-variants/">
|
<schema id="org.gnome.shell.extensions.nightthemeswitcher.icon-variants" path="/org/gnome/shell/extensions/nightthemeswitcher/icon-variants/">
|
||||||
<key name="enabled" type="b">
|
<key name="enabled" type="b">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
<summary>Switch icon variants</summary>
|
<summary>Switch icon theme</summary>
|
||||||
<description>Enable icon variants switching</description>
|
<description>Enable icon variants switching</description>
|
||||||
</key>
|
</key>
|
||||||
<key name="day" type="s">
|
<key name="day" type="s">
|
||||||
@@ -65,7 +65,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
<schema id="org.gnome.shell.extensions.nightthemeswitcher.cursor-variants" path="/org/gnome/shell/extensions/nightthemeswitcher/cursor-variants/">
|
<schema id="org.gnome.shell.extensions.nightthemeswitcher.cursor-variants" path="/org/gnome/shell/extensions/nightthemeswitcher/cursor-variants/">
|
||||||
<key name="enabled" type="b">
|
<key name="enabled" type="b">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
<summary>Switch cursor variants</summary>
|
<summary>Switch cursor theme</summary>
|
||||||
<description>Enable cursor variants switching</description>
|
<description>Enable cursor variants switching</description>
|
||||||
</key>
|
</key>
|
||||||
<key name="day" type="s">
|
<key name="day" type="s">
|
||||||
|
|||||||
+53
-65
@@ -25,81 +25,69 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwPreferencesGroup">
|
<object class="AdwPreferencesGroup">
|
||||||
<property name="title" translatable="yes">GTK theme</property>
|
|
||||||
<property name="description" translatable="yes">Forcing a dark theme on applications not designed to support it can have undesirable side-effects such as unreadable text or invisible icons.</property>
|
|
||||||
<property name="header-suffix">
|
|
||||||
<object class="GtkSwitch" id="gtk_enabled_switch">
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwComboRow" id="gtk_day_variant_combo_row">
|
<object class="AdwExpanderRow" id="gtk_row">
|
||||||
<property name="title" translatable="yes">Day variant</property>
|
<property name="title" translatable="yes">Switch GTK theme</property>
|
||||||
|
<property name="subtitle" translatable="yes">Forcing a dark theme on applications not designed to support it can have undesirable side-effects such as unreadable text or invisible icons.</property>
|
||||||
|
<property name="show-enable-switch">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwComboRow" id="gtk_day_variant_combo_row">
|
||||||
|
<property name="title" translatable="yes">Day variant</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwComboRow" id="gtk_night_variant_combo_row">
|
||||||
|
<property name="title" translatable="yes">Night variant</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwComboRow" id="gtk_night_variant_combo_row">
|
<object class="AdwExpanderRow" id="shell_row">
|
||||||
<property name="title" translatable="yes">Night variant</property>
|
<property name="title" translatable="yes">Switch Shell theme</property>
|
||||||
</object>
|
<property name="show-enable-switch">True</property>
|
||||||
</child>
|
<child>
|
||||||
</object>
|
<object class="AdwComboRow" id="shell_day_variant_combo_row">
|
||||||
</child>
|
<property name="title" translatable="yes">Day variant</property>
|
||||||
<child>
|
</object>
|
||||||
<object class="AdwPreferencesGroup">
|
</child>
|
||||||
<property name="title" translatable="yes">Shell theme</property>
|
<child>
|
||||||
<property name="header-suffix">
|
<object class="AdwComboRow" id="shell_night_variant_combo_row">
|
||||||
<object class="GtkSwitch" id="shell_enabled_switch">
|
<property name="title" translatable="yes">Night variant</property>
|
||||||
<property name="valign">center</property>
|
</object>
|
||||||
</object>
|
</child>
|
||||||
</property>
|
|
||||||
<child>
|
|
||||||
<object class="AdwComboRow" id="shell_day_variant_combo_row">
|
|
||||||
<property name="title" translatable="yes">Day variant</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwComboRow" id="shell_night_variant_combo_row">
|
<object class="AdwExpanderRow" id="icon_row">
|
||||||
<property name="title" translatable="yes">Night variant</property>
|
<property name="title" translatable="yes">Switch icon theme</property>
|
||||||
</object>
|
<property name="show-enable-switch">True</property>
|
||||||
</child>
|
<child>
|
||||||
</object>
|
<object class="AdwComboRow" id="icon_day_variant_combo_row">
|
||||||
</child>
|
<property name="title" translatable="yes">Day variant</property>
|
||||||
<child>
|
</object>
|
||||||
<object class="AdwPreferencesGroup">
|
</child>
|
||||||
<property name="title" translatable="yes">Icon theme</property>
|
<child>
|
||||||
<property name="header-suffix">
|
<object class="AdwComboRow" id="icon_night_variant_combo_row">
|
||||||
<object class="GtkSwitch" id="icon_enabled_switch">
|
<property name="title" translatable="yes">Night variant</property>
|
||||||
<property name="valign">center</property>
|
</object>
|
||||||
</object>
|
</child>
|
||||||
</property>
|
|
||||||
<child>
|
|
||||||
<object class="AdwComboRow" id="icon_day_variant_combo_row">
|
|
||||||
<property name="title" translatable="yes">Day variant</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwComboRow" id="icon_night_variant_combo_row">
|
<object class="AdwExpanderRow" id="cursor_row">
|
||||||
<property name="title" translatable="yes">Night variant</property>
|
<property name="title" translatable="yes">Switch cursor theme</property>
|
||||||
</object>
|
<property name="show-enable-switch">True</property>
|
||||||
</child>
|
<child>
|
||||||
</object>
|
<object class="AdwComboRow" id="cursor_day_variant_combo_row">
|
||||||
</child>
|
<property name="title" translatable="yes">Day variant</property>
|
||||||
<child>
|
</object>
|
||||||
<object class="AdwPreferencesGroup">
|
</child>
|
||||||
<property name="title" translatable="yes">Cursor theme</property>
|
<child>
|
||||||
<property name="header-suffix">
|
<object class="AdwComboRow" id="cursor_night_variant_combo_row">
|
||||||
<object class="GtkSwitch" id="cursor_enabled_switch">
|
<property name="title" translatable="yes">Night variant</property>
|
||||||
<property name="valign">center</property>
|
</object>
|
||||||
</object>
|
</child>
|
||||||
</property>
|
|
||||||
<child>
|
|
||||||
<object class="AdwComboRow" id="cursor_day_variant_combo_row">
|
|
||||||
<property name="title" translatable="yes">Day variant</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="AdwComboRow" id="cursor_night_variant_combo_row">
|
|
||||||
<property name="title" translatable="yes">Night variant</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: nightthemeswitcher@romainvigier.fr\n"
|
"Project-Id-Version: nightthemeswitcher@romainvigier.fr\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-04-05 11:41+0200\n"
|
"POT-Creation-Date: 2022-04-05 12:01+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -26,7 +26,8 @@ msgid "The current extension settings version"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:17
|
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:17
|
||||||
msgid "Switch GTK variants"
|
#: src/data/ui/ThemesPage.ui:30
|
||||||
|
msgid "Switch GTK theme"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:18
|
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:18
|
||||||
@@ -50,7 +51,8 @@ msgid "The GTK theme to use during nighttime"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:34
|
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:34
|
||||||
msgid "Switch shell variants"
|
#: src/data/ui/ThemesPage.ui:47
|
||||||
|
msgid "Switch Shell theme"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:35
|
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:35
|
||||||
@@ -74,7 +76,8 @@ msgid "The shell theme to use during nighttime"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:51
|
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:51
|
||||||
msgid "Switch icon variants"
|
#: src/data/ui/ThemesPage.ui:63
|
||||||
|
msgid "Switch icon theme"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:52
|
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:52
|
||||||
@@ -98,7 +101,8 @@ msgid "The icon theme to use during nighttime"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:68
|
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:68
|
||||||
msgid "Switch cursor variants"
|
#: src/data/ui/ThemesPage.ui:79
|
||||||
|
msgid "Switch cursor theme"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:69
|
#: src/data/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:69
|
||||||
@@ -400,38 +404,22 @@ msgid ""
|
|||||||
"themes is discouraged and is only here for legacy reasons."
|
"themes is discouraged and is only here for legacy reasons."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/ui/ThemesPage.ui:28
|
#: src/data/ui/ThemesPage.ui:31
|
||||||
msgid "GTK theme"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/data/ui/ThemesPage.ui:29
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Forcing a dark theme on applications not designed to support it can have "
|
"Forcing a dark theme on applications not designed to support it can have "
|
||||||
"undesirable side-effects such as unreadable text or invisible icons."
|
"undesirable side-effects such as unreadable text or invisible icons."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/ui/ThemesPage.ui:37 src/data/ui/ThemesPage.ui:57
|
#: src/data/ui/ThemesPage.ui:35 src/data/ui/ThemesPage.ui:51
|
||||||
#: src/data/ui/ThemesPage.ui:77 src/data/ui/ThemesPage.ui:97
|
#: src/data/ui/ThemesPage.ui:67 src/data/ui/ThemesPage.ui:83
|
||||||
msgid "Day variant"
|
msgid "Day variant"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/ui/ThemesPage.ui:42 src/data/ui/ThemesPage.ui:62
|
#: src/data/ui/ThemesPage.ui:40 src/data/ui/ThemesPage.ui:56
|
||||||
#: src/data/ui/ThemesPage.ui:82 src/data/ui/ThemesPage.ui:102
|
#: src/data/ui/ThemesPage.ui:72 src/data/ui/ThemesPage.ui:88
|
||||||
msgid "Night variant"
|
msgid "Night variant"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/data/ui/ThemesPage.ui:49
|
|
||||||
msgid "Shell theme"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/data/ui/ThemesPage.ui:69
|
|
||||||
msgid "Icon theme"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/data/ui/ThemesPage.ui:89
|
|
||||||
msgid "Cursor theme"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Time separator (eg. 08:27)
|
#. Time separator (eg. 08:27)
|
||||||
#: src/data/ui/TimeChooser.ui:23
|
#: src/data/ui/TimeChooser.ui:23
|
||||||
msgid ":"
|
msgid ":"
|
||||||
|
|||||||
@@ -16,16 +16,16 @@ var ThemesPage = GObject.registerClass({
|
|||||||
GTypeName: 'ThemesPage',
|
GTypeName: 'ThemesPage',
|
||||||
Template: 'resource:///org/gnome/shell/extensions/nightthemeswitcher/preferences/ui/ThemesPage.ui',
|
Template: 'resource:///org/gnome/shell/extensions/nightthemeswitcher/preferences/ui/ThemesPage.ui',
|
||||||
InternalChildren: [
|
InternalChildren: [
|
||||||
'gtk_enabled_switch',
|
'gtk_row',
|
||||||
'gtk_day_variant_combo_row',
|
'gtk_day_variant_combo_row',
|
||||||
'gtk_night_variant_combo_row',
|
'gtk_night_variant_combo_row',
|
||||||
'shell_enabled_switch',
|
'shell_row',
|
||||||
'shell_day_variant_combo_row',
|
'shell_day_variant_combo_row',
|
||||||
'shell_night_variant_combo_row',
|
'shell_night_variant_combo_row',
|
||||||
'icon_enabled_switch',
|
'icon_row',
|
||||||
'icon_day_variant_combo_row',
|
'icon_day_variant_combo_row',
|
||||||
'icon_night_variant_combo_row',
|
'icon_night_variant_combo_row',
|
||||||
'cursor_enabled_switch',
|
'cursor_row',
|
||||||
'cursor_day_variant_combo_row',
|
'cursor_day_variant_combo_row',
|
||||||
'cursor_night_variant_combo_row',
|
'cursor_night_variant_combo_row',
|
||||||
],
|
],
|
||||||
@@ -37,28 +37,28 @@ var ThemesPage = GObject.registerClass({
|
|||||||
const iconSettings = extensionUtils.getSettings(utils.getSettingsSchema('icon-variants'));
|
const iconSettings = extensionUtils.getSettings(utils.getSettingsSchema('icon-variants'));
|
||||||
const cursorSettings = extensionUtils.getSettings(utils.getSettingsSchema('cursor-variants'));
|
const cursorSettings = extensionUtils.getSettings(utils.getSettingsSchema('cursor-variants'));
|
||||||
|
|
||||||
gtkSettings.bind('enabled', this._gtk_enabled_switch, 'active', Gio.SettingsBindFlags.DEFAULT);
|
gtkSettings.bind('enabled', this._gtk_row, 'enable-expansion', Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
const gtkThemesStore = Gio.ListStore.new(DropDownChoice);
|
const gtkThemesStore = Gio.ListStore.new(DropDownChoice);
|
||||||
gtkThemesStore.splice(0, 0, Array.from(utils.getInstalledGtkThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme })));
|
gtkThemesStore.splice(0, 0, Array.from(utils.getInstalledGtkThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme })));
|
||||||
_setupComboRow(this._gtk_day_variant_combo_row, gtkThemesStore, gtkSettings, 'day');
|
_setupComboRow(this._gtk_day_variant_combo_row, gtkThemesStore, gtkSettings, 'day');
|
||||||
_setupComboRow(this._gtk_night_variant_combo_row, gtkThemesStore, gtkSettings, 'night');
|
_setupComboRow(this._gtk_night_variant_combo_row, gtkThemesStore, gtkSettings, 'night');
|
||||||
|
|
||||||
shellSettings.bind('enabled', this._shell_enabled_switch, 'active', Gio.SettingsBindFlags.DEFAULT);
|
shellSettings.bind('enabled', this._shell_row, 'enable-expansion', Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
const shellThemesStore = Gio.ListStore.new(DropDownChoice);
|
const shellThemesStore = Gio.ListStore.new(DropDownChoice);
|
||||||
shellThemesStore.splice(0, 0, Array.from(utils.getInstalledShellThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme || _('Default') })));
|
shellThemesStore.splice(0, 0, Array.from(utils.getInstalledShellThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme || _('Default') })));
|
||||||
_setupComboRow(this._shell_day_variant_combo_row, shellThemesStore, shellSettings, 'day');
|
_setupComboRow(this._shell_day_variant_combo_row, shellThemesStore, shellSettings, 'day');
|
||||||
_setupComboRow(this._shell_night_variant_combo_row, shellThemesStore, shellSettings, 'night');
|
_setupComboRow(this._shell_night_variant_combo_row, shellThemesStore, shellSettings, 'night');
|
||||||
|
|
||||||
iconSettings.bind('enabled', this._icon_enabled_switch, 'active', Gio.SettingsBindFlags.DEFAULT);
|
iconSettings.bind('enabled', this._icon_row, 'enable-expansion', Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
const iconThemesStore = Gio.ListStore.new(DropDownChoice);
|
const iconThemesStore = Gio.ListStore.new(DropDownChoice);
|
||||||
iconThemesStore.splice(0, 0, Array.from(utils.getInstalledIconThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme })));
|
iconThemesStore.splice(0, 0, Array.from(utils.getInstalledIconThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme })));
|
||||||
_setupComboRow(this._icon_day_variant_combo_row, iconThemesStore, iconSettings, 'day');
|
_setupComboRow(this._icon_day_variant_combo_row, iconThemesStore, iconSettings, 'day');
|
||||||
_setupComboRow(this._icon_night_variant_combo_row, iconThemesStore, iconSettings, 'night');
|
_setupComboRow(this._icon_night_variant_combo_row, iconThemesStore, iconSettings, 'night');
|
||||||
|
|
||||||
cursorSettings.bind('enabled', this._cursor_enabled_switch, 'active', Gio.SettingsBindFlags.DEFAULT);
|
cursorSettings.bind('enabled', this._cursor_row, 'enable-expansion', Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
const cursorThemesStore = Gio.ListStore.new(DropDownChoice);
|
const cursorThemesStore = Gio.ListStore.new(DropDownChoice);
|
||||||
cursorThemesStore.splice(0, 0, Array.from(utils.getInstalledCursorThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme })));
|
cursorThemesStore.splice(0, 0, Array.from(utils.getInstalledCursorThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme })));
|
||||||
|
|||||||
Reference in New Issue
Block a user