refactor: extract PowerProfileService singleton; reducedMotion auto-enables on power-saver profile
This commit is contained in:
parent
c96b023fbe
commit
dd5ca9d263
4 changed files with 63 additions and 51 deletions
|
|
@ -35,7 +35,8 @@ QtObject {
|
|||
property int groupSpacing: 6
|
||||
property int radius: 4
|
||||
property int screenRadius: 15
|
||||
property bool reducedMotion: false
|
||||
property bool _reducedMotionConfig: false
|
||||
readonly property bool reducedMotion: _reducedMotionConfig || PowerProfileService.powerSaver
|
||||
|
||||
property FileView _themeFile: FileView {
|
||||
path: (Quickshell.env("XDG_CONFIG_HOME") || (Quickshell.env("HOME") + "/.config")) + "/nova-shell/theme.json"
|
||||
|
|
@ -77,6 +78,6 @@ QtObject {
|
|||
if (data.screenRadius !== undefined)
|
||||
root.screenRadius = data.screenRadius;
|
||||
if (data.reducedMotion !== undefined)
|
||||
root.reducedMotion = data.reducedMotion;
|
||||
root._reducedMotionConfig = data.reducedMotion;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue