🔧 Use libadwaita for the settings dialog
This commit is contained in:
@@ -16,6 +16,14 @@
|
|||||||
const {Gio, Gtk, Gdk, GLib, GObject} = imports.gi;
|
const {Gio, Gtk, Gdk, GLib, GObject} = imports.gi;
|
||||||
const ByteArray = imports.byteArray;
|
const ByteArray = imports.byteArray;
|
||||||
|
|
||||||
|
// libadwaita is available starting with GNOME Shell 42.
|
||||||
|
let Adw = null;
|
||||||
|
try {
|
||||||
|
Adw = imports.gi.Adw;
|
||||||
|
} catch (e) {
|
||||||
|
// Nothing to do.
|
||||||
|
}
|
||||||
|
|
||||||
const _ = imports.gettext.domain('burn-my-windows').gettext;
|
const _ = imports.gettext.domain('burn-my-windows').gettext;
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
@@ -86,26 +94,116 @@ var PreferencesDialog = class PreferencesDialog {
|
|||||||
// Bind general options properties.
|
// Bind general options properties.
|
||||||
this.bindSwitch('destroy-dialogs');
|
this.bindSwitch('destroy-dialogs');
|
||||||
|
|
||||||
// Add all other effect pages.
|
|
||||||
const stack = this._builder.get_object('main-stack');
|
|
||||||
ALL_EFFECTS.forEach(Effect => {
|
|
||||||
const [minMajor, minMinor] = Effect.getMinShellVersion();
|
|
||||||
if (utils.shellVersionIsAtLeast(minMajor, minMinor)) {
|
|
||||||
|
|
||||||
const page = new BurnMyWindowsEffectPage(Effect, this);
|
// Starting with GNOME Shell 42, the settings dialog uses libadwaita. We have to use a
|
||||||
|
// different layout, as the stack sidebar looks pretty ugly with the included
|
||||||
|
// Adw.Clamp...
|
||||||
|
if (utils.shellVersionIsAtLeast(42, 'beta')) {
|
||||||
|
|
||||||
// Add the Effect's preferences (if any).
|
// This is our top-level widget which we will return later.
|
||||||
const preferences = Effect.getPreferences(this);
|
this._widget = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL});
|
||||||
if (preferences) {
|
|
||||||
this.gtkBoxAppend(page, preferences);
|
// Add the general options page to the settings dialog.
|
||||||
|
const generalPrefs = this._builder.get_object('general-prefs');
|
||||||
|
this.gtkBoxAppend(this._widget, generalPrefs);
|
||||||
|
|
||||||
|
// Then add a preferences group with action rows to open the effect subpages.
|
||||||
|
const group = new Adw.PreferencesGroup({title: _('Effect Options')});
|
||||||
|
this.gtkBoxAppend(this._widget, group);
|
||||||
|
|
||||||
|
ALL_EFFECTS.forEach(Effect => {
|
||||||
|
const [minMajor, minMinor] = Effect.getMinShellVersion();
|
||||||
|
if (utils.shellVersionIsAtLeast(minMajor, minMinor)) {
|
||||||
|
|
||||||
|
const row = new Adw.ActionRow({title: Effect.getLabel(), activatable: true});
|
||||||
|
row.add_suffix(new Gtk.Image({icon_name: 'go-next-symbolic'}));
|
||||||
|
|
||||||
|
// Open a subpage with the effect's settings.
|
||||||
|
row.connect('activated', () => {
|
||||||
|
const page = new BurnMyWindowsEffectPage(Effect, this);
|
||||||
|
page.valign = Gtk.Align.CENTER;
|
||||||
|
page.margin_top = 10;
|
||||||
|
page.margin_bottom = 10;
|
||||||
|
page.margin_start = 10;
|
||||||
|
page.margin_end = 10;
|
||||||
|
|
||||||
|
// Add the Effect's preferences (if any).
|
||||||
|
const preferences = Effect.getPreferences(this);
|
||||||
|
if (preferences) {
|
||||||
|
this.gtkBoxAppend(page, preferences);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a button for back navigation.
|
||||||
|
const backButton = new Gtk.Button({
|
||||||
|
halign: Gtk.Align.CENTER,
|
||||||
|
label: _('Go Back'),
|
||||||
|
});
|
||||||
|
backButton.add_css_class('suggested-action');
|
||||||
|
backButton.add_css_class('pill-button');
|
||||||
|
backButton.connect('clicked', () => {
|
||||||
|
row.get_root().close_subpage();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.gtkBoxAppend(page, backButton);
|
||||||
|
|
||||||
|
// Wrap the preferences group in an Adw.Clamp.
|
||||||
|
const clamp = new Adw.Clamp({
|
||||||
|
child: page,
|
||||||
|
maximum_size: 600,
|
||||||
|
tightening_threshold: 400,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Open the subpage on click.
|
||||||
|
row.get_root().present_subpage(clamp);
|
||||||
|
});
|
||||||
|
|
||||||
|
group.add(row);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
stack.add_titled(page, Effect.getNick(), Effect.getLabel());
|
}
|
||||||
}
|
// On older GNOME versions, we use a StackSidebar.
|
||||||
});
|
else {
|
||||||
|
|
||||||
// This is our top-level widget which we will return later.
|
// This is our top-level widget which we will return later.
|
||||||
this._widget = this._builder.get_object('settings-widget');
|
this._widget = new Gtk.Box({
|
||||||
|
orientation: Gtk.Orientation.HORIZONTAL,
|
||||||
|
margin_start: 50,
|
||||||
|
margin_end: 50,
|
||||||
|
});
|
||||||
|
|
||||||
|
const stack = new Gtk.Stack({
|
||||||
|
transition_type: Gtk.StackTransitionType.SLIDE_UP_DOWN,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add the general options page.
|
||||||
|
stack.add_titled(
|
||||||
|
this._builder.get_object('general-prefs'), 'general', _('General Options'));
|
||||||
|
|
||||||
|
this.gtkBoxAppend(this._widget, new Gtk.StackSidebar({stack: stack}));
|
||||||
|
this.gtkBoxAppend(this._widget, stack);
|
||||||
|
|
||||||
|
// Add all other effect pages.
|
||||||
|
ALL_EFFECTS.forEach(Effect => {
|
||||||
|
const [minMajor, minMinor] = Effect.getMinShellVersion();
|
||||||
|
if (utils.shellVersionIsAtLeast(minMajor, minMinor)) {
|
||||||
|
|
||||||
|
const page = new BurnMyWindowsEffectPage(Effect, this);
|
||||||
|
page.margin_start = 60;
|
||||||
|
page.margin_end = 60;
|
||||||
|
page.margin_top = 60;
|
||||||
|
page.margin_bottom = 60;
|
||||||
|
|
||||||
|
// Add the Effect's preferences (if any).
|
||||||
|
const preferences = Effect.getPreferences(this);
|
||||||
|
if (preferences) {
|
||||||
|
this.gtkBoxAppend(page, preferences);
|
||||||
|
}
|
||||||
|
|
||||||
|
stack.add_titled(page, Effect.getNick(), Effect.getLabel());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Some things can only be done once the widget is shown as we do not have access to
|
// Some things can only be done once the widget is shown as we do not have access to
|
||||||
// the toplevel widget before.
|
// the toplevel widget before.
|
||||||
@@ -119,7 +217,18 @@ var PreferencesDialog = class PreferencesDialog {
|
|||||||
{
|
{
|
||||||
// Add the menu button to the title bar.
|
// Add the menu button to the title bar.
|
||||||
const menu = this._builder.get_object('menu-button');
|
const menu = this._builder.get_object('menu-button');
|
||||||
window.get_titlebar().pack_end(menu);
|
|
||||||
|
// Starting with GNOME Shell 42, we have to hack our way through the widget tree
|
||||||
|
// of the Adw.PreferencesWindow...
|
||||||
|
if (utils.shellVersionIsAtLeast(42, 'beta')) {
|
||||||
|
const header = this._findWidgetByType(window.get_content(), Adw.HeaderBar);
|
||||||
|
header.pack_end(menu);
|
||||||
|
|
||||||
|
// Allow closing of the sub pages.
|
||||||
|
window.can_navigate_back = true;
|
||||||
|
} else {
|
||||||
|
window.get_titlebar().pack_end(menu);
|
||||||
|
}
|
||||||
|
|
||||||
// Populate the menu with actions.
|
// Populate the menu with actions.
|
||||||
const group = Gio.SimpleActionGroup.new();
|
const group = Gio.SimpleActionGroup.new();
|
||||||
@@ -353,6 +462,19 @@ var PreferencesDialog = class PreferencesDialog {
|
|||||||
return JSON.parse(string);
|
return JSON.parse(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This traverses the widget tree below the given parent recursively and returns the
|
||||||
|
// first widget of the given type.
|
||||||
|
_findWidgetByType(parent, type) {
|
||||||
|
for (const child of [...parent]) {
|
||||||
|
if (child instanceof type) return child;
|
||||||
|
|
||||||
|
const match = this._findWidgetByType(child, type);
|
||||||
|
if (match) return match;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// Initializes template widgets used by the preferences dialog.
|
// Initializes template widgets used by the preferences dialog.
|
||||||
_registerCustomClasses() {
|
_registerCustomClasses() {
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
|
|
||||||
<template class="BurnMyWindowsEffectPage" parent="GtkBox">
|
<template class="BurnMyWindowsEffectPage" parent="GtkBox">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="margin-top">60</property>
|
|
||||||
<property name="margin-bottom">60</property>
|
|
||||||
<property name="margin-start">60</property>
|
|
||||||
<property name="margin-end">60</property>
|
|
||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<property name="spacing">10</property>
|
<property name="spacing">10</property>
|
||||||
|
|
||||||
@@ -44,8 +40,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action" />
|
|
||||||
<class name="pill-button" />
|
<class name="pill-button" />
|
||||||
|
<class name="flat" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
+176
-203
@@ -17,247 +17,220 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
||||||
<object class="GtkBox" id="settings-widget">
|
<object class="GtkBox" id="general-prefs">
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="margin-top">30</property>
|
||||||
|
<property name="margin-bottom">30</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStackSidebar">
|
<object class="GtkImage">
|
||||||
<property name="stack">main-stack</property>
|
<property name="valign">center</property>
|
||||||
|
<property name="icon-name">burn-my-windows-symbolic</property>
|
||||||
|
<property name="pixel_size">128</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStack" id="main-stack">
|
<object class="GtkLabel">
|
||||||
<property name="transition-type">slide-up-down</property>
|
<property name="label" translatable="yes">Welcome to Burn-My-Windows!</property>
|
||||||
<property name="hexpand">1</property>
|
<property name="margin-top">8</property>
|
||||||
|
<property name="margin-bottom">6</property>
|
||||||
|
<style>
|
||||||
|
<class name="large-title" />
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">If you like this extension, recommend it to your friends :)</property>
|
||||||
|
<property name="margin-bottom">36</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame">
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="general-prefs">
|
<object class="GtkListBox">
|
||||||
<property name="orientation">vertical</property>
|
<property name="selection-mode">none</property>
|
||||||
<property name="margin-start">60</property>
|
|
||||||
<property name="margin-end">60</property>
|
|
||||||
<property name="margin-top">30</property>
|
|
||||||
<property name="margin-bottom">30</property>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage">
|
<object class="GtkListBoxRow">
|
||||||
<property name="valign">center</property>
|
<property name="margin-start">10</property>
|
||||||
<property name="icon-name">burn-my-windows-symbolic</property>
|
<property name="margin-end">10</property>
|
||||||
<property name="pixel_size">128</property>
|
<property name="margin-top">10</property>
|
||||||
</object>
|
<property name="margin-bottom">10</property>
|
||||||
</child>
|
<property name="activatable">0</property>
|
||||||
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Welcome to Burn-My-Windows!</property>
|
|
||||||
<property name="margin-top">8</property>
|
|
||||||
<property name="margin-bottom">6</property>
|
|
||||||
<style>
|
|
||||||
<class name="large-title" />
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">If you like this extension, recommend it to your friends :)</property>
|
|
||||||
<property name="margin-bottom">36</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<object class="GtkFrame">
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox">
|
<object class="GtkBox">
|
||||||
<property name="selection-mode">none</property>
|
<property name="spacing">8</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBoxRow">
|
<object class="GtkBox">
|
||||||
<property name="margin-start">10</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="margin-end">10</property>
|
<property name="spacing">3</property>
|
||||||
<property name="margin-top">10</property>
|
|
||||||
<property name="margin-bottom">10</property>
|
|
||||||
<property name="activatable">0</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkLabel">
|
||||||
<property name="spacing">8</property>
|
<property name="label" translatable="yes">Open Window Animation</property>
|
||||||
<child>
|
<property name="xalign">0</property>
|
||||||
<object class="GtkBox">
|
<property name="halign">start</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="valign">center</property>
|
||||||
<property name="spacing">3</property>
|
<property name="hexpand">1</property>
|
||||||
<child>
|
</object>
|
||||||
<object class="GtkLabel">
|
</child>
|
||||||
<property name="label" translatable="yes">Open Window Animation</property>
|
<child>
|
||||||
<property name="xalign">0</property>
|
<object class="GtkLabel">
|
||||||
<property name="halign">start</property>
|
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
|
||||||
<property name="valign">center</property>
|
<property name="xalign">0</property>
|
||||||
<property name="hexpand">1</property>
|
<property name="halign">start</property>
|
||||||
</object>
|
<property name="valign">center</property>
|
||||||
</child>
|
<property name="hexpand">1</property>
|
||||||
<child>
|
<style>
|
||||||
<object class="GtkLabel">
|
<class name="dim-label" />
|
||||||
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
|
<class name="caption" />
|
||||||
<property name="xalign">0</property>
|
</style>
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<style>
|
|
||||||
<class name="dim-label" />
|
|
||||||
<class name="caption" />
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkMenuButton" id="open-effect-button">
|
|
||||||
<property name="menu-model">open-effect-menu</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox">
|
|
||||||
<property name="spacing">8</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Choose Effects</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<property name="icon-name">pan-down-symbolic</property>
|
|
||||||
<property name="icon-size">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBoxRow">
|
<object class="GtkMenuButton" id="open-effect-button">
|
||||||
<property name="margin-start">10</property>
|
<property name="menu-model">open-effect-menu</property>
|
||||||
<property name="margin-end">10</property>
|
|
||||||
<property name="margin-top">10</property>
|
|
||||||
<property name="margin-bottom">10</property>
|
|
||||||
<property name="activatable">0</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox">
|
|
||||||
<property name="spacing">8</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox">
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">3</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Close Window Animation</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<style>
|
|
||||||
<class name="dim-label" />
|
|
||||||
<class name="caption" />
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkMenuButton" id="close-effect-button">
|
|
||||||
<property name="menu-model">close-effect-menu</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox">
|
|
||||||
<property name="spacing">8</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Choose Effects</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<property name="icon-name">pan-down-symbolic</property>
|
|
||||||
<property name="icon-size">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<object class="GtkListBoxRow">
|
|
||||||
<property name="margin-start">10</property>
|
|
||||||
<property name="margin-end">10</property>
|
|
||||||
<property name="margin-top">10</property>
|
|
||||||
<property name="margin-bottom">10</property>
|
|
||||||
<property name="activatable">0</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="spacing">8</property>
|
<property name="spacing">8</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Also Add Effects to Dialogs</property>
|
<property name="label" translatable="yes">Choose Effects</property>
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSwitch" id="destroy-dialogs">
|
<object class="GtkImage">
|
||||||
<property name="halign">end</property>
|
<property name="icon-name">pan-down-symbolic</property>
|
||||||
<property name="valign">center</property>
|
<property name="icon-size">1</property>
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="reset-destroy-dialogs">
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<property name="icon-name">edit-clear-symbolic</property>
|
|
||||||
<property name="icon-size">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
|
||||||
<style>
|
|
||||||
<class name="flat" />
|
|
||||||
</style>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBoxRow">
|
||||||
|
<property name="margin-start">10</property>
|
||||||
|
<property name="margin-end">10</property>
|
||||||
|
<property name="margin-top">10</property>
|
||||||
|
<property name="margin-bottom">10</property>
|
||||||
|
<property name="activatable">0</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="spacing">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">3</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Close Window Animation</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">1</property>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label" />
|
||||||
|
<class name="caption" />
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkMenuButton" id="close-effect-button">
|
||||||
|
<property name="menu-model">close-effect-menu</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="spacing">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Choose Effects</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="icon-name">pan-down-symbolic</property>
|
||||||
|
<property name="icon-size">1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBoxRow">
|
||||||
|
<property name="margin-start">10</property>
|
||||||
|
<property name="margin-end">10</property>
|
||||||
|
<property name="margin-top">10</property>
|
||||||
|
<property name="margin-bottom">10</property>
|
||||||
|
<property name="activatable">0</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="spacing">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Also Add Effects to Dialogs</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSwitch" id="destroy-dialogs">
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="reset-destroy-dialogs">
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="icon-name">edit-clear-symbolic</property>
|
||||||
|
<property name="icon-size">1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||||
|
<style>
|
||||||
|
<class name="flat" />
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="name">general</property>
|
|
||||||
<property name="title" translatable="yes">General Options</property>
|
|
||||||
</packing>
|
|
||||||
|
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<!-- Stack pages are inserted here -->
|
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
||||||
|
|
||||||
</interface>
|
</interface>
|
||||||
@@ -4,10 +4,6 @@
|
|||||||
|
|
||||||
<template class="BurnMyWindowsEffectPage" parent="GtkBox">
|
<template class="BurnMyWindowsEffectPage" parent="GtkBox">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="margin-top">60</property>
|
|
||||||
<property name="margin-bottom">60</property>
|
|
||||||
<property name="margin-start">60</property>
|
|
||||||
<property name="margin-end">60</property>
|
|
||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<property name="spacing">10</property>
|
<property name="spacing">10</property>
|
||||||
|
|
||||||
@@ -44,8 +40,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action" />
|
|
||||||
<class name="pill-button" />
|
<class name="pill-button" />
|
||||||
|
<class name="flat" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
+144
-172
@@ -10,203 +10,175 @@
|
|||||||
<property name="icon-name">open-menu-symbolic</property>
|
<property name="icon-name">open-menu-symbolic</property>
|
||||||
</object>
|
</object>
|
||||||
|
|
||||||
<object class="GtkBox" id="settings-widget">
|
<object class="GtkBox" id="general-prefs">
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="margin-top">60</property>
|
||||||
|
<property name="margin-bottom">60</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStackSidebar">
|
<object class="GtkImage">
|
||||||
<property name="stack">main-stack</property>
|
<property name="valign">center</property>
|
||||||
|
<property name="icon-name">burn-my-windows-symbolic</property>
|
||||||
|
<property name="pixel_size">128</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStack" id="main-stack">
|
<object class="GtkLabel">
|
||||||
<property name="transition-type">slide-up-down</property>
|
<property name="label" translatable="yes">Welcome to Burn-My-Windows!</property>
|
||||||
<property name="hexpand">1</property>
|
<property name="margin-top">8</property>
|
||||||
|
<property name="margin-bottom">6</property>
|
||||||
|
<style>
|
||||||
|
<class name="large-title" />
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">If you like this extension, recommend it to your friends :)</property>
|
||||||
|
<property name="margin-bottom">36</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame">
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStackPage">
|
<object class="GtkListBox">
|
||||||
<property name="name">general</property>
|
<property name="selection-mode">none</property>
|
||||||
<property name="title" translatable="yes">General Options</property>
|
<property name="show-separators">1</property>
|
||||||
|
<style>
|
||||||
|
<class name="rich-list" />
|
||||||
|
</style>
|
||||||
|
|
||||||
<property name="child">
|
|
||||||
<object class="GtkBox" id="general-prefs">
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="margin-start">60</property>
|
|
||||||
<property name="margin-end">60</property>
|
|
||||||
<property name="margin-top">60</property>
|
|
||||||
<property name="margin-bottom">60</property>
|
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBoxRow">
|
||||||
|
<property name="activatable">0</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage">
|
<object class="GtkBox">
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="icon-name">burn-my-windows-symbolic</property>
|
|
||||||
<property name="pixel_size">128</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Welcome to Burn-My-Windows!</property>
|
|
||||||
<property name="margin-top">8</property>
|
|
||||||
<property name="margin-bottom">6</property>
|
|
||||||
<style>
|
|
||||||
<class name="large-title" />
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">If you like this extension, recommend it to your friends :)</property>
|
|
||||||
<property name="margin-bottom">36</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<object class="GtkFrame">
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox">
|
<object class="GtkBox">
|
||||||
<property name="selection-mode">none</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="show-separators">1</property>
|
<property name="spacing">3</property>
|
||||||
<style>
|
|
||||||
<class name="rich-list" />
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBoxRow">
|
<object class="GtkLabel">
|
||||||
<property name="activatable">0</property>
|
<property name="label" translatable="yes">Open Window Animation</property>
|
||||||
<child>
|
<property name="xalign">0</property>
|
||||||
<object class="GtkBox">
|
<property name="halign">start</property>
|
||||||
<child>
|
<property name="valign">center</property>
|
||||||
<object class="GtkBox">
|
<property name="hexpand">1</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">3</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Open Window Animation</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<style>
|
|
||||||
<class name="dim-label" />
|
|
||||||
<class name="caption" />
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkMenuButton" id="open-effect-button">
|
|
||||||
<property name="label" translatable="yes">Choose Effects</property>
|
|
||||||
<property name="menu-model">open-effect-menu</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBoxRow">
|
<object class="GtkLabel">
|
||||||
<property name="activatable">0</property>
|
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
|
||||||
<child>
|
<property name="xalign">0</property>
|
||||||
<object class="GtkBox">
|
<property name="halign">start</property>
|
||||||
<child>
|
<property name="valign">center</property>
|
||||||
<object class="GtkBox">
|
<property name="hexpand">1</property>
|
||||||
<property name="orientation">vertical</property>
|
<style>
|
||||||
<property name="spacing">3</property>
|
<class name="dim-label" />
|
||||||
<child>
|
<class name="caption" />
|
||||||
<object class="GtkLabel">
|
</style>
|
||||||
<property name="label" translatable="yes">Close Window Animation</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<style>
|
|
||||||
<class name="dim-label" />
|
|
||||||
<class name="caption" />
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkMenuButton" id="close-effect-button">
|
|
||||||
<property name="label" translatable="yes">Choose Effects</property>
|
|
||||||
<property name="menu-model">close-effect-menu</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
</object>
|
||||||
<child>
|
</child>
|
||||||
<object class="GtkListBoxRow">
|
<child>
|
||||||
<property name="activatable">0</property>
|
<object class="GtkMenuButton" id="open-effect-button">
|
||||||
<child>
|
<property name="label" translatable="yes">Choose Effects</property>
|
||||||
<object class="GtkBox">
|
<property name="menu-model">open-effect-menu</property>
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Also Add Effects to Dialogs</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSwitch" id="destroy-dialogs">
|
|
||||||
<property name="halign">end</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="reset-destroy-dialogs">
|
|
||||||
<property name="icon-name">edit-clear-symbolic</property>
|
|
||||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
|
||||||
<style>
|
|
||||||
<class name="flat" />
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBoxRow">
|
||||||
|
<property name="activatable">0</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">3</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Close Window Animation</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">1</property>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label" />
|
||||||
|
<class name="caption" />
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkMenuButton" id="close-effect-button">
|
||||||
|
<property name="label" translatable="yes">Choose Effects</property>
|
||||||
|
<property name="menu-model">close-effect-menu</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBoxRow">
|
||||||
|
<property name="activatable">0</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Also Add Effects to Dialogs</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSwitch" id="destroy-dialogs">
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="reset-destroy-dialogs">
|
||||||
|
<property name="icon-name">edit-clear-symbolic</property>
|
||||||
|
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||||
|
<style>
|
||||||
|
<class name="flat" />
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<!-- Stack pages are inserted here -->
|
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
|
|
||||||
</interface>
|
</interface>
|
||||||
+1
-1
@@ -124,7 +124,7 @@ var Fire = class Fire {
|
|||||||
|
|
||||||
// This populates the preset dropdown menu for the fire options.
|
// This populates the preset dropdown menu for the fire options.
|
||||||
static _createFirePresets(dialog) {
|
static _createFirePresets(dialog) {
|
||||||
dialog.getBuilder().get_object('settings-widget').connect('realize', (widget) => {
|
dialog.getBuilder().get_object('fire-prefs').connect('realize', (widget) => {
|
||||||
const presets = [
|
const presets = [
|
||||||
{
|
{
|
||||||
name: _('Default Fire'),
|
name: _('Default Fire'),
|
||||||
|
|||||||
Reference in New Issue
Block a user