[Pkg-privacy-commits] [tails-installer] 55/210: In case there's not enough space on screen for the dialog, show a scrollbar

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:26:27 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 0ee464d8f31541f77960c6d0602f5a5c9a059a86
Author: Martin Briza <mbriza at redhat.com>
Date:   Wed Apr 8 10:49:07 2015 +0200

    In case there's not enough space on screen for the dialog, show a scrollbar
---
 liveusb/components/DownloadDialog.qml | 275 ++++++++++++++++++----------------
 1 file changed, 142 insertions(+), 133 deletions(-)

diff --git a/liveusb/components/DownloadDialog.qml b/liveusb/components/DownloadDialog.qml
index 306b1e1..0fda216 100644
--- a/liveusb/components/DownloadDialog.qml
+++ b/liveusb/components/DownloadDialog.qml
@@ -14,155 +14,164 @@ Dialog {
     width: 640
 
     contentItem: Rectangle {
+        id: contentWrapper
         anchors.fill: parent
         color: palette.window
-        Column {
-            id: layout
-            spacing: 24
-            clip: true
-            anchors {
-                top: parent.top
-                left: parent.left
-                right: parent.right
-                topMargin: 32
-                leftMargin: 48
-                rightMargin: anchors.leftMargin
-            }
-            Column {
-                id: infoColumn
-                spacing: 4
-                width: parent.width
+        ScrollView {
+            anchors.fill: parent
+            horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
+            contentItem: Item {
+                width: contentWrapper.width
+                height: layout.height + 32
+                Column {
+                    id: layout
+                    spacing: 24
+                    clip: true
+                    anchors {
+                        top: parent.top
+                        left: parent.left
+                        right: parent.right
+                        topMargin: 32
+                        leftMargin: 48
+                        rightMargin: anchors.leftMargin
+                    }
+                    Column {
+                        id: infoColumn
+                        spacing: 4
+                        width: parent.width
 
-                Repeater {
-                    model: liveUSBData.currentImage.warning
-                    RowLayout {
-                        width: infoColumn.width
-                        spacing: 8
-                        Text {
-                            Layout.fillHeight: true
-                            verticalAlignment: Text.AlignVCenter
-                            color: "red"
-                            text: "!"
-                            font.pointSize: 14
+                        Repeater {
+                            model: liveUSBData.currentImage.warning
+                            RowLayout {
+                                width: infoColumn.width
+                                spacing: 8
+                                Text {
+                                    Layout.fillHeight: true
+                                    verticalAlignment: Text.AlignVCenter
+                                    color: "red"
+                                    text: "!"
+                                    font.pointSize: 14
+                                }
+                                Text {
+                                    Layout.fillHeight: true
+                                    Layout.fillWidth: true
+                                    verticalAlignment: Text.AlignVCenter
+                                    wrapMode: Text.Wrap
+                                    text: liveUSBData.currentImage.warning[index]
+                                }
+                            }
                         }
-                        Text {
-                            Layout.fillHeight: true
-                            Layout.fillWidth: true
-                            verticalAlignment: Text.AlignVCenter
-                            wrapMode: Text.Wrap
-                            text: liveUSBData.currentImage.warning[index]
+
+                        Repeater {
+                            model: liveUSBData.currentImage.info
+                            RowLayout {
+                                width:  infoColumn.width
+                                spacing: 8
+                                // a rotated exclamation mark instead of an 'i' as for information - that's funny, right... right?!
+                                Text {
+                                    Layout.fillHeight: true
+                                    verticalAlignment: Text.AlignVCenter
+                                    color: "blue"
+                                    text: "!"
+                                    rotation: 180
+                                    font.pointSize: 14
+                                }
+                                Text {
+                                    Layout.fillHeight: true
+                                    Layout.fillWidth: true
+                                    verticalAlignment: Text.AlignVCenter
+                                    wrapMode: Text.Wrap
+                                    text: liveUSBData.currentImage.info[index]
+                                }
+                            }
                         }
                     }
-                }
 
-                Repeater {
-                    model: liveUSBData.currentImage.info
-                    RowLayout {
-                        width:  infoColumn.width
-                        spacing: 8
-                        // a rotated exclamation mark instead of an 'i' as for information - that's funny, right... right?!
-                        Text {
-                            Layout.fillHeight: true
-                            verticalAlignment: Text.AlignVCenter
-                            color: "blue"
-                            text: "!"
-                            rotation: 180
-                            font.pointSize: 14
+                    ColumnLayout {
+                        width: parent.width
+                        Behavior on y {
+                            NumberAnimation {
+                                duration: 1000
+                            }
                         }
+
                         Text {
+                            Layout.fillWidth: true
                             Layout.fillHeight: true
+                            horizontalAlignment: Text.AlignHCenter
+                            property double leftSize: liveUSBData.currentImage.download.maxProgress - liveUSBData.currentImage.download.progress
+                            property string leftStr: leftSize <= 0 ? "" :
+                                                     (leftSize < 1024) ? (leftSize + " B") :
+                                                     (leftSize < (1024 * 1024)) ? ((leftSize / 1024).toFixed(1) + " KB") :
+                                                     (leftSize < (1024 * 1024 * 1024)) ? ((leftSize / 1024 / 1024).toFixed(1) + " MB") :
+                                                     ((leftSize / 1024 / 1024 / 1024).toFixed(1) + " GB")
+                            text: liveUSBData.currentImage.status + (liveUSBData.currentImage.download.maxProgress > 0 ? " (" + leftStr + " left)" : "")
+                        }
+                        Item {
                             Layout.fillWidth: true
-                            verticalAlignment: Text.AlignVCenter
-                            wrapMode: Text.Wrap
-                            text: liveUSBData.currentImage.info[index]
+                            height: childrenRect.height
+                            AdwaitaProgressBar {
+                                width: parent.width
+                                value: liveUSBData.currentImage.download.running ? liveUSBData.currentImage.download.progress / liveUSBData.currentImage.download.maxProgress : 0
+                                visible: !liveUSBData.currentImage.writer.running
+                            }
+                            AdwaitaProgressBar {
+                                width: parent.width
+                                value: liveUSBData.currentImage.writer.running ? liveUSBData.currentImage.writer.progress / liveUSBData.currentImage.writer.maxProgress : 0
+                                visible: !liveUSBData.currentImage.download.running
+                                progressColor: liveUSBData.currentImage.writer.status == "Checking the source image" ? Qt.lighter("green") : "red"
+                            }
                         }
                     }
-                }
-            }
 
-            ColumnLayout {
-                width: parent.width
-                Behavior on y {
-                    NumberAnimation {
-                        duration: 1000
-                    }
-                }
-
-                Text {
-                    Layout.fillWidth: true
-                    Layout.fillHeight: true
-                    horizontalAlignment: Text.AlignHCenter
-                    property double leftSize: liveUSBData.currentImage.download.maxProgress - liveUSBData.currentImage.download.progress
-                    property string leftStr: leftSize <= 0 ? "" :
-                                             (leftSize < 1024) ? (leftSize + " B") :
-                                             (leftSize < (1024 * 1024)) ? ((leftSize / 1024).toFixed(1) + " KB") :
-                                             (leftSize < (1024 * 1024 * 1024)) ? ((leftSize / 1024 / 1024).toFixed(1) + " MB") :
-                                             ((leftSize / 1024 / 1024 / 1024).toFixed(1) + " GB")
-                    text: liveUSBData.currentImage.status + (liveUSBData.currentImage.download.maxProgress > 0 ? " (" + leftStr + " left)" : "")
-                }
-                Item {
-                    Layout.fillWidth: true
-                    height: childrenRect.height
-                    AdwaitaProgressBar {
-                        width: parent.width
-                        value: liveUSBData.currentImage.download.running ? liveUSBData.currentImage.download.progress / liveUSBData.currentImage.download.maxProgress : 0
-                        visible: !liveUSBData.currentImage.writer.running
-                    }
-                    AdwaitaProgressBar {
-                        width: parent.width
-                        value: liveUSBData.currentImage.writer.running ? liveUSBData.currentImage.writer.progress / liveUSBData.currentImage.writer.maxProgress : 0
-                        visible: !liveUSBData.currentImage.download.running
-                        progressColor: liveUSBData.currentImage.writer.status == "Checking the source image" ? Qt.lighter("green") : "red"
-                    }
-                }
-            }
-
-            RowLayout {
-                anchors.horizontalCenter: parent.horizontalCenter
-                spacing: 32
-                IndicatedImage {
-                    source: liveUSBData.currentImage.logo
-                    sourceSize.width: 64
-                    sourceSize.height: 64
-                    fillMode: Image.PreserveAspectFit
-                }
-                Arrow {
+                    RowLayout {
+                        anchors.horizontalCenter: parent.horizontalCenter
+                        spacing: 32
+                        IndicatedImage {
+                            source: liveUSBData.currentImage.logo
+                            sourceSize.width: 64
+                            sourceSize.height: 64
+                            fillMode: Image.PreserveAspectFit
+                        }
+                        Arrow {
 
-                }
-                AdwaitaComboBox {
-                    Layout.preferredWidth: implicitWidth * 2.3
-                    model: liveUSBData.usbDriveNames
-                    currentIndex: liveUSBData.currentDrive
-                    onCurrentIndexChanged: {
-                        acceptButton.pressedOnce = false
-                        liveUSBData.currentDrive = currentIndex
+                        }
+                        AdwaitaComboBox {
+                            Layout.preferredWidth: implicitWidth * 2.3
+                            model: liveUSBData.usbDriveNames
+                            currentIndex: liveUSBData.currentDrive
+                            onCurrentIndexChanged: {
+                                acceptButton.pressedOnce = false
+                                liveUSBData.currentDrive = currentIndex
+                            }
+                            enabled: !liveUSBData.currentImage.writer.running
+                        }
                     }
-                    enabled: !liveUSBData.currentImage.writer.running
-                }
-            }
-            Item {
-                width: group.width
-                height: group.height + group.y
-                GroupBox {
-                    id: group
-                    y: 8
-                    title: "Show Advanced Options"
-                    flat: true
-                    checked: false
-                    checkable: true
-                    enabled: liveUSBData.optionNames && liveUSBData.optionNames[0]
-                    ColumnLayout {
-                        Repeater {
-                            id: groupLayoutRepeater
-                            model: group.checked ? liveUSBData.optionValues : null
-                            CheckBox {
-                                checked: liveUSBData.optionValues[index]
-                                height: 20
-                                width: 20
-                                text: liveUSBData.optionNames[index]
-                                onClicked: {
-                                    acceptButton.pressedOnce = false
-                                    liveUSBData.setOption(index, checked)
+                    Item {
+                        width: group.width
+                        height: group.height + group.y
+                        GroupBox {
+                            id: group
+                            y: 8
+                            title: "Show Advanced Options"
+                            flat: true
+                            checked: false
+                            checkable: true
+                            enabled: liveUSBData.optionNames && liveUSBData.optionNames[0]
+                            ColumnLayout {
+                                Repeater {
+                                    id: groupLayoutRepeater
+                                    model: group.checked ? liveUSBData.optionValues : null
+                                    CheckBox {
+                                        checked: liveUSBData.optionValues[index]
+                                        height: 20
+                                        width: 20
+                                        text: liveUSBData.optionNames[index]
+                                        onClicked: {
+                                            acceptButton.pressedOnce = false
+                                            liveUSBData.setOption(index, checked)
+                                        }
+                                    }
                                 }
                             }
                         }

-- 
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