mirror of
https://github.com/nix-community/plasma-manager.git
synced 2024-09-11 09:55:26 +03:00
Fix bug causing error if icons.spacing isn't specified (#206)
This commit is contained in:
parent
d48204d2be
commit
8d48bb7ba1
@ -26,15 +26,17 @@ in
|
||||
Could be an integer unit, or "small" (1 unit), "medium" (2 units) or "large" (6 units).
|
||||
'';
|
||||
apply = spacing:
|
||||
if builtins.isInt spacing then
|
||||
toString spacing
|
||||
(if (spacing == null) then null
|
||||
else
|
||||
builtins.elemAt [ "1" "2" "6" ] (
|
||||
lib.lists.findFirstIndex
|
||||
(x: x == spacing)
|
||||
(throw "systemTray: nonexistent spacing ${spacing}! This is a bug!")
|
||||
enum
|
||||
);
|
||||
(if builtins.isInt spacing then
|
||||
toString spacing
|
||||
else
|
||||
builtins.elemAt [ "1" "2" "6" ] (
|
||||
lib.lists.findFirstIndex
|
||||
(x: x == spacing)
|
||||
(throw "systemTray: nonexistent spacing ${spacing}! This is a bug!")
|
||||
enum
|
||||
)));
|
||||
};
|
||||
scaleToFit = mkBoolOption ''
|
||||
Whether to automatically scale System Tray icons to fix the available thickness of the panel.
|
||||
|
Loading…
Reference in New Issue
Block a user