summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-14 01:38:32 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-14 01:38:32 +0200
commit7991a01b9526056d7a8ef199868902bde85001ae (patch)
tree7cf1b3ee9383d080980c8547bfa2784a11a809ec
parent758cec1a767c056aaf9da36fd411cdf4a8fba32e (diff)
downloadsowatch-7991a01b9526056d7a8ef199868902bde85001ae.tar.gz
sowatch-7991a01b9526056d7a8ef199868902bde85001ae.zip
fixing the qmsg watchlet
-rw-r--r--qmsgwatchlet/metawatch-digital.qml31
-rw-r--r--qmsgwatchlet/qmsgwatchlet.cpp2
-rw-r--r--qmsgwatchlet/qmsgwatchlet.h2
-rw-r--r--sowatch.pro2
4 files changed, 28 insertions, 9 deletions
diff --git a/qmsgwatchlet/metawatch-digital.qml b/qmsgwatchlet/metawatch-digital.qml
index 43c6e1f..e5e999f 100644
--- a/qmsgwatchlet/metawatch-digital.qml
+++ b/qmsgwatchlet/metawatch-digital.qml
@@ -18,6 +18,7 @@ MWPage {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
+ clip: true
model: MessageModel {
sortBy: MessageModel.Timestamp
sortOrder: MessageModel.DescendingOrder
@@ -36,22 +37,33 @@ MWPage {
limit: 20
}
delegate: Rectangle {
+ id: msgDelegate
property bool selected: ListView.isCurrentItem
- width: list.width
+ width: parent.width
height: childrenRect.height
color: ListView.isCurrentItem ? "black" : "white"
- Text {
- width: 96
- text: "<b>" + sender + "</b><br>" + subject
- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
- color: parent.selected ? "white" : "black"
+ Column {
+ width: parent.width
+ MWLabel {
+ width: parent.width
+ text: sender
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ color: msgDelegate.selected ? "white" : "black"
+ font.pointSize: 12
+ }
+ MWLabel {
+ width: parent.width
+ text: subject
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ color: msgDelegate.selected ? "white" : "black"
+ }
}
}
}
Connections {
target: watch
- onButtonPressed : {
+ onButtonPressed: {
switch (button) {
case 1:
list.scrollUp();
@@ -61,5 +73,10 @@ MWPage {
break;
}
}
+ onActiveChanged: {
+ if (watch.active) {
+ list.scrollTop();
+ }
+ }
}
}
diff --git a/qmsgwatchlet/qmsgwatchlet.cpp b/qmsgwatchlet/qmsgwatchlet.cpp
index 35a99d8..7111c81 100644
--- a/qmsgwatchlet/qmsgwatchlet.cpp
+++ b/qmsgwatchlet/qmsgwatchlet.cpp
@@ -1,3 +1,5 @@
+#include <QtCore/QDebug>
+
#include "qmsgwatchlet.h"
QTM_USE_NAMESPACE
diff --git a/qmsgwatchlet/qmsgwatchlet.h b/qmsgwatchlet/qmsgwatchlet.h
index c2de7ec..6fa331c 100644
--- a/qmsgwatchlet/qmsgwatchlet.h
+++ b/qmsgwatchlet/qmsgwatchlet.h
@@ -14,7 +14,7 @@ public:
explicit QMsgWatchlet(WatchServer* server);
private:
- QTM_PREPEND_NAMESPACE(QMessageService) _qms;
+ QtMobility::QMessageService *_qms;
};
}
diff --git a/sowatch.pro b/sowatch.pro
index 460fcfb..b5eabdc 100644
--- a/sowatch.pro
+++ b/sowatch.pro
@@ -9,7 +9,7 @@ metawatch.depends = libsowatch
# Some watchlets
SUBDIRS += notificationswatchlet sysinfowatchlet
-#SUBDIRS += qmsgwatchlet
+SUBDIRS += qmsgwatchlet
SUBDIRS += qmapwatchlet
notificationswatchlet.depends = libsowatch
sysinfowatchlet.depends = libsowatch