Browse Source

Cease to load full sized images

Change-Id: I5cd1d2a50f6b637273e412011ebed373a335ca68
Donald Carr 5 years ago
parent
commit
0570e6c2ed
1 changed files with 5 additions and 18 deletions
  1. 5 18
      qml/common/ArtImage.qml

+ 5 - 18
qml/common/ArtImage.qml

@@ -14,28 +14,15 @@ Rectangle {
     color: globalSettings.randomBackdropColor ? Qt.rgba(Math.random(255), Math.random(255), Math.random(255), 1.0) : "black"
     color: globalSettings.randomBackdropColor ? Qt.rgba(Math.random(255), Math.random(255), Math.random(255), 1.0) : "black"
 
 
     height: width*nativeUtils.imageCollection.data(modelIndex, PictureModel.SizeRole).height/nativeUtils.imageCollection.data(modelIndex, PictureModel.SizeRole).width
     height: width*nativeUtils.imageCollection.data(modelIndex, PictureModel.SizeRole).height/nativeUtils.imageCollection.data(modelIndex, PictureModel.SizeRole).width
-    width: parent ? parent.width : 0
+    width: globalVars.imageWidthOverride
 
 
     Image {
     Image {
         id: image
         id: image
         cache: false
         cache: false
         opacity: globalSettings.fadeInImages ? 0 : 1.0
         opacity: globalSettings.fadeInImages ? 0 : 1.0
 
 
-        x: globalSettings.artFrameWidth
-        y: globalSettings.artFrameWidth
-
-        height: (globalVars.imageWidthOverride > 0
-                 ? Math.ceil(globalVars.imageWidthOverride*nativeUtils.imageCollection.data(modelIndex, PictureModel.SizeRole).height/nativeUtils.imageCollection.data(modelIndex, PictureModel.SizeRole).width)
-                 : nativeUtils.imageCollection.data(modelIndex, PictureModel.SizeRole).height
-                 ) - 2*globalSettings.artFrameWidth
-
-        width: (globalVars.imageWidthOverride > 0
-                ? globalVars.imageWidthOverride
-                : nativeUtils.imageCollection.data(modelIndex, PictureModel.SizeRole).width
-                ) - 2*globalSettings.artFrameWidth
-
-        transformOrigin: Item.TopLeft
-        scale: (root.width - 2*globalSettings.artFrameWidth)/image.width
+        height: root.height
+        width: root.width
 
 
         asynchronous: true
         asynchronous: true
         fillMode: Image.PreserveAspectFit
         fillMode: Image.PreserveAspectFit
@@ -43,8 +30,8 @@ Rectangle {
         source: nativeUtils.imageCollection.data(modelIndex)
         source: nativeUtils.imageCollection.data(modelIndex)
 
 
         mirror: globalSettings.randomlyMirrorArt && (Math.random() < globalSettings.randomlyMirrorArtFreq)
         mirror: globalSettings.randomlyMirrorArt && (Math.random() < globalSettings.randomlyMirrorArtFreq)
-        smooth: globalSettings.smoothArt
-        mipmap: !globalSettings.smoothArt
+        smooth: true
+        mipmap: false
 
 
         sourceSize.height: height
         sourceSize.height: height
         sourceSize.width: width
         sourceSize.width: width