From acce75cd058d870aabfd8b058ec9e604cbcdc9cd Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Sat, 23 Apr 2022 13:52:15 +0800 Subject: [PATCH] kcms/colors: Simplify `isCustomColor` --- kcms/colors/package/contents/ui/main.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kcms/colors/package/contents/ui/main.qml b/kcms/colors/package/contents/ui/main.qml index 0a18d26c0..6f6bdfb44 100644 --- a/kcms/colors/package/contents/ui/main.qml +++ b/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