mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix double click on video message
This commit is contained in:
parent
1bd59a3939
commit
583fd9b5ab
1 changed files with 30 additions and 38 deletions
|
@ -2,6 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "../"
|
||||
import QtMultimedia 5.6
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.1
|
||||
|
@ -107,45 +108,17 @@ Rectangle {
|
|||
width: parent.width
|
||||
spacing: 15
|
||||
|
||||
Rectangle {
|
||||
ImageButton {
|
||||
id: button
|
||||
|
||||
color: colors.window
|
||||
radius: 22
|
||||
height: 44
|
||||
width: 44
|
||||
states: [
|
||||
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
|
||||
Layout.alignment: Qt.verticalCenter
|
||||
//color: colors.window
|
||||
//radius: 22
|
||||
height: 32
|
||||
width: 32
|
||||
z: 3
|
||||
source: "image://colorimage/:/icons/icons/ui/arrow-pointing-down.png?" + colors.text
|
||||
fillMode: Image.Pad
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
onSingleTapped: {
|
||||
image: ":/icons/icons/ui/arrow-pointing-down.png"
|
||||
onClicked: {
|
||||
switch (button.state) {
|
||||
case "":
|
||||
TimelineManager.timeline.cacheMedia(model.data.id);
|
||||
|
@ -162,8 +135,27 @@ Rectangle {
|
|||
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 {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
|
Loading…
Reference in a new issue