Skip to content

Commit

Permalink
Merge pull request #623 from mjakeman/preferences-widgets
Browse files Browse the repository at this point in the history
installed-page: Use AdwPreferences* widgets
  • Loading branch information
mjakeman authored Apr 21, 2024
2 parents 237e1b8 + 69483f7 commit 8949e5b
Showing 1 changed file with 104 additions and 114 deletions.
218 changes: 104 additions & 114 deletions src/exm-installed-page.blp
Original file line number Diff line number Diff line change
@@ -1,118 +1,108 @@
using Gtk 4.0;
using Adw 1;

template $ExmInstalledPage : Gtk.Widget {
notify::manager => $on_bind_manager();

Gtk.Box {
orientation: vertical;

Gtk.ScrolledWindow {
vexpand: true;

Gtk.Box {
orientation: vertical;

Adw.Clamp {
Gtk.Box {
styles ["content"]
orientation: vertical;
spacing: 10;

Gtk.ListBox {
styles ["boxed-list"]
valign: start;
selection-mode: none;

Adw.SwitchRow global_toggle {
[prefix]
Gtk.Image {
icon-name: 'puzzle-piece-symbolic';
}

title: _("Use Extensions");
subtitle: _("Extensions can cause performance and stability issues.");
}
}

Gtk.Label {
styles ["heading"]
xalign: 0;
margin-top: 20;
label: _("User-Installed Extensions");
}

Gtk.ListBox user_list_box {
styles ["boxed-list", "boxed-list-placeholder"]
valign: start;
selection-mode: none;
}

Gtk.Label {
styles ["heading"]
xalign: 0;
margin-top: 20;
label: _("System Extensions");
}

Gtk.ListBox system_list_box {
styles ["boxed-list", "boxed-list-placeholder"]
valign: start;
selection-mode: none;
}
}
}
}
}

Gtk.Revealer updates_action_bar {
reveal-child: false;
transition-type: slide_up;

Gtk.Box {
styles ["actionbar", "update-bar"]
spacing: 12;

Gtk.Image update_icon {
styles ["update"]

icon-name: "software-update-available-symbolic";
pixel-size: 24;

valign: center;
halign: center;
}

Gtk.Box {
orientation: vertical;
valign: center;
hexpand: true;

Gtk.Label {
styles ["heading"]

xalign: 0;
label: _("Updates are available");
ellipsize: end;
}

Gtk.Label num_updates_label {
xalign: 0;
ellipsize: end;
}
}

[end]
Gtk.Button {
styles ["suggested-action"]

valign: center;
halign: center;

label: _("Log Out");
action-name: "app.logout";
}
}
}
}
template $ExmInstalledPage: Gtk.Widget {
notify::manager => $on_bind_manager();

Gtk.Box {
orientation: vertical;

Adw.PreferencesPage {
Adw.PreferencesGroup {
Adw.SwitchRow global_toggle {
[prefix]
Gtk.Image {
icon-name: 'puzzle-piece-symbolic';
}

title: _("Use Extensions");
subtitle: _("Extensions can cause performance and stability issues.");
}
}

Adw.PreferencesGroup {
title: _("User-Installed Extensions");

Gtk.ListBox user_list_box {
styles [
"boxed-list",
"boxed-list-placeholder"
]

selection-mode: none;
}
}

Adw.PreferencesGroup {
title: _("System Extensions");

Gtk.ListBox system_list_box {
styles [
"boxed-list",
"boxed-list-placeholder"
]

selection-mode: none;
}
}
}

Gtk.Revealer updates_action_bar {
reveal-child: false;
transition-type: slide_up;

Gtk.Box {
styles [
"actionbar",
"update-bar"
]

spacing: 12;

Gtk.Image update_icon {
styles [
"update"
]

icon-name: "software-update-available-symbolic";
pixel-size: 24;
valign: center;
halign: center;
}

Gtk.Box {
orientation: vertical;
valign: center;
hexpand: true;

Gtk.Label {
styles [
"heading"
]

xalign: 0;
label: _("Updates are available");
ellipsize: end;
}

Gtk.Label num_updates_label {
xalign: 0;
ellipsize: end;
}
}

[end]
Gtk.Button {
styles [
"suggested-action"
]

valign: center;
halign: center;
label: _("Log Out");
action-name: "app.logout";
}
}
}
}
}

0 comments on commit 8949e5b

Please sign in to comment.