Fix double click on video message

This commit is contained in:
Nicolas Werner 2021-03-27 01:17:58 +01:00
parent 1bd59a3939
commit 583fd9b5ab
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9

View File

@ -2,6 +2,7 @@
// //
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
import "../"
import QtMultimedia 5.6 import QtMultimedia 5.6
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
@ -107,45 +108,17 @@ Rectangle {
width: parent.width width: parent.width
spacing: 15 spacing: 15
Rectangle { ImageButton {
id: button id: button
color: colors.window Layout.alignment: Qt.verticalCenter
radius: 22 //color: colors.window
height: 44 //radius: 22
width: 44 height: 32
states: [ width: 32
State {
name: "stopped"
PropertyChanges {
target: img
source: "image://colorimage/:/icons/icons/ui/play-sign.png?" + colors.text
}
},
State {
name: "playing"
PropertyChanges {
target: img
source: "image://colorimage/:/icons/icons/ui/pause-symbol.png?" + colors.text
}
}
]
Image {
id: img
anchors.centerIn: parent
z: 3 z: 3
source: "image://colorimage/:/icons/icons/ui/arrow-pointing-down.png?" + colors.text image: ":/icons/icons/ui/arrow-pointing-down.png"
fillMode: Image.Pad onClicked: {
}
TapHandler {
onSingleTapped: {
switch (button.state) { switch (button.state) {
case "": case "":
TimelineManager.timeline.cacheMedia(model.data.id); TimelineManager.timeline.cacheMedia(model.data.id);
@ -162,8 +135,27 @@ Rectangle {
break; break;
} }
} }
states: [
State {
name: "stopped"
PropertyChanges {
target: button
image: ":/icons/icons/ui/play-sign.png"
} }
},
State {
name: "playing"
PropertyChanges {
target: button
image: ":/icons/icons/ui/pause-symbol.png"
}
}
]
CursorShape { CursorShape {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor