mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
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:
@@ -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({
|
||||
|
Reference in New Issue
Block a user