[Pkg-privacy-commits] [tails-installer] 11/30: Implement a custom ProgressBar
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:27:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to tag 3.92.0
in repository tails-installer.
commit d3f5ab4466cea54531397aae9caeadd07e910d43
Author: Martin Bříza <m at rtinbriza.cz>
Date: Tue Apr 5 15:30:43 2016 +0200
Implement a custom ProgressBar
Seems the 5.6 one doesn't really update its value very good
---
liveusb/components/AdwaitaProgressBar.qml | 62 ++++++++++++++++---------------
1 file changed, 33 insertions(+), 29 deletions(-)
diff --git a/liveusb/components/AdwaitaProgressBar.qml b/liveusb/components/AdwaitaProgressBar.qml
index 877d3da..46bf646 100644
--- a/liveusb/components/AdwaitaProgressBar.qml
+++ b/liveusb/components/AdwaitaProgressBar.qml
@@ -2,39 +2,43 @@ import QtQuick 2.0
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
-ProgressBar {
+Rectangle {
id: root
- width: $(100)
- height: $(6)
property color progressColor: "#54aada"
property color backgroundColor: "#c3c3c3"
- style: ProgressBarStyle {
- background: Rectangle {
- height: $(6)
- border {
- color: "#777777"
- width: $(1)
- }
- radius: $(3)
- clip: true
- gradient: Gradient {
- GradientStop { position: 0.0; color: Qt.lighter(root.backgroundColor, 1.05) }
- GradientStop { position: 1.0; color: Qt.darker(root.backgroundColor, 1.05) }
- }
+ property real maximumValue: 1.0
+ property real minimumValue: 0.0
+ property real value: 0
+
+ width: $(100)
+ height: $(6)
+
+ border {
+ color: "#777777"
+ width: $(1)
+ }
+ radius: $(3)
+ clip: true
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter(root.backgroundColor, 1.05) }
+ GradientStop { position: 1.0; color: Qt.darker(root.backgroundColor, 1.05) }
+ }
+
+ Rectangle {
+ clip: true
+ y: $(0.5)
+ x: $(0.5)
+ height: $(5)
+ width: (root.value - root.minimumValue) / (root.maximumValue - root.minimumValue) * parent.width;
+ border {
+ color: "#777777"
+ width: $(1)
}
- progress: Rectangle {
- clip: true
- height: $(4)
- border {
- color: "#777777"
- width: $(1)
- }
- radius: $(3)
- gradient: Gradient {
- GradientStop { position: 0.0; color: Qt.lighter(root.progressColor, 1.05) }
- GradientStop { position: 0.9; color: root.progressColor }
- GradientStop { position: 1.0; color: Qt.darker(root.progressColor) }
- }
+ radius: $(3)
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.lighter(root.progressColor, 1.05) }
+ GradientStop { position: 0.9; color: root.progressColor }
+ GradientStop { position: 1.0; color: Qt.darker(root.progressColor) }
}
}
}
--
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