[Pkg-privacy-commits] [tails-installer] 149/210: Add separators into the image list
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:39 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 20f431b792da8363ea95e84e8d4f83a8098b4788
Author: Martin Briza <mbriza at redhat.com>
Date: Wed Sep 2 16:07:53 2015 +0200
Add separators into the image list
---
liveusb/components/Arrow.qml | 2 +-
liveusb/components/DelegateImage.qml | 103 ++++++++++++++++++++++++
liveusb/components/DelegateImageSeparator.qml | 45 +++++++++++
liveusb/components/ImageList.qml | 110 +-------------------------
liveusb/gui.py | 4 +
liveusb/releases.py | 33 +++++---
6 files changed, 177 insertions(+), 120 deletions(-)
diff --git a/liveusb/components/Arrow.qml b/liveusb/components/Arrow.qml
index 7f0a710..5e911b3 100644
--- a/liveusb/components/Arrow.qml
+++ b/liveusb/components/Arrow.qml
@@ -1,7 +1,7 @@
import QtQuick 2.4
Item {
- height: 10
+ height: $(10)
width: height / 2
clip: true
property color color: "black"
diff --git a/liveusb/components/DelegateImage.qml b/liveusb/components/DelegateImage.qml
new file mode 100644
index 0000000..8e8ddd9
--- /dev/null
+++ b/liveusb/components/DelegateImage.qml
@@ -0,0 +1,103 @@
+import QtQuick 2.0
+
+Item {
+ width: parent.width
+ height: $(84)
+ Rectangle {
+ width: parent.width - $(2)
+ height: index == 0 ? parent.height - $(1) : parent.height
+ x: $(1)
+ y: index == 0 ? $(1) : 0
+ radius: $(4)
+ color: "transparent"
+ IndicatedImage {
+ id: iconRect
+ anchors {
+ top: parent.top
+ left: parent.left
+ bottom: parent.bottom
+ leftMargin: $(32)
+ topMargin: $(16)
+ bottomMargin: anchors.topMargin
+ }
+ width: height
+ smooth: true
+ fillMode: Image.PreserveAspectFit
+
+ source: release.logo
+ }
+ Item {
+ id: textRect
+ anchors {
+ verticalCenter: parent.verticalCenter
+ left: iconRect.right
+ right: arrow.left
+ bottom: parent.bottom
+ leftMargin: $(28)
+ rightMargin: $(14)
+ }
+ Text {
+ font.pointSize: $(9)
+ text: release.name
+ anchors {
+ bottom: parent.verticalCenter
+ left: parent.left
+ bottomMargin: $(2)
+ }
+ // font.weight: Font.Bold
+ }
+ Text {
+ font.pointSize: $(9)
+ text: release.summary
+ anchors {
+ top: parent.verticalCenter
+ left: parent.left
+ right: parent.right
+ topMargin: $(2)
+ }
+ wrapMode: Text.Wrap
+ color: "#a1a1a1"
+ // font.weight: Font.Bold
+ }
+ }
+ Arrow {
+ id: arrow
+ visible: !release.isLocal
+ scale: $(1)
+ anchors {
+ verticalCenter: parent.verticalCenter
+ right: parent.right
+ rightMargin: $(20)
+ }
+ }
+ Rectangle {
+ height: 1
+ color: "#c3c3c3"
+ width: parent.width
+ anchors.bottom: parent.bottom
+ }
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ onHoveredChanged: {
+ if (containsMouse && !pressed)
+ parent.color = "#f8f8f8"
+ if (!containsMouse)
+ parent.color = "transparent"
+ }
+ onClicked: {
+ root.currentIndex = index
+ root.stepForward(release.index)
+ }
+ onPressed: {
+ parent.color = "#ededed"
+ }
+ onReleased: {
+ parent.color = "transparent"
+ }
+ onCanceled: {
+ parent.color = "transparent"
+ }
+ }
+ }
+}
diff --git a/liveusb/components/DelegateImageSeparator.qml b/liveusb/components/DelegateImageSeparator.qml
new file mode 100644
index 0000000..e61ceb8
--- /dev/null
+++ b/liveusb/components/DelegateImageSeparator.qml
@@ -0,0 +1,45 @@
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+
+Rectangle {
+ id: root
+
+ color: "#12000000"
+ width: parent.width
+ height: $(32)
+ Behavior on height {
+ NumberAnimation {
+ duration: 60
+ }
+ }
+
+ RowLayout {
+ anchors.fill: parent
+ anchors.leftMargin: 32
+ spacing: 12
+ Text {
+ Layout.alignment: Qt.AlignVCenter
+ font.pointSize: $(9)
+ text: release.name
+ }
+ Text {
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignVCenter
+ text: release.summary
+ font.pointSize: $(9)
+ color: "#707070"
+ Behavior on opacity {
+ NumberAnimation {
+ duration: 60
+ }
+ }
+ }
+ }
+ Rectangle {
+ height: 1
+ color: "#c3c3c3"
+ width: parent.width
+ anchors.bottom: parent.bottom
+ }
+}
+
diff --git a/liveusb/components/ImageList.qml b/liveusb/components/ImageList.qml
index 7d9f911..cc71b63 100644
--- a/liveusb/components/ImageList.qml
+++ b/liveusb/components/ImageList.qml
@@ -249,7 +249,10 @@ Item {
}
model: liveUSBData.releaseProxyModel
- delegate: imageDelegate
+ delegate: Loader {
+ width: parent.width
+ source: release.isSeparator ? "DelegateImageSeparator.qml" : "DelegateImage.qml"
+ }
remove: Transition {
NumberAnimation { properties: "x"; to: width; duration: 300 }
@@ -289,109 +292,4 @@ Item {
minimumHandleLength: $(10)
}
}
-
- Component {
- id: imageDelegate
- Item {
- width: parent.width
- height: $(84)
- Rectangle {
- width: parent.width - 2
- height: index == 0 ? parent.height - 1 : parent.height
- x: 1
- y: index == 0 ? 1 : 0
- radius: $(4)
- color: "transparent"
- IndicatedImage {
- id: iconRect
- anchors {
- top: parent.top
- left: parent.left
- bottom: parent.bottom
- leftMargin: $(32)
- topMargin: $(16)
- bottomMargin: anchors.topMargin
- }
- width: height
- smooth: true
- fillMode: Image.PreserveAspectFit
-
- source: release.logo
- }
- Item {
- id: textRect
- anchors {
- verticalCenter: parent.verticalCenter
- left: iconRect.right
- right: arrow.left
- bottom: parent.bottom
- leftMargin: $(28)
- rightMargin: $(14)
- }
- Text {
- font.pointSize: $(9)
- text: release.name
- anchors {
- bottom: parent.verticalCenter
- left: parent.left
- bottomMargin: $(2)
- }
- // font.weight: Font.Bold
- }
- Text {
- font.pointSize: $(9)
- text: release.summary
- anchors {
- top: parent.verticalCenter
- left: parent.left
- right: parent.right
- topMargin: $(2)
- }
- wrapMode: Text.Wrap
- color: "#a1a1a1"
- // font.weight: Font.Bold
- }
- }
- Arrow {
- id: arrow
- visible: !release.isLocal
- scale: $(1)
- anchors {
- verticalCenter: parent.verticalCenter
- right: parent.right
- rightMargin: $(20)
- }
- }
- Rectangle {
- height: 1
- color: "#c3c3c3"
- width: parent.width
- anchors.bottom: parent.bottom
- }
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- onHoveredChanged: {
- if (containsMouse && !pressed)
- parent.color = "#f8f8f8"
- if (!containsMouse)
- parent.color = "transparent"
- }
- onClicked: {
- root.currentIndex = index
- root.stepForward(release.index)
- }
- onPressed: {
- parent.color = "#ededed"
- }
- onReleased: {
- parent.color = "transparent"
- }
- onCanceled: {
- parent.color = "transparent"
- }
- }
- }
- }
- }
}
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 5e69815..1e60ec9 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -518,6 +518,10 @@ class Release(QObject):
def index(self):
return self._index
+ @pyqtProperty(bool, constant=True)
+ def isSeparator(self):
+ return self._data['source'] == ''
+
@pyqtProperty(str, constant=True)
def name(self):
return self._data['name']
diff --git a/liveusb/releases.py b/liveusb/releases.py
index a8c8417..ce96b8c 100644
--- a/liveusb/releases.py
+++ b/liveusb/releases.py
@@ -115,19 +115,19 @@ def getSpinDetails(url, source):
spin['logo'] = 'qrc:/soas_icon.png'
if 'Astronomy' in spin['name']:
- spin['logo'] = 'qrc:/astronomy_icon_green.png'
+ spin['logo'] = 'qrc:/astronomy_icon_grey.png'
if 'Design' in spin['name']:
- spin['logo'] = 'qrc:/design-suite_icon_green.png'
+ spin['logo'] = 'qrc:/design-suite_icon_grey.png'
if 'Games' in spin['name']:
- spin['logo'] = 'qrc:/games_icon_green.png'
+ spin['logo'] = 'qrc:/games_icon_grey.png'
if 'Jam' in spin['name']:
- spin['logo'] = 'qrc:/jam_icon_green.png'
+ spin['logo'] = 'qrc:/jam_icon_grey.png'
if 'Robotics' in spin['name']:
- spin['logo'] = 'qrc:/robotics-suite_icon_green.png'
+ spin['logo'] = 'qrc:/robotics-suite_icon_grey.png'
if 'Scientific' in spin['name']:
- spin['logo'] = 'qrc:/scientific_icon_green.png'
+ spin['logo'] = 'qrc:/scientific_icon_grey.png'
if 'Security' in spin['name']:
- spin['logo'] = 'qrc:/security-lab_icon_green.png'
+ spin['logo'] = 'qrc:/security-lab_icon_grey.png'
return spin
@@ -135,6 +135,11 @@ def getSpins(url, source):
d = pyquery.PyQuery(urlread(url))
spins = []
+ if source == 'Spins':
+ spins.append({'releaseDate': '', 'source': '', 'name': 'Fedora ' + source, 'logo': '', 'description': '', 'screenshots': '', 'variants': {}, 'summary': 'Alternative desktops for Fedora'})
+ elif source == 'Labs':
+ spins.append({'releaseDate': '', 'source': '', 'name': 'Fedora ' + source, 'logo': '', 'description': '', 'screenshots': '', 'variants': {}, 'summary': 'Functional bundles for Fedora'})
+
for i in d('div').filter('.high').items('span'):
spinUrl = url + i.siblings()('a').attr('href')
spin = getSpinDetails(spinUrl, source)
@@ -297,17 +302,19 @@ fedora_releases = [
{'releaseDate': '', 'source': 'Local', 'name': u'Custom OS...', 'logo': 'qrc:/icon-folder.svg', 'variants': {'': {'url': '', 'sha256': '', 'size': 0}}, 'summary': u'Pick a file from your drive(s)', 'screenshots': [], 'description': u'Here you can choose a OS image from your hard drive to be written to your flash disk'},
{'releaseDate': '', 'source': 'Workstation', 'name': 'Fedora Workstation', 'logo': 'qrc:/logo-color-workstation.png', 'description': "<p>Fedora Workstation is a reliable, user-friendly, and powerful operating system for your laptop or desktop computer. It supports a wide range of developers, from hobbyists and students to professionals in corporate environments.</p>\n <blockquote><p>“The plethora of tools provided by Fedora allows me to get the job done. It just works.R [...]
{'releaseDate': '', 'source': 'Server', 'name': 'Fedora Server', 'logo': 'qrc:/logo-color-server.png', 'description': "<blockquote><p>“The simplicity introduced with rolekit and cockpit have made server deployments a breeze. What took me a few days on other operating systems took less than an hour with Fedora 22 Server. It just works.”</p>\n <p align=right> \xe2\x80\x95 <em>Dan Mossor, Systems Engineer</em></p></blockquote><p>Fedora Server is a powerful, flexible o [...]
+{'releaseDate': '', 'source': '', 'name': 'Fedora Spins', 'logo': '', 'description': '', 'screenshots': '', 'variants': {'x86_64': {}, 'i686': {}, 'armv7hl': {}}, 'summary': 'Alternative desktops for Fedora'},
{'releaseDate': '', 'source': 'Spins', 'name': 'Fedora KDE Plasma Desktop', 'logo': 'qrc:/kde_icon.png', 'description': u'<p>The Fedora KDE Plasma Desktop Edition is a powerful Fedora-based operating system utilizing the KDE Plasma Desktop as the main user interface.</p><p>Fedora KDE Plasma Desktop comes with many pre-selected top quality applications that suit all modern desktop use cases - from online communication like web browsing, instant messaging and electronic mail correspondence [...]
{'releaseDate': '', 'source': 'Spins', 'name': 'Fedora Xfce Desktop', 'logo': 'qrc:/xfce_icon.png', 'description': u'<p>The Fedora Xfce spin showcases the Xfce desktop, which aims to be fast and lightweight, while still being visually appealing and user friendly.</p><p>Fedora Xfce is a full-fledged desktop using the freedesktop.org standard.</p>', 'screenshots': ['http://spins.fedoraproject.org/en/xfce/../static/images/screenshots/screenshot-xfce.jpg'], 'variants': {'x86_64': {'url': 'ht [...]
{'releaseDate': '', 'source': 'Spins', 'name': 'Fedora LXDE Desktop', 'logo': 'qrc:/lxde_icon.png', 'description': u'<p>LXDE, the "Lightweight X11 Desktop Environment", is an extremely fast, performant, and energy-saving desktop environment. It maintained by an international community of developers and comes with a beautiful interface, multi-language support, standard keyboard shortcuts and additional features like tabbed file browsing.</p><p>LXDE is not designed to be powerful and bloat [...]
{'releaseDate': '', 'source': 'Spins', 'name': 'Fedora MATE-Compiz Desktop', 'logo': 'qrc:/mate_icon.png', 'description': u'<p>The MATE Compiz spin bundles MATE Desktop with Compiz Fusion. MATE Desktop is a lightweight, powerful Desktop designed with productivity and performance in mind. The default windows manager is Marco which is usable for all machines and VMs. Compiz Fusion is a beautiful 3D windowing manager with Emerald and GTK theming.</p><p>If you want a powerful, lightweight Fe [...]
{'releaseDate': '', 'source': 'Spins', 'name': 'Fedora SoaS Desktop', 'logo': 'qrc:/soas_icon.png', 'description': u'<p>Sugar on a Stick is a Fedora-based operating system featuring the award-winning Sugar Learning Platform and designed to fit on an ordinary USB thumbdrive ("stick").</p><p>Sugar sets aside the traditional \u201coffice-desktop\u201d metaphor, presenting a child-friendly graphical environment. Sugar automatically saves your progress to a "Journal" on your stick, so teacher [...]
-{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Design Suite', 'logo': 'qrc:/design-suite_icon_green.png', 'description': u'<p>Looking for a ready-to-go desktop environment brimming with free and open source multimedia production and publishing tools? Try the Design Suite, a Fedora Spin created by designers, for designers.</p><p>The Design Suite includes the favorite tools of the Fedora Design Team. These are the same programs we use to create all the artwork that you see within th [...]
-{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Games', 'logo': 'qrc:/games_icon_green.png', 'description': u"<p>The Fedora Games spin offers a perfect showcase of the best games available in Fedora. The included games span several genres, from first-person shooters to real-time and turn-based strategy games to puzzle games.</p><p>Not all the games available in Fedora are included on this spin, but trying out this spin will give you a fair impression of Fedora's ability to run grea [...]
-{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Jam', 'logo': 'qrc:/jam_icon_green.png', 'description': u'<p>Fedora Jam is for audio enthusiasts and musicians who want to create, edit and produce audio and music on Linux. It comes with Jack, ALSA and Pulseaudio by default including a suite of programs to tailor your studio.</p><p>Fedora Jam is a full-featured audio creation spin. It includes all the tools needed to help create the music you want, anything from classical to jazz to [...]
-{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Robotics Suite', 'logo': 'qrc:/robotics-suite_icon_green.png', 'description': u'<p>The Fedora Robotics spin provides a wide variety of free and open robotics software packages. These range from hardware accessory libraries for the Hokuyo laser scanners or Katana robotic arm to software frameworks like Fawkes or Player and simulation environments such as Stage and RoboCup Soccer Simulation Server 2D/3D. It also provides a ready to use [...]
-{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Scientific', 'logo': 'qrc:/scientific_icon_green.png', 'description': u'<p>Wary of reinstalling all the essential tools for your scientific and numerical work? The answer is here. Fedora Scientific Spin brings together the most useful open source scientific and numerical tools atop the goodness of the KDE desktop environment.</p><p>Fedora Scientific currently ships with numerous applications and libraries. These range from libraries s [...]
-{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Security Lab', 'logo': 'qrc:/security-lab_icon_green.png', 'description': u'<p>The Fedora Security Lab provides a safe test environment to work on security auditing, forensics, system rescue and teaching security testing methodologies in universities and other organizations.</p><p>The spin is maintained by a community of security testers and developers. It comes with the clean and fast Xfce Desktop Environment and a customized menu th [...]
+{'releaseDate': '', 'source': '', 'name': 'Fedora Labs', 'logo': '', 'description': '', 'screenshots': '', 'variants': {'x86_64': {}, 'i686': {}, 'armv7hl': {}}, 'summary': 'Functional bundles for Fedora'},
+{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Design Suite', 'logo': 'qrc:/design-suite_icon_grey.png', 'description': u'<p>Looking for a ready-to-go desktop environment brimming with free and open source multimedia production and publishing tools? Try the Design Suite, a Fedora Spin created by designers, for designers.</p><p>The Design Suite includes the favorite tools of the Fedora Design Team. These are the same programs we use to create all the artwork that you see within the [...]
+{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Games', 'logo': 'qrc:/games_icon_grey.png', 'description': u"<p>The Fedora Games spin offers a perfect showcase of the best games available in Fedora. The included games span several genres, from first-person shooters to real-time and turn-based strategy games to puzzle games.</p><p>Not all the games available in Fedora are included on this spin, but trying out this spin will give you a fair impression of Fedora's ability to run great [...]
+{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Jam', 'logo': 'qrc:/jam_icon_grey.png', 'description': u'<p>Fedora Jam is for audio enthusiasts and musicians who want to create, edit and produce audio and music on Linux. It comes with Jack, ALSA and Pulseaudio by default including a suite of programs to tailor your studio.</p><p>Fedora Jam is a full-featured audio creation spin. It includes all the tools needed to help create the music you want, anything from classical to jazz to H [...]
+{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Robotics Suite', 'logo': 'qrc:/robotics-suite_icon_grey.png', 'description': u'<p>The Fedora Robotics spin provides a wide variety of free and open robotics software packages. These range from hardware accessory libraries for the Hokuyo laser scanners or Katana robotic arm to software frameworks like Fawkes or Player and simulation environments such as Stage and RoboCup Soccer Simulation Server 2D/3D. It also provides a ready to use d [...]
+{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Scientific', 'logo': 'qrc:/scientific_icon_grey.png', 'description': u'<p>Wary of reinstalling all the essential tools for your scientific and numerical work? The answer is here. Fedora Scientific Spin brings together the most useful open source scientific and numerical tools atop the goodness of the KDE desktop environment.</p><p>Fedora Scientific currently ships with numerous applications and libraries. These range from libraries su [...]
+{'releaseDate': '', 'source': 'Labs', 'name': 'Fedora Security Lab', 'logo': 'qrc:/security-lab_icon_grey.png', 'description': u'<p>The Fedora Security Lab provides a safe test environment to work on security auditing, forensics, system rescue and teaching security testing methodologies in universities and other organizations.</p><p>The spin is maintained by a community of security testers and developers. It comes with the clean and fast Xfce Desktop Environment and a customized menu tha [...]
releases = fedora_releases
--
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