Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"3.32",
"3.34",
"3.36",
"3.38"
"3.38",
"40",
"42"
],
"url": "https://github.com/emasab/shelltile",
"uuid": "ShellTile@emasab.it"
Expand Down
20 changes: 16 additions & 4 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const ExtensionUtils = imports.misc.extensionUtils;
const Gettext = imports.gettext.domain('shelltile');
const _ = Gettext.gettext;

const Config = imports.misc.config;

const shellMajorVersion = parseInt(Config.PACKAGE_VERSION.split('.')[0]);

function init(){
}

Expand Down Expand Up @@ -85,10 +89,18 @@ function buildPrefsWidget(){
}
};

let frame = new Gtk.Box({
orientation: Gtk.Orientation.VERTICAL,
border_width: 10
});
const options = {}
if (shellMajorVersion < 40) {
options.orientation = Gtk.Orientation.VERTICAL;
options.border_width = 10;
} else {
options.margin_top = 10;
options.margin_bottom = 10;
options.margin_start = 10;
options.margin_end = 10;
}
let frame = new Gtk.Box(options);

let vbox = new Gtk.Box({
orientation: Gtk.Orientation.VERTICAL,
margin: 20,
Expand Down