gnome 46, version 11

This commit is contained in:
JerryXiao 2024-03-24 11:22:03 +08:00
parent 7f394453c8
commit 10e560b5db
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5
2 changed files with 7 additions and 5 deletions

View file

@ -44,8 +44,9 @@ export default class ActivateGnomeExtension extends Extension {
let label_2 = new St.Label({style_class: 'label-2', text: text2, opacity}) let label_2 = new St.Label({style_class: 'label-2', text: text2, opacity})
label_1.set_style(`font-size: ${size1}px`) label_1.set_style(`font-size: ${size1}px`)
label_2.set_style(`font-size: ${size2}px`) label_2.set_style(`font-size: ${size2}px`)
Main.layoutManager.uiGroup.add_actor(label_2, {"trackFullscreen": false}) let params = {"trackFullscreen": false, "affectsStruts": false, "affectsInputRegion": true}
Main.layoutManager.uiGroup.add_actor(label_1, {"trackFullscreen": false}) Main.layoutManager.addTopChrome(label_2, params)
Main.layoutManager.addTopChrome(label_1, params)
this.labels.push(label_1) this.labels.push(label_1)
this.labels.push(label_2) this.labels.push(label_2)
let h = Math.max(0, Math.floor(monitor.height * vl2 - label_2.height)) let h = Math.max(0, Math.floor(monitor.height * vl2 - label_2.height))
@ -57,7 +58,7 @@ export default class ActivateGnomeExtension extends Extension {
cleanup() { cleanup() {
for (let label of this.labels) { for (let label of this.labels) {
Main.layoutManager.uiGroup.remove_actor(label) Main.layoutManager.removeChrome(label)
label.destroy() label.destroy()
} }
this.labels = [] this.labels = []

View file

@ -4,8 +4,9 @@
"uuid": "activate_gnome@isjerryxiao", "uuid": "activate_gnome@isjerryxiao",
"settings-schema": "org.gnome.shell.extensions.activate_gnome", "settings-schema": "org.gnome.shell.extensions.activate_gnome",
"shell-version": [ "shell-version": [
"45" "45",
"46"
], ],
"version": 10, "version": 11,
"url": "https://github.com/isjerryxiao/gnome-shell-extension-activate-gnome" "url": "https://github.com/isjerryxiao/gnome-shell-extension-activate-gnome"
} }