faq: add icon fallback
This commit is contained in:
parent
f0e3b46627
commit
0fbc2f5584
1 changed files with 18 additions and 0 deletions
|
@ -52,6 +52,24 @@ inside of them.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Get rid of the purple/black icons
|
||||||
|
The @@Quickshell.Quickshell.iconPath() function has three variants:
|
||||||
|
- One draws a purple/black square if the icon is missing.
|
||||||
|
- One allows you to specify a fallback icon if the desired one is missing.
|
||||||
|
- One returns an empty string if the icon is missing.
|
||||||
|
|
||||||
|
Either of the last two variants can be used to avoid the purple/black square.
|
||||||
|
|
||||||
|
Note that you can change out a loader's component conditionally:
|
||||||
|
```qml
|
||||||
|
@@QtQuick.Loader {
|
||||||
|
readonly property Component thing1: ...
|
||||||
|
readonly property Component thing2: ...
|
||||||
|
|
||||||
|
sourceComponent: condition ? thing1 : thing2
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Something is broken
|
## Something is broken
|
||||||
|
|
||||||
### There is a hole in my window
|
### There is a hole in my window
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue