Skip to content

Commit

Permalink
Version 13 for GNOME 47
Browse files Browse the repository at this point in the history
  • Loading branch information
aunetx committed Sep 18, 2024
1 parent 84ce0a7 commit 01d42cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"uuid": "panel-corners@aunetx",
"settings-schema": "org.gnome.shell.extensions.panel-corners",
"shell-version": [
"46"
"46",
"47"
],
"version": 12
"version": 13
}
9 changes: 7 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Clutter from 'gi://Clutter';
import St from 'gi://St';
import Cogl from 'gi://Cogl';

export function lookup_for_length(node, prop, settings) {
const use_extension_values = node && settings.FORCE_EXTENSION_VALUES.get();
Expand Down Expand Up @@ -42,15 +43,19 @@ export function lookup_for_color(node, prop, settings) {

if (use_extension_values || !lookup[0]) {
let color_str = settings.get_property(prop.slice(1)).get();
let color_parsed = Clutter.color_from_string(color_str);
let color_parsed = Clutter.Color ?
Clutter.color_from_string(color_str) :
Cogl.color_from_string(color_str);

if (color_parsed[0]) {
return color_parsed[1];
} else {
// could not parse color, defaulting to black
settings.get_property(prop.slice(1)).set('#000000ff');

return Clutter.color_from_string('#000000ff')[1];
return Clutter.Color ?
Clutter.color_from_string('#000000ff')[1] :
Cogl.color_from_string('#000000ff')[1];
}
} else {
return lookup[1];
Expand Down

0 comments on commit 01d42cc

Please sign in to comment.