qmlfrontend: tweak map preview a little in an attempt to buy back unC0Rr's <3 qmlfrontend
authorsheepluva
Sun, 01 May 2016 15:58:19 +0200
branchqmlfrontend
changeset 11791 0aa4b3d02cba
parent 11704 83c40c1eb0e7
child 11792 bcba7938ccb5
qmlfrontend: tweak map preview a little in an attempt to buy back unC0Rr's <3
qmlFrontend/qml/qmlFrontend/GameConfig.qml
qmlFrontend/qmlFrontend.qrc
qmlFrontend/res/prevBg.png
--- a/qmlFrontend/qml/qmlFrontend/GameConfig.qml	Mon Apr 25 22:10:06 2016 +0300
+++ b/qmlFrontend/qml/qmlFrontend/GameConfig.qml	Sun May 01 15:58:19 2016 +0200
@@ -8,24 +8,53 @@
 
     HWButton {
         id: btnPreview
-        width: 256
-        height: 128
+        // this, as well as the positions of images, seems to have the border thickness (3px) into account
+        width: 262
+        height: 134
 
         onClicked: HWEngine.getPreview()
 
         Connections {
             target: HWEngine
-            onPreviewImageChanged: previewImage.source = "image://preview/image"
-            onPreviewIsRendering: previewImage.source = "qrc:/res/iconTime.png"
+            onPreviewImageChanged: {
+                previewImage.visible = true
+                previewImage.source = "image://preview/image"
+                previewWaitImage.visible = false
+            }
+            onPreviewIsRendering: {
+                previewImage.source = ""
+                previewImage.visible = false
+                previewWaitImage.visible = true
+            }
+        }
+
+        Image {
+            id: previewBackground
+            x: 3
+            y: 3
+            width: 256
+            height: 128
+            cache: true
+            source: "qrc:/res/prevBg.png"
         }
 
         Image {
             id: previewImage
-            x: 0
-            y: 0
+            x: 3
+            y: 3
             width: 256
             height: 128
             cache: false
+            source: ""
+        }
+
+        Image {
+            id: previewWaitImage
+            x: 117
+            y: 53
+            width: 26
+            height: 26
+            cache: true
             source: "qrc:/res/iconTime.png"
         }
     }
--- a/qmlFrontend/qmlFrontend.qrc	Mon Apr 25 22:10:06 2016 +0300
+++ b/qmlFrontend/qmlFrontend.qrc	Sun May 01 15:58:19 2016 +0200
@@ -12,5 +12,6 @@
         <file>qml/qmlFrontend/Lobby.qml</file>
         <file>qml/qmlFrontend/Multiplayer.qml</file>
         <file>res/iconTime.png</file>
+        <file>res/prevBg.png</file>
     </qresource>
 </RCC>
Binary file qmlFrontend/res/prevBg.png has changed