kcms/colors: Simplify `isCustomColor`

wilder-5.25
Fushan Wen 4 years ago
parent ad32f4f714
commit acce75cd05
No known key found for this signature in database
GPG Key ID: 2E48D1487C91DCAA
  1. 5
      kcms/colors/package/contents/ui/main.qml

@ -286,9 +286,8 @@ KCM.GridViewKCM {
ColorRadioButton {
id: customColorIndicator
property bool isCustomColor: root.accentColor ?
!colorRepeater.model.some(color => Qt.colorEqual(color, root.accentColor))
: false
property bool isCustomColor: root.accentColor
&& !colorRepeater.model.some(color => Qt.colorEqual(color, root.accentColor))
/* The qt binding will keep the binding alive as well as uncheck the button
* we can't just disable the button because then the icon will become grey

Loading…
Cancel
Save