Browse Source

Get frame working correctly

Change-Id: I2f2c2868f05afd343a0cb1df03c4b234fdcf1b67
Donald Carr 5 years ago
parent
commit
05d1b74ed9
2 changed files with 7 additions and 4 deletions
  1. 6 3
      qml/common/ArtImage.qml
  2. 1 1
      qml/main.qml

+ 6 - 3
qml/common/ArtImage.qml

@@ -21,18 +21,21 @@ Rectangle {
         cache: false
         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/image.width
+        scale: (root.width - 2*globalSettings.artFrameWidth)/image.width
 
         asynchronous: true
         fillMode: Image.PreserveAspectFit

+ 1 - 1
qml/main.qml

@@ -85,7 +85,7 @@ Item {
         property int columnCount: 8
         property int interval: 5
         property int itemLimit: -1
-        property int artFrameWidth: 1
+        property int artFrameWidth: 2
 
         property string effect: ""
         property string artView: "Trivial"