Recomputing scale and opacity for list items to look more like wheel
This commit is contained in:
parent
10103295e5
commit
dd74f2de31
2 changed files with 7 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue