From 247e82933252a9eee36b8f01fe7b824358145457 Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Mon, 12 May 2014 19:19:24 +0200 Subject: [PATCH] Proper if-else {} style --- .../calendar/qml/DayDelegate.qml | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/declarativeimports/calendar/qml/DayDelegate.qml b/src/declarativeimports/calendar/qml/DayDelegate.qml index f91cb033c..548f2aa22 100644 --- a/src/declarativeimports/calendar/qml/DayDelegate.qml +++ b/src/declarativeimports/calendar/qml/DayDelegate.qml @@ -36,9 +36,13 @@ Item { width: parent.width - (borderWidth) height: parent.height - (borderWidth) opacity: { - if (calendarDays.selectedItem == dayStyle && today) 0.6 - else if (today) 0.4 - else 0 + if (calendarDays.selectedItem == dayStyle && today) { + 0.6 + } else if (today) { + 0.4 + } else { + 0 + } } Behavior on opacity { NumberAnimation { duration: units.shortDuration*2 } } color: theme.textColor @@ -50,9 +54,13 @@ Item { fill: todayRect } opacity: { - if (calendarDays.selectedItem == dayStyle) 0.6 - else if (dateMouse.containsMouse) 0.4 - else 0 + if (calendarDays.selectedItem == dayStyle) { + 0.6 + } else if (dateMouse.containsMouse) { + 0.4 + } else { + 0 + } } visible: !today Behavior on opacity { NumberAnimation { duration: units.shortDuration*2 } }