1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01: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/Create/Wizards/ImportWebm/ImportWebmInit.qml</file>
<file>qml/Common/Dialogs/MonitorConfiguration.qml</file> <file>qml/Common/Dialogs/MonitorConfiguration.qml</file>
<file>qml/Common/Dialogs/SteamNotAvailable.qml</file> <file>qml/Common/Dialogs/SteamNotAvailable.qml</file>
<file>assets/startinfo/gimp.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -49,9 +49,15 @@ Item {
left: parent.left left: parent.left
margins: 20 margins: 20
} }
boundsBehavior: Flickable.DragOverBounds
maximumFlickVelocity: 2500
flickDeceleration: 500
clip: true clip: true
cellWidth: 186 cellWidth: 186
cellHeight: 280 cellHeight: 280
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
}
model: ListModel { model: ListModel {
ListElement { ListElement {
text: "Subreddit" text: "Subreddit"
@ -102,6 +108,13 @@ Item {
description: "" description: ""
category: "Tools" category: "Tools"
} }
ListElement {
text: "Gimp"
image: "qrc:/assets/startinfo/gimp.png"
link: "https://gimp.org/"
description: ""
category: "Tools"
}
ListElement { ListElement {
text: "Inscape" text: "Inscape"
image: "qrc:/assets/startinfo/inkscape.png" image: "qrc:/assets/startinfo/inkscape.png"
@ -175,6 +188,7 @@ Item {
} }
delegate: Item { delegate: Item {
id:delegate
width: gridView.cellWidth width: gridView.cellWidth
height: gridView.cellHeight height: gridView.cellHeight
@ -189,6 +203,7 @@ Item {
} }
Image { Image {
id:image
anchors.fill: parent anchors.fill: parent
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
source: model.image source: model.image
@ -265,8 +280,39 @@ Item {
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
hoverEnabled: true hoverEnabled: true
onClicked: Qt.openUrlExternally(model.link) 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
}
}
]
} }
} }
} }