extensions-app: Use AdwApplication

Initialize libadwaita, which loads the libadwaita stylesheet
and allow following the dark style preference of the system.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1997>
This commit is contained in:
Romain Vigier 2021-10-04 15:18:51 +02:00
parent ab52ce4591
commit 891978b4eb
3 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="ExtensionRow" parent="GtkListBoxRow">
<property name="activatable">False</property>
<child>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.20"/>
<menu id="primary-menu">
<section>
<item>

View File

@ -4,7 +4,7 @@ imports.gi.versions.Gtk = '4.0';
const Gettext = imports.gettext;
const Package = imports.package;
const { Gdk, GLib, Gio, GObject, Gtk, Shew } = imports.gi;
const { Adw, Gdk, GLib, Gio, GObject, Gtk, Shew } = imports.gi;
Package.initFormat();
@ -38,7 +38,7 @@ function toggleState(action) {
}
var Application = GObject.registerClass(
class Application extends Gtk.Application {
class Application extends Adw.Application {
_init() {
GLib.set_prgname('gnome-extensions-app');
super._init({ application_id: Package.name });