[Pkg-privacy-commits] [tails-installer] 174/210: Fix image scaling

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:26:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 3.90.0
in repository tails-installer.

commit 7b9a156bb7203ed1237bbf9265ffaf984ee5b31d
Author: Martin Briza <mbriza at redhat.com>
Date:   Tue Sep 15 14:11:59 2015 +0200

    Fix image scaling
---
 liveusb/components/DownloadDialog.qml | 4 ++--
 liveusb/components/ImageDetails.qml   | 5 +++--
 liveusb/components/IndicatedImage.qml | 3 ++-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/liveusb/components/DownloadDialog.qml b/liveusb/components/DownloadDialog.qml
index cf7092a..1a89bad 100644
--- a/liveusb/components/DownloadDialog.qml
+++ b/liveusb/components/DownloadDialog.qml
@@ -180,8 +180,8 @@ Dialog {
                         spacing: $(32)
                         IndicatedImage {
                             source: liveUSBData.currentImage.logo
-                            width: $(64)
-                            height: $(64)
+                            Layout.preferredWidth: $(64)
+                            Layout.preferredHeight: $(64)
                             fillMode: Image.PreserveAspectFit
                         }
                         Arrow {
diff --git a/liveusb/components/ImageDetails.qml b/liveusb/components/ImageDetails.qml
index 6877286..cd441c3 100644
--- a/liveusb/components/ImageDetails.qml
+++ b/liveusb/components/ImageDetails.qml
@@ -155,7 +155,7 @@ Item {
                                 }
                                 Text {
                                     font.pixelSize: $(12)
-                                    text: qsTranslate("", "<font color=\"gray\">Selected:</font> %1").arg(liveUSBData.currentImage.path ? (((String)(liveUSBData.currentImage.path)).split("/").slice(-1)[0]) : qsTranslate("", "<font color=\"gray\">None</font>"))
+                                    text: "<font color=\"gray\">" + qsTranslate("", "Selected:") + "</font> " + (liveUSBData.currentImage.path ? (((String)(liveUSBData.currentImage.path)).split("/").slice(-1)[0]) : ("<font color=\"gray\">" + qsTranslate("", "None") + "</font>"))
                                 }
                             }
                         }
@@ -173,10 +173,11 @@ Item {
                     id: screenshotRepeater
                     model: liveUSBData.currentImage.screenshots
                     IndicatedImage {
+                        cache: false
                         Layout.fillWidth: true
+                        Layout.preferredHeight: width / sourceSize.width * sourceSize.height
                         fillMode: Image.PreserveAspectFit
                         source: modelData
-                        sourceSize.width: width
                     }
                 }
             }
diff --git a/liveusb/components/IndicatedImage.qml b/liveusb/components/IndicatedImage.qml
index a3239e5..2018819 100644
--- a/liveusb/components/IndicatedImage.qml
+++ b/liveusb/components/IndicatedImage.qml
@@ -1,8 +1,9 @@
-import QtQuick 2.0
+import QtQuick 2.4
 import QtQuick.Controls 1.2
 
 Image {
     id: root
+    smooth: false
     Rectangle {
         anchors.fill: parent
         opacity: parent.status == Image.Ready ? 0 : 1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list