mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-16 17:45:15 +00:00
fix: reduce Image cache
for everything that's not a user interface element, esp. for static/big images or chat/message elements which get served from locally anyway from status-go Iterates #10339
This commit is contained in:
parent
99fdc91e2b
commit
9aebf588a1
@ -203,6 +203,7 @@ Rectangle {
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
smooth: true
|
||||
visible: false
|
||||
cache: false
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
|
@ -24,6 +24,7 @@ Row {
|
||||
property Image dummyImage: Image {
|
||||
source: mutualConnectionIcon.name ? "../../assets/img/icons/" + mutualConnectionIcon.name + ".svg": ""
|
||||
visible: false
|
||||
cache: false
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,6 +43,7 @@ Row {
|
||||
property Image dummyImage: Image {
|
||||
source: trustContactIcon.name ? "../../assets/img/icons/" + trustContactIcon.name + ".svg": ""
|
||||
visible: false
|
||||
cache: false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ Item {
|
||||
|
||||
QtObject {
|
||||
id: _internal
|
||||
property bool isAnimated: !!source && source.toString().endsWith('.gif')
|
||||
readonly property bool isAnimated: !!source && source.toString().endsWith('.gif')
|
||||
property bool pausePlaying: false
|
||||
}
|
||||
|
||||
@ -43,6 +43,7 @@ Item {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: imageContainer.source
|
||||
playing: _internal.isAnimated && isAppWindowActive && !_internal.pausePlaying
|
||||
cache: false
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: OpacityMask {
|
||||
|
@ -366,5 +366,6 @@ Item {
|
||||
// Align window center to window rect
|
||||
x: windowRect.x + windowRect.width/2
|
||||
y: windowRect.y + windowRect.height/2
|
||||
cache: false
|
||||
}
|
||||
}
|
||||
|
@ -220,6 +220,7 @@ Control {
|
||||
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectFit
|
||||
cache: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,6 +133,7 @@ WebEngineView {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 60
|
||||
cache: false
|
||||
}
|
||||
|
||||
FavoritesList {
|
||||
|
@ -21,6 +21,7 @@ Item {
|
||||
width: 80
|
||||
height: 80
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
cache: false
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
@ -24,6 +24,7 @@ StatusDialog {
|
||||
Layout.preferredWidth: 240
|
||||
Layout.preferredHeight: 148
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
cache: false
|
||||
}
|
||||
|
||||
StatusButton {
|
||||
|
@ -52,6 +52,7 @@ StatusScrollView {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
fillMode: Image.PreserveAspectFit
|
||||
mipmap: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
@ -33,6 +33,7 @@ Item {
|
||||
anchors.bottomMargin: Style.current.padding
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: Style.png("onboarding/notifications@2x")
|
||||
cache: false
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
@ -199,6 +199,7 @@ Item {
|
||||
id: imgChains
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
source: Style.svg("onboarding/chains")
|
||||
cache: false
|
||||
}
|
||||
EmojiHash {
|
||||
anchors {
|
||||
|
@ -45,6 +45,7 @@ Item {
|
||||
id: keysImg
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
mipmap: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
@ -47,6 +47,7 @@ Item {
|
||||
antialiasing: true
|
||||
source: Style.png("onboarding/fingerprint@2x")
|
||||
mipmap: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
@ -46,6 +46,7 @@ Item {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: Style.png("onboarding/welcome")
|
||||
mipmap: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
@ -51,6 +51,7 @@ ColumnLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.preferredWidth: 120
|
||||
Layout.preferredHeight: width
|
||||
cache: false
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
@ -73,6 +73,7 @@ ColumnLayout {
|
||||
mipmap: true
|
||||
smooth: false
|
||||
source: globalUtils.qrCode(root.connectionString)
|
||||
cache: false
|
||||
}
|
||||
|
||||
FastBlur {
|
||||
|
@ -38,6 +38,7 @@ SettingsContentBase {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: Style.png("status-logo")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
cache: false
|
||||
}
|
||||
|
||||
Item { width: 1; height: 8}
|
||||
|
@ -53,6 +53,7 @@ SettingsContentBase {
|
||||
Layout.preferredWidth: 434
|
||||
Layout.preferredHeight: 213
|
||||
Layout.topMargin: 18
|
||||
cache: false
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
@ -364,6 +364,7 @@ Item {
|
||||
width: height
|
||||
source: Style.png("tokens/SNT")
|
||||
sourceSize: Qt.size(width, height)
|
||||
cache: false
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
@ -41,6 +41,7 @@ Item {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: Style.png("ens-header-" + Style.current.name + "@2x")
|
||||
cache: false
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
@ -40,6 +40,7 @@ ColumnLayout {
|
||||
antialiasing: true
|
||||
source: Style.png("keycard/keycard-security")
|
||||
mipmap: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
Item {
|
||||
|
@ -52,6 +52,7 @@ Item {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: Style.png("onboarding/keys")
|
||||
mipmap: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
@ -29,6 +29,7 @@ Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
cache: false
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
@ -31,6 +31,7 @@ Loader {
|
||||
sourceSize: Qt.size(parent.width, parent.height)
|
||||
smooth: true
|
||||
visible: false
|
||||
cache: false
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
|
@ -64,6 +64,7 @@ DropArea {
|
||||
x: index * 10 + rptDraggedPreviews.x
|
||||
y: index * 10 + rptDraggedPreviews.y
|
||||
z: 1
|
||||
cache: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,7 @@ Item {
|
||||
Image {
|
||||
id: tmpImage
|
||||
mipmap: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
property var keepGrabResultAlive;
|
||||
|
@ -56,6 +56,7 @@ Item {
|
||||
source: root.source
|
||||
playing: root.isAnimated && root.playing
|
||||
mipmap: true
|
||||
cache: false
|
||||
|
||||
onStatusChanged: {
|
||||
if (imageMessage.status === Image.Error && !retryTimer.running) {
|
||||
|
@ -31,6 +31,7 @@ Row {
|
||||
mipmap: true
|
||||
smooth: false
|
||||
antialiasing: true
|
||||
cache: false
|
||||
source: modelData
|
||||
layer.enabled: true
|
||||
layer.effect: OpacityMask {
|
||||
|
@ -139,6 +139,7 @@ Column {
|
||||
asynchronous: true
|
||||
isAnimated: result.contentType ? result.contentType.toLowerCase().endsWith("gif") : false
|
||||
onClicked: isAnimated && !playing ? localAnimationEnabled = true : root.imageClicked(linkImage.imageAlias)
|
||||
imageAlias.cache: localAnimationEnabled // GIFs can only loop/play properly with cache enabled
|
||||
Loader {
|
||||
width: 45
|
||||
height: 38
|
||||
|
Loading…
x
Reference in New Issue
Block a user