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 animate: true
|
||||||
property bool animated:
|
property bool animated:
|
||||||
utils.urlExtension(image.source).toLowerCase() === "gif"
|
utils.urlExtension(image.source).toLowerCase() === "gif"
|
||||||
property bool enabledAnimatedPausing: true
|
|
||||||
|
|
||||||
property alias radius: roundMask.radius
|
property alias radius: roundMask.radius
|
||||||
property alias showProgressBar: progressBarLoader.active
|
property alias showProgressBar: progressBarLoader.active
|
||||||
|
@ -74,24 +73,17 @@ Image {
|
||||||
value: 1
|
value: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
TapHandler {
|
HButton {
|
||||||
enabled: image.enabledAnimatedPausing
|
anchors.left: parent.left
|
||||||
onTapped: parent.userPaused = ! parent.userPaused
|
anchors.bottom: parent.bottom
|
||||||
gesturePolicy: TapHandler.ReleaseWithinBounds
|
anchors.leftMargin: theme.spacing / 2
|
||||||
}
|
anchors.bottomMargin: theme.spacing / 2
|
||||||
|
|
||||||
HIcon {
|
enableRadius: true
|
||||||
anchors.centerIn: parent
|
icon.name: parent.userPaused ? "player-play" : "player-pause"
|
||||||
svgName: "play-overlay"
|
iconItem.small: true
|
||||||
colorize: "transparent"
|
visible: parent.width > width * 2 && parent.height > height * 2
|
||||||
dimension: Math.min(
|
onClicked: parent.userPaused = ! parent.userPaused
|
||||||
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 } }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,6 @@ HFlickableColumnPage {
|
||||||
HLabeledItem {
|
HLabeledItem {
|
||||||
id: topicArea
|
id: topicArea
|
||||||
elementsOpacity: topicAreaIn.opacity
|
elementsOpacity: topicAreaIn.opacity
|
||||||
enabled: chat.roomInfo.can_set_topic
|
|
||||||
label.text: qsTr("Topic:")
|
label.text: qsTr("Topic:")
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -127,6 +126,7 @@ HFlickableColumnPage {
|
||||||
id: topicAreaIn
|
id: topicAreaIn
|
||||||
placeholderText: qsTr("This room is about...")
|
placeholderText: qsTr("This room is about...")
|
||||||
defaultText: chat.roomInfo.plain_topic
|
defaultText: chat.roomInfo.plain_topic
|
||||||
|
enabled: chat.roomInfo.can_set_topic
|
||||||
|
|
||||||
focusItemOnTab:
|
focusItemOnTab:
|
||||||
encryptCheckBox.checked ?
|
encryptCheckBox.checked ?
|
||||||
|
|
|
@ -66,7 +66,6 @@ HMxcImage {
|
||||||
width: fitSize.width
|
width: fitSize.width
|
||||||
height: fitSize.height
|
height: fitSize.height
|
||||||
horizontalAlignment: Image.AlignLeft
|
horizontalAlignment: Image.AlignLeft
|
||||||
enabledAnimatedPausing: ! eventList.selectedCount
|
|
||||||
|
|
||||||
title: thumbnail ? loader.thumbnailTitle : loader.title
|
title: thumbnail ? loader.thumbnailTitle : loader.title
|
||||||
animated: loader.singleMediaInfo.media_mime === "image/gif" ||
|
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 border: "black"
|
||||||
color pressedBorder: colors.strongAccentElement
|
color pressedBorder: colors.strongAccentElement
|
||||||
|
|
||||||
image:
|
|
||||||
int maxPauseIndicatorSize: 64
|
|
||||||
|
|
||||||
avatar:
|
avatar:
|
||||||
int size: baseElementsHeight
|
int size: baseElementsHeight
|
||||||
int compactSize: baseElementsHeight / 2
|
int compactSize: baseElementsHeight / 2
|
||||||
|
|
|
@ -250,9 +250,6 @@ controls:
|
||||||
color border: "black"
|
color border: "black"
|
||||||
color pressedBorder: colors.strongAccentElement
|
color pressedBorder: colors.strongAccentElement
|
||||||
|
|
||||||
image:
|
|
||||||
int maxPauseIndicatorSize: 64
|
|
||||||
|
|
||||||
avatar:
|
avatar:
|
||||||
int size: baseElementsHeight
|
int size: baseElementsHeight
|
||||||
int compactSize: baseElementsHeight / 2
|
int compactSize: baseElementsHeight / 2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user