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
|
fillMode: Image.PreserveAspectCrop
|
||||||
smooth: true
|
smooth: true
|
||||||
visible: false
|
visible: false
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
OpacityMask {
|
OpacityMask {
|
||||||
|
@ -24,6 +24,7 @@ Row {
|
|||||||
property Image dummyImage: Image {
|
property Image dummyImage: Image {
|
||||||
source: mutualConnectionIcon.name ? "../../assets/img/icons/" + mutualConnectionIcon.name + ".svg": ""
|
source: mutualConnectionIcon.name ? "../../assets/img/icons/" + mutualConnectionIcon.name + ".svg": ""
|
||||||
visible: false
|
visible: false
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,6 +43,7 @@ Row {
|
|||||||
property Image dummyImage: Image {
|
property Image dummyImage: Image {
|
||||||
source: trustContactIcon.name ? "../../assets/img/icons/" + trustContactIcon.name + ".svg": ""
|
source: trustContactIcon.name ? "../../assets/img/icons/" + trustContactIcon.name + ".svg": ""
|
||||||
visible: false
|
visible: false
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ Item {
|
|||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: _internal
|
id: _internal
|
||||||
property bool isAnimated: !!source && source.toString().endsWith('.gif')
|
readonly property bool isAnimated: !!source && source.toString().endsWith('.gif')
|
||||||
property bool pausePlaying: false
|
property bool pausePlaying: false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,6 +43,7 @@ Item {
|
|||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: imageContainer.source
|
source: imageContainer.source
|
||||||
playing: _internal.isAnimated && isAppWindowActive && !_internal.pausePlaying
|
playing: _internal.isAnimated && isAppWindowActive && !_internal.pausePlaying
|
||||||
|
cache: false
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
|
@ -366,5 +366,6 @@ Item {
|
|||||||
// Align window center to window rect
|
// Align window center to window rect
|
||||||
x: windowRect.x + windowRect.width/2
|
x: windowRect.x + windowRect.width/2
|
||||||
y: windowRect.y + windowRect.height/2
|
y: windowRect.y + windowRect.height/2
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,6 +220,7 @@ Control {
|
|||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,6 +133,7 @@ WebEngineView {
|
|||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 60
|
anchors.topMargin: 60
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
FavoritesList {
|
FavoritesList {
|
||||||
|
@ -21,6 +21,7 @@ Item {
|
|||||||
width: 80
|
width: 80
|
||||||
height: 80
|
height: 80
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
@ -24,6 +24,7 @@ StatusDialog {
|
|||||||
Layout.preferredWidth: 240
|
Layout.preferredWidth: 240
|
||||||
Layout.preferredHeight: 148
|
Layout.preferredHeight: 148
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusButton {
|
StatusButton {
|
||||||
|
@ -52,6 +52,7 @@ StatusScrollView {
|
|||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
@ -33,6 +33,7 @@ Item {
|
|||||||
anchors.bottomMargin: Style.current.padding
|
anchors.bottomMargin: Style.current.padding
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: Style.png("onboarding/notifications@2x")
|
source: Style.png("onboarding/notifications@2x")
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
@ -199,6 +199,7 @@ Item {
|
|||||||
id: imgChains
|
id: imgChains
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
source: Style.svg("onboarding/chains")
|
source: Style.svg("onboarding/chains")
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
EmojiHash {
|
EmojiHash {
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -45,6 +45,7 @@ Item {
|
|||||||
id: keysImg
|
id: keysImg
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
@ -47,6 +47,7 @@ Item {
|
|||||||
antialiasing: true
|
antialiasing: true
|
||||||
source: Style.png("onboarding/fingerprint@2x")
|
source: Style.png("onboarding/fingerprint@2x")
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
@ -46,6 +46,7 @@ Item {
|
|||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: Style.png("onboarding/welcome")
|
source: Style.png("onboarding/welcome")
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
@ -51,6 +51,7 @@ ColumnLayout {
|
|||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.preferredWidth: 120
|
Layout.preferredWidth: 120
|
||||||
Layout.preferredHeight: width
|
Layout.preferredHeight: width
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
@ -73,6 +73,7 @@ ColumnLayout {
|
|||||||
mipmap: true
|
mipmap: true
|
||||||
smooth: false
|
smooth: false
|
||||||
source: globalUtils.qrCode(root.connectionString)
|
source: globalUtils.qrCode(root.connectionString)
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
FastBlur {
|
FastBlur {
|
||||||
|
@ -38,6 +38,7 @@ SettingsContentBase {
|
|||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: Style.png("status-logo")
|
source: Style.png("status-logo")
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { width: 1; height: 8}
|
Item { width: 1; height: 8}
|
||||||
|
@ -53,6 +53,7 @@ SettingsContentBase {
|
|||||||
Layout.preferredWidth: 434
|
Layout.preferredWidth: 434
|
||||||
Layout.preferredHeight: 213
|
Layout.preferredHeight: 213
|
||||||
Layout.topMargin: 18
|
Layout.topMargin: 18
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
@ -364,6 +364,7 @@ Item {
|
|||||||
width: height
|
width: height
|
||||||
source: Style.png("tokens/SNT")
|
source: Style.png("tokens/SNT")
|
||||||
sourceSize: Qt.size(width, height)
|
sourceSize: Qt.size(width, height)
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
@ -41,6 +41,7 @@ Item {
|
|||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: Style.png("ens-header-" + Style.current.name + "@2x")
|
source: Style.png("ens-header-" + Style.current.name + "@2x")
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
@ -40,6 +40,7 @@ ColumnLayout {
|
|||||||
antialiasing: true
|
antialiasing: true
|
||||||
source: Style.png("keycard/keycard-security")
|
source: Style.png("keycard/keycard-security")
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -52,6 +52,7 @@ Item {
|
|||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: Style.png("onboarding/keys")
|
source: Style.png("onboarding/keys")
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
@ -29,6 +29,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: Style.current.padding
|
anchors.leftMargin: Style.current.padding
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
@ -31,6 +31,7 @@ Loader {
|
|||||||
sourceSize: Qt.size(parent.width, parent.height)
|
sourceSize: Qt.size(parent.width, parent.height)
|
||||||
smooth: true
|
smooth: true
|
||||||
visible: false
|
visible: false
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
OpacityMask {
|
OpacityMask {
|
||||||
|
@ -64,6 +64,7 @@ DropArea {
|
|||||||
x: index * 10 + rptDraggedPreviews.x
|
x: index * 10 + rptDraggedPreviews.x
|
||||||
y: index * 10 + rptDraggedPreviews.y
|
y: index * 10 + rptDraggedPreviews.y
|
||||||
z: 1
|
z: 1
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,7 @@ Item {
|
|||||||
Image {
|
Image {
|
||||||
id: tmpImage
|
id: tmpImage
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
cache: false
|
||||||
}
|
}
|
||||||
|
|
||||||
property var keepGrabResultAlive;
|
property var keepGrabResultAlive;
|
||||||
|
@ -56,6 +56,7 @@ Item {
|
|||||||
source: root.source
|
source: root.source
|
||||||
playing: root.isAnimated && root.playing
|
playing: root.isAnimated && root.playing
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
cache: false
|
||||||
|
|
||||||
onStatusChanged: {
|
onStatusChanged: {
|
||||||
if (imageMessage.status === Image.Error && !retryTimer.running) {
|
if (imageMessage.status === Image.Error && !retryTimer.running) {
|
||||||
|
@ -31,6 +31,7 @@ Row {
|
|||||||
mipmap: true
|
mipmap: true
|
||||||
smooth: false
|
smooth: false
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
|
cache: false
|
||||||
source: modelData
|
source: modelData
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
|
@ -139,6 +139,7 @@ Column {
|
|||||||
asynchronous: true
|
asynchronous: true
|
||||||
isAnimated: result.contentType ? result.contentType.toLowerCase().endsWith("gif") : false
|
isAnimated: result.contentType ? result.contentType.toLowerCase().endsWith("gif") : false
|
||||||
onClicked: isAnimated && !playing ? localAnimationEnabled = true : root.imageClicked(linkImage.imageAlias)
|
onClicked: isAnimated && !playing ? localAnimationEnabled = true : root.imageClicked(linkImage.imageAlias)
|
||||||
|
imageAlias.cache: localAnimationEnabled // GIFs can only loop/play properly with cache enabled
|
||||||
Loader {
|
Loader {
|
||||||
width: 45
|
width: 45
|
||||||
height: 38
|
height: 38
|
||||||
|
Loading…
x
Reference in New Issue
Block a user