forked from pop-os/cosmic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prefs.js
36 lines (30 loc) · 995 Bytes
/
prefs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const Gdk = imports.gi.Gdk;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
function open_panel() {
const appinfo = Gio.DesktopAppInfo.new("gnome-background-panel.desktop");
const launch_ctx = Gdk.Display.get_default().get_app_launch_context();
appinfo.launch([], launch_ctx);
}
function init() {
}
function buildPrefsWidget() {
const label = new Gtk.Label({
label: "Configuration for the dock, the top bar, the workspaces overview, and\nother COSMIC components is available in the Settings application.",
justify: Gtk.Justification.CENTER,
});
const button = new Gtk.Button({
label: "Configure in Settings",
halign: Gtk.Align.CENTER,
});
button.connect("clicked", open_panel);
const box = new Gtk.Box({
orientation: Gtk.Orientation.VERTICAL,
spacing: 18,
halign: Gtk.Align.CENTER,
valign: Gtk.Align.CENTER,
});
box.append(label);
box.append(button);
return box;
}