Make GIFs openable externally + real pause button
This commit is contained in:
parent
7f478efc40
commit
68da4be7be
@ -11,7 +11,6 @@ Image {
|
||||
property bool animate: true
|
||||
property bool animated:
|
||||
utils.urlExtension(image.source).toLowerCase() === "gif"
|
||||
property bool enabledAnimatedPausing: true
|
||||
|
||||
property alias radius: roundMask.radius
|
||||
property alias showProgressBar: progressBarLoader.active
|
||||
@ -74,24 +73,17 @@ Image {
|
||||
value: 1
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
enabled: image.enabledAnimatedPausing
|
||||
onTapped: parent.userPaused = ! parent.userPaused
|
||||
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||
}
|
||||
HButton {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.leftMargin: theme.spacing / 2
|
||||
anchors.bottomMargin: theme.spacing / 2
|
||||
|
||||
HIcon {
|
||||
anchors.centerIn: parent
|
||||
svgName: "play-overlay"
|
||||
colorize: "transparent"
|
||||
dimension: Math.min(
|
||||
parent.width - theme.spacing * 2,
|
||||
parent.height - theme.spacing * 2,
|
||||
theme.controls.image.maxPauseIndicatorSize,
|
||||
)
|
||||
scale: parent.status === Image.Ready && parent.paused ? 1 : 0
|
||||
|
||||
Behavior on scale { HNumberAnimation { overshoot: 4 } }
|
||||
enableRadius: true
|
||||
icon.name: parent.userPaused ? "player-play" : "player-pause"
|
||||
iconItem.small: true
|
||||
visible: parent.width > width * 2 && parent.height > height * 2
|
||||
onClicked: parent.userPaused = ! parent.userPaused
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,6 @@ HFlickableColumnPage {
|
||||
HLabeledItem {
|
||||
id: topicArea
|
||||
elementsOpacity: topicAreaIn.opacity
|
||||
enabled: chat.roomInfo.can_set_topic
|
||||
label.text: qsTr("Topic:")
|
||||
|
||||
Layout.fillWidth: true
|
||||
@ -127,6 +126,7 @@ HFlickableColumnPage {
|
||||
id: topicAreaIn
|
||||
placeholderText: qsTr("This room is about...")
|
||||
defaultText: chat.roomInfo.plain_topic
|
||||
enabled: chat.roomInfo.can_set_topic
|
||||
|
||||
focusItemOnTab:
|
||||
encryptCheckBox.checked ?
|
||||
|
@ -66,7 +66,6 @@ HMxcImage {
|
||||
width: fitSize.width
|
||||
height: fitSize.height
|
||||
horizontalAlignment: Image.AlignLeft
|
||||
enabledAnimatedPausing: ! eventList.selectedCount
|
||||
|
||||
title: thumbnail ? loader.thumbnailTitle : loader.title
|
||||
animated: loader.singleMediaInfo.media_mime === "image/gif" ||
|
||||
|
@ -1,4 +0,0 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-3 17v-10l9 5.146z" fill-opacity=".605505"/>
|
||||
<path d="m8.9991935 6.998851 9.0020095 5.147149-9.0020095 4.855085z" fill="#fff" fill-opacity=".66055"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 334 B |
@ -244,9 +244,6 @@ controls:
|
||||
color border: "black"
|
||||
color pressedBorder: colors.strongAccentElement
|
||||
|
||||
image:
|
||||
int maxPauseIndicatorSize: 64
|
||||
|
||||
avatar:
|
||||
int size: baseElementsHeight
|
||||
int compactSize: baseElementsHeight / 2
|
||||
|
@ -250,9 +250,6 @@ controls:
|
||||
color border: "black"
|
||||
color pressedBorder: colors.strongAccentElement
|
||||
|
||||
image:
|
||||
int maxPauseIndicatorSize: 64
|
||||
|
||||
avatar:
|
||||
int size: baseElementsHeight
|
||||
int compactSize: baseElementsHeight / 2
|
||||
|
Loading…
Reference in New Issue
Block a user