Skip to content

Commit

Permalink
Support animated images.
Browse files Browse the repository at this point in the history
  • Loading branch information
Armored-Dragon committed Dec 21, 2024
1 parent 891d533 commit 6976432
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/system/domainChat/qml_widgets/TemplateChatMessage.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 2.7
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.3

Expand Down Expand Up @@ -147,10 +147,11 @@ Component {
width: messageBoxFlow.width;
height: 200

Image {
AnimatedImage {
source: model.type === 'imageEmbed' ? model.value : ''
sourceSize.width: 400
sourceSize.height: 200
height: Math.min(sourceSize.height, 200);
onStatusChanged: playing = (status == AnimatedImage.Ready)
fillMode: Image.PreserveAspectFit
}
}
}
Expand Down

0 comments on commit 6976432

Please sign in to comment.