Performance: add option to disable window shadows

Rendering window shadows in GTK4 doubles GPU usage. This commit adds an option to disable them for performance gain (useful on low-end devices).
This commit is contained in:
Rafostar
2020-11-13 19:26:49 +01:00
parent 4413fdb8a2
commit f660d900ba
8 changed files with 68 additions and 13 deletions

View File

@@ -6,6 +6,7 @@ const Menu = imports.clapper_src.menu;
const Misc = imports.clapper_src.misc;
let { debug } = Debug;
let { settings } = Misc;
var App = GObject.registerClass(
class ClapperApp extends Gtk.Application
@@ -30,6 +31,11 @@ class ClapperApp extends Gtk.Application
application: this,
title: Misc.appName,
});
window.isClapperApp = true;
window.add_css_class('nobackground');
if(!settings.get_boolean('render-shadows'))
window.add_css_class('gpufriendly');
for(let action in Menu.actions) {
let simpleAction = new Gio.SimpleAction({