From dd74f2de316cfc45fada5b26980bc3b7e0d1d9ac Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Sun, 30 Jun 2019 17:29:28 +0300 Subject: [PATCH] Recomputing scale and opacity for list items to look more like wheel --- slice/LoopListSessionItem.qml | 5 +++-- slice/LoopListUserItem.qml | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/slice/LoopListSessionItem.qml b/slice/LoopListSessionItem.qml index 8696399..cc82f5f 100644 --- a/slice/LoopListSessionItem.qml +++ b/slice/LoopListSessionItem.qml @@ -5,10 +5,11 @@ import SddmComponents 2.0 Item { id: itemRoot - opacity: distance - scale: distance + opacity: computedDistance + scale: computedDistance property real distance: 1.0 + readonly property real computedDistance: Math.sin(Math.PI / 2 * distance) property string sessionName: "" property bool hover: false diff --git a/slice/LoopListUserItem.qml b/slice/LoopListUserItem.qml index 204fd78..a4a48c3 100644 --- a/slice/LoopListUserItem.qml +++ b/slice/LoopListUserItem.qml @@ -5,7 +5,7 @@ import SddmComponents 2.0 Item { id: itemRoot - opacity: distance + opacity: computedDistance width: parent.width height: userName == "" ? userLoginText.height + 14 : userNameText.height + userLoginText.height - 4 @@ -15,11 +15,12 @@ Item transform: Scale { origin.x: itemRoot.height + 12 - xScale: distance - yScale: distance + xScale: computedDistance + yScale: computedDistance } property real distance: 1.0 + readonly property real computedDistance: Math.sin(Math.PI / 2 * distance) property string userName: "" property string userLogin: "" property string userAvatar: "icons/no_avatar.svg"