1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00

Add gimp entry, hover zoom and some cleanup

This commit is contained in:
Elias Steurer 2020-11-28 13:56:16 +01:00
parent aabaaaf1f9
commit 02b25e1364
3 changed files with 47 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@ -75,5 +75,6 @@
<file>qml/Create/Wizards/ImportWebm/ImportWebmInit.qml</file>
<file>qml/Common/Dialogs/MonitorConfiguration.qml</file>
<file>qml/Common/Dialogs/SteamNotAvailable.qml</file>
<file>assets/startinfo/gimp.png</file>
</qresource>
</RCC>

View File

@ -49,9 +49,15 @@ Item {
left: parent.left
margins: 20
}
boundsBehavior: Flickable.DragOverBounds
maximumFlickVelocity: 2500
flickDeceleration: 500
clip: true
cellWidth: 186
cellHeight: 280
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
}
model: ListModel {
ListElement {
text: "Subreddit"
@ -102,6 +108,13 @@ Item {
description: ""
category: "Tools"
}
ListElement {
text: "Gimp"
image: "qrc:/assets/startinfo/gimp.png"
link: "https://gimp.org/"
description: ""
category: "Tools"
}
ListElement {
text: "Inscape"
image: "qrc:/assets/startinfo/inkscape.png"
@ -175,6 +188,7 @@ Item {
}
delegate: Item {
id:delegate
width: gridView.cellWidth
height: gridView.cellHeight
@ -189,6 +203,7 @@ Item {
}
Image {
id:image
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
source: model.image
@ -265,8 +280,39 @@ Item {
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: Qt.openUrlExternally(model.link)
onEntered: {
delegate.state = "hover"
}
onExited: {
delegate.state = ""
}
}
}
transitions: [
Transition {
from: ""
to: "hover"
ScaleAnimator {
target: image
duration: 80
from: 1
to: 1.05
}
},
Transition {
from: "hover"
to: ""
ScaleAnimator {
target: image
duration: 80
from: 1.05
to: 1
}
}
]
}
}
}