mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 15:19:09 +00:00
Update: Improve drag handle styling by using GNOME Settings style
This also finally makes the style `<class name="drag-handle"/>` in `prefs-box-order-item-row.ui` actually do something.
This commit is contained in:
parent
fa379607ee
commit
5c8523322b
9
data/css/prefs.css
Normal file
9
data/css/prefs.css
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/* Taken from: https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/43.5/shell/style.css */
|
||||||
|
|
||||||
|
.drag-handle {
|
||||||
|
color: alpha(@theme_fg_color, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drag-handle:backdrop {
|
||||||
|
color: alpha(@theme_unfocused_fg_color, 0.4);
|
||||||
|
}
|
||||||
@ -9,4 +9,5 @@ gnome-extensions pack "$REAL_BASE_DIR/src" \
|
|||||||
--extra-source extensionModules \
|
--extra-source extensionModules \
|
||||||
--extra-source prefsModules \
|
--extra-source prefsModules \
|
||||||
--extra-source ../data/ui \
|
--extra-source ../data/ui \
|
||||||
|
--extra-source ../data/css \
|
||||||
--schema ../data/org.gnome.shell.extensions.top-bar-organizer.gschema.xml
|
--schema ../data/org.gnome.shell.extensions.top-bar-organizer.gschema.xml
|
||||||
|
|||||||
11
src/prefs.js
11
src/prefs.js
@ -1,11 +1,22 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/* exported buildPrefsWidget, init */
|
/* exported buildPrefsWidget, init */
|
||||||
|
|
||||||
|
const Gtk = imports.gi.Gtk;
|
||||||
|
const Gdk = imports.gi.Gdk;
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
const Me = ExtensionUtils.getCurrentExtension();
|
const Me = ExtensionUtils.getCurrentExtension();
|
||||||
|
|
||||||
const PrefsPage = Me.imports.prefsModules.PrefsPage;
|
const PrefsPage = Me.imports.prefsModules.PrefsPage;
|
||||||
|
|
||||||
|
const provider = new Gtk.CssProvider();
|
||||||
|
provider.load_from_path(Me.dir.get_path() + "/css/prefs.css");
|
||||||
|
Gtk.StyleContext.add_provider_for_display(
|
||||||
|
Gdk.Display.get_default(),
|
||||||
|
provider,
|
||||||
|
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
|
||||||
|
);
|
||||||
|
|
||||||
function buildPrefsWidget() {
|
function buildPrefsWidget() {
|
||||||
return new PrefsPage.PrefsPage();
|
return new PrefsPage.PrefsPage();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user