[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdeplasma-addons/plasma/luisgabriellima/weather-qml] applets/weather/package/contents/ui: Add top p
From: LuÃs_Gabriel_Lima <lampih () gmail ! com>
Date: 2012-07-21 20:06:57
Message-ID: 20120721200657.2706CA60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 841bdbcc45bf441b0d9b4fb53de3c19b4d1b211f by LuÃs Gabriel Lima.
Committed on 21/07/2012 at 01:07.
Pushed by luisgabriellima into branch 'plasma/luisgabriellima/weather-qml'.
Add top panel
For now the sizes, positions and displayed values are hard coded.
Signed-off-by: LuÃs Gabriel Lima <lampih@gmail.com>
M +83 -5 applets/weather/package/contents/ui/main.qml
http://commits.kde.org/kdeplasma-addons/841bdbcc45bf441b0d9b4fb53de3c19b4d1b211f
diff --git a/applets/weather/package/contents/ui/main.qml b/applets/weather/package/contents/ui/main.qml
index 2eb3e47..24d6abc 100644
--- a/applets/weather/package/contents/ui/main.qml
+++ b/applets/weather/package/contents/ui/main.qml
@@ -16,17 +16,95 @@
*/
import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.qtextracomponents 0.1 as QtExtraComponents
Item {
id: root
- property int minimumWidth: 200
- property int minimumHeight: 200
+ property int minimumWidth: 364
+ property int minimumHeight: 265
anchors.fill: parent
- Rectangle {
- color: "lightblue"
- anchors.fill: parent
+ PlasmaCore.FrameSvgItem {
+ id: panel
+ anchors {
+ top: parent.top
+ left: parent.left
+ right: parent.right
+ }
+ height: 56 // XXX
+ imagePath: "widgets/frame"
+ prefix: "plain"
+
+ QtExtraComponents.QIconItem {
+ icon: "weather-many-clouds" // XXX
+ height: parent.height // XXX
+ width: height
+ }
+
+ Text {
+ id: locationLabel
+ anchors {
+ top: parent.top
+ left: parent.left
+ topMargin: 5
+ leftMargin: 76
+ }
+ font.bold: true
+ text: "Porto Alegre, Brazil"
+
+ Component.onCompleted: font.pointSize = Math.floor(font.pointSize * 1.4);
+ }
+
+ Text {
+ id: conditionLabel
+ anchors {
+ top: locationLabel.bottom
+ left: locationLabel.left
+ topMargin: 5
+ }
+ text: "grey cloud"
+ }
+
+ Text {
+ id: tempLabel
+ anchors {
+ right: parent.right
+ top: locationLabel.top
+ rightMargin: 5
+ }
+ font: locationLabel.font
+ text: "22 °C"
+ }
+
+ Text {
+ id: forecastTempsLabel
+ anchors {
+ right: tempLabel.right
+ top: conditionLabel.top
+ }
+ font.pointSize: 8 // XXX
+ text: "H: 27 °C L: 21 °C"
+ }
+ }
+
+ PlasmaComponents.TabBar {
+ anchors {
+ top: panel.bottom
+ topMargin: 5
+ horizontalCenter: parent.horizontalCenter
+ }
+ width: 160 // XXX
+ height: 30 // XXX
+
+ PlasmaComponents.TabButton {
+ text: i18n("%1 Days").arg(3)
+ }
+ PlasmaComponents.TabButton {
+ text: i18n("Details")
+ }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic