summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-09-23 15:52:26 (GMT)
committerAleix Pol <aleixpol@kde.org>2015-09-23 15:52:26 (GMT)
commit51d6c76f2e4c694880832d3d91f864adeb146ae1 (patch)
treeac910de3aca39fd6ab4a271e7df25d6d0b89bcfd
parentdf0d102a8d0379ead526b67a75f831387ae1d79e (diff)
Cosmetics
-rw-r--r--discover/qml/ApplicationsGridDelegate.qml6
-rw-r--r--discover/qml/ApplicationsList.qml24
-rw-r--r--discover/qml/CategoryDisplay.qml1
-rw-r--r--discover/qml/GridItem.qml4
-rw-r--r--discover/qml/LabelBackground.qml41
-rw-r--r--discover/qml/PresentUpdatesPage.qml20
-rw-r--r--discover/qml/Rating.qml2
-rw-r--r--discover/resources.qrc1
8 files changed, 71 insertions, 28 deletions
diff --git a/discover/qml/ApplicationsGridDelegate.qml b/discover/qml/ApplicationsGridDelegate.qml
index a15da76..7ae2559 100644
--- a/discover/qml/ApplicationsGridDelegate.qml
+++ b/discover/qml/ApplicationsGridDelegate.qml
@@ -38,7 +38,7 @@ GridItem {
id: artwork
color: sys.shadow
width: parent.width
- height: parent.height*0.7
+ height: parent.height*0.65
ConditionalLoader {
id: artworkConditional
@@ -96,6 +96,8 @@ GridItem {
RowLayout {
anchors {
topMargin: artwork.height+2
+ bottomMargin: 8
+ margins: 5
fill: parent
}
@@ -131,7 +133,7 @@ GridItem {
Rectangle {
id: indicator
- color: canUpgrade ? "#55f" : (isInstalled ? "#5f5" : "transparent")
+ color: canUpgrade ? "#337" : (isInstalled ? "#070" : "transparent")
height: 5
width: parent.width
anchors.bottom: parent.bottom
diff --git a/discover/qml/ApplicationsList.qml b/discover/qml/ApplicationsList.qml
index a006d91..e2635a2 100644
--- a/discover/qml/ApplicationsList.qml
+++ b/discover/qml/ApplicationsList.qml
@@ -123,33 +123,17 @@ ScrollView {
canUpgrade: false
visible: delegateArea.containsMouse
}
- SystemPalette {id: pal}
- Label {
+ LabelBackground {
id: installInfo
- anchors {
- verticalCenter: parent.verticalCenter
- centerIn: parent
- }
- text: "two GiB"
- visible: !delegateArea.containsMouse
- color: pal.highlightedText
- }
-
- Rectangle {
- anchors {
- fill: installInfo
- margins: -5
- }
+ anchors.centerIn: parent
visible: !delegateArea.containsMouse
- color: pal.highlight
- z: -1
- radius: 5
+ text: "two GiB"
}
}
Rectangle {
id: indicator
- color: canUpgrade ? "#55f" : isInstalled && view.model.stateFilter!=2 ? "#5f5" : "transparent"
+ color: canUpgrade ? "#337" : isInstalled && view.model.stateFilter!=2 ? "#070" : "transparent"
width: 5
height: parent.height
anchors.right: parent.right
diff --git a/discover/qml/CategoryDisplay.qml b/discover/qml/CategoryDisplay.qml
index 199ec1b..e228bbb 100644
--- a/discover/qml/CategoryDisplay.qml
+++ b/discover/qml/CategoryDisplay.qml
@@ -49,6 +49,7 @@ Item
right: parent.right
topMargin: categories.titleHeight-2
}
+ hoverEnabled: false
GridView {
id: grid
anchors.fill: parent
diff --git a/discover/qml/GridItem.qml b/discover/qml/GridItem.qml
index c34dd1a..b16b857 100644
--- a/discover/qml/GridItem.qml
+++ b/discover/qml/GridItem.qml
@@ -28,7 +28,6 @@ MouseArea {
property int internalMargin: 5
-
hoverEnabled: true
SystemPalette {
@@ -36,9 +35,10 @@ MouseArea {
}
Rectangle {
anchors.fill: parent
- color: listItem.containsMouse || listItem.pressed ? palette.button : palette.midlight
+ color: listItem.containsMouse || listItem.pressed ? palette.highlight : palette.button
border.color: palette.mid
border.width: 2
+ opacity: 0.4
}
Item {
diff --git a/discover/qml/LabelBackground.qml b/discover/qml/LabelBackground.qml
new file mode 100644
index 0000000..a201f01
--- /dev/null
+++ b/discover/qml/LabelBackground.qml
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library/Lesser General Public License
+ * version 2, or (at your option) any later version, as published by the
+ * Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details
+ *
+ * You should have received a copy of the GNU Library/Lesser General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+import QtQuick 2.1
+import QtQuick.Controls 1.1
+import QtQuick.Layouts 1.1
+
+Rectangle
+{
+ property alias text: theLabel.text
+ color: pal.highlight
+ radius: 5
+ width: theLabel.implicitWidth + 10
+ height: theLabel.implicitHeight + 10
+
+ SystemPalette {
+ id: pal
+ }
+
+ Label {
+ id: theLabel
+ anchors.centerIn: parent
+ color: pal.highlightedText
+ }
+}
diff --git a/discover/qml/PresentUpdatesPage.qml b/discover/qml/PresentUpdatesPage.qml
index 40fb4fc..032c583 100644
--- a/discover/qml/PresentUpdatesPage.qml
+++ b/discover/qml/PresentUpdatesPage.qml
@@ -22,23 +22,33 @@ ScrollView
GridItem {
Layout.fillWidth: true
height: 50
+ hoverEnabled: false
ConditionalLoader {
anchors {
left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
+ margins: 10
}
condition: resourcesUpdatesModel.isProgressing
componentFalse: RowLayout {
+ LabelBackground {
+ anchors.verticalCenter: parent.verticalCenter
+ text: updateModel.toUpdateCount
+ }
Label {
anchors.verticalCenter: parent.verticalCenter
- text: i18n("%1 updates", updateModel.toUpdateCount)
+ text: i18n("updates selected")
+ }
+ LabelBackground {
+ anchors.verticalCenter: parent.verticalCenter
+ text: (updateModel.totalUpdatesCount - updateModel.toUpdateCount)
}
Label {
anchors.verticalCenter: parent.verticalCenter
- text: i18n("%1 updates disabled", (updateModel.totalUpdatesCount - updateModel.toUpdateCount))
+ text: i18n("updates not selected")
}
Item { Layout.fillWidth: true}
Button {
@@ -97,9 +107,13 @@ ScrollView
Label {
id: label
Layout.fillWidth: true
- text: i18n("%1 (%2) - %3", display, version, size)
+ text: i18n("%1 (%2)", display, version)
elide: Text.ElideRight
}
+
+ LabelBackground {
+ text: size
+ }
}
}
}
diff --git a/discover/qml/Rating.qml b/discover/qml/Rating.qml
index 5227cda..4ecf68c 100644
--- a/discover/qml/Rating.qml
+++ b/discover/qml/Rating.qml
@@ -30,9 +30,9 @@ Item {
clip: true
height: (width/5)-theRow.spacing
width: 20*5
+
Row {
id: theRow
- spacing: 1
height: parent.height
anchors.right: parent.right
diff --git a/discover/resources.qrc b/discover/resources.qrc
index 016a016..9184cee 100644
--- a/discover/resources.qrc
+++ b/discover/resources.qrc
@@ -40,6 +40,7 @@
<file>qml/MuonToolbar.qml</file>
<file>qml/ApplicationDetails.qml</file>
<file>qml/ApplicationScreenshots.qml</file>
+ <file>qml/LabelBackground.qml</file>
<file>qml/navigation.js</file>
</qresource>