Fix images being cropped instead of scaled

This commit is contained in:
Nicolas Werner 2022-03-09 20:15:37 +01:00
parent fcfcf5573b
commit 7a11b69f99
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
5 changed files with 5 additions and 5 deletions

View file

@ -45,7 +45,7 @@ Item {
visible: !mxcimage.loaded visible: !mxcimage.loaded
anchors.fill: parent anchors.fill: parent
source: url.replace("mxc://", "image://MxcImage/") source: url.replace("mxc://", "image://MxcImage/") + "?scale"
asynchronous: true asynchronous: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
smooth: true smooth: true

View file

@ -57,7 +57,7 @@ Item {
Image { Image {
anchors.fill: parent anchors.fill: parent
source: thumbnailUrl.replace("mxc://", "image://MxcImage/") source: thumbnailUrl.replace("mxc://", "image://MxcImage/") + "?scale"
asynchronous: true asynchronous: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit

View file

@ -243,7 +243,7 @@ ApplicationWindow {
Avatar { Avatar {
Layout.columnSpan: 2 Layout.columnSpan: 2
url: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.Url).replace("mxc://", "image://MxcImage/") url: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.Url).replace("mxc://", "image://MxcImage/") + "?scale"
displayName: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.ShortCode) displayName: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.ShortCode)
roomid: displayName roomid: displayName
height: 130 height: 130

View file

@ -233,7 +233,7 @@ ApplicationWindow {
contentItem: Image { contentItem: Image {
height: stickerDim height: stickerDim
width: stickerDim width: stickerDim
source: model.url.replace("mxc://", "image://MxcImage/") source: model.url.replace("mxc://", "image://MxcImage/") + "?scale"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
} }

View file

@ -157,7 +157,7 @@ Menu {
contentItem: Image { contentItem: Image {
height: stickerDim height: stickerDim
width: stickerDim width: stickerDim
source: model.url.replace("mxc://", "image://MxcImage/") source: model.url.replace("mxc://", "image://MxcImage/") + "?scale"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
} }