[meego-packaging] 4837: Changes to Trunk:Handset/meego-handset-sms

build at meego.com build at meego.com
Thu Jun 24 14:54:29 PDT 2010


Hi,
I have made the following changes to meego-handset-sms in project Trunk:Handset. Please review and accept ASAP.

Thank You,
-

[This message was auto-generated]

---

Request #4837:

  submit:   devel:ux:handset/meego-handset-sms(r7) -> Trunk:Handset/meego-handset-sms


Message:
    fix BMC 3425: conversation screen, contacts obscured by text entry, BMC 3390: can not see contact avatars

State:   new          2010-06-24T09:51:39 ekuo
Comment: None



changes files:
--------------
--- meego-handset-sms.changes
+++ meego-handset-sms.changes
@@ -0,0 +1,3 @@
+* Thu Jun 24 2010 Emma Kuo <emma.kuo at intel.com> 0.0.16
+- fix BMC 3425: conversation screen, contacts obscured by text entry
+- fix BMC 3390: can not see contact avatars

old:
----
  meego-handset-sms-0.0.15.tar.bz2

new:
----
  meego-handset-sms-0.0.16.tar.bz2

spec files:
-----------
--- meego-handset-sms.spec
+++ meego-handset-sms.spec
@@ -7,7 +7,7 @@
 
 Name:       meego-handset-sms
 Summary:    MeeGo Touch Framework based SMS Application
-Version:    0.0.15
+Version:    0.0.16
 Release:    1
 Group:      System/GUI/Other
 License:    LGPL v2.1

other changes:
--------------

++++++ meego-handset-sms-0.0.15.tar.bz2 -> meego-handset-sms-0.0.16.tar.bz2
--- src/backend.cpp
+++ src/backend.cpp
@@ -110,11 +110,13 @@
 
 QPixmap Backend::getAvatar(QString phone)
 {
-    QPixmap photo;
+    const QPixmap *photo;
     if (mAvatarindex.contains(phone)) {
-        photo.load("/usr/share/themes/base/meegotouch/libseaside/images/" + mAvatarindex[phone]);
+        //qDebug() << "avatar:" << mAvatarindex[phone];
+        photo = MTheme::pixmap(mAvatarindex[phone], QSize(56, 56));
     } else {
-        photo.load(THEMEDIR"images/meego-default-avatar.png");
+        //qDebug() << "avatar not found";
+        photo = MTheme::pixmap("icon-m-content-avatar-placeholder", QSize(56, 56));
     }
 
     // create alpha mask
@@ -129,22 +131,22 @@
 
     // scale/crop photo
     qreal x, y, w, h;
-    if (photo.width() > photo.height()) {
-        x = (photo.width() - photo.height()) / 2.0;
-        w = photo.height();
+    if (photo->width() > photo->height()) {
+        x = (photo->width() - photo->height()) / 2.0;
+        w = photo->height();
         y = 0.0;
-        h = photo.height();
+        h = photo->height();
     } else {
-        y = (photo.height() - photo.width()) / 2.0;
-        h = photo.width();
+        y = (photo->height() - photo->width()) / 2.0;
+        h = photo->width();
         x = 0.0;
-        w = photo.width();
+        w = photo->width();
     }
     QImage tmp(56, 56, QImage::Format_ARGB32_Premultiplied);
     QPainter tmppainter(&tmp);
     //tmppainter.setRenderHint(QPainter::Antialiasing, true);
     tmppainter.setCompositionMode(QPainter::CompositionMode_Source);
-    tmppainter.drawPixmap(tmp.rect(), photo, QRectF(x, y, w, h));
+    tmppainter.drawPixmap(tmp.rect(), *photo, QRectF(x, y, w, h));
 
     // mask photo
     tmppainter.setCompositionMode(QPainter::CompositionMode_DestinationIn);
--- src/dialogpage.cpp
+++ src/dialogpage.cpp
@@ -95,6 +95,7 @@
         contactsList->setItemModel(mContactFilterModel);
         mContactsViewport->setObjectName("contactsViewport");
         mContactsViewport->setWidget(contactsList);
+        mContactsViewport->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
         connect(contactsList, SIGNAL(itemClicked(const QModelIndex&)), this, SLOT(contactItemClicked(const QModelIndex&)));
     }
 
@@ -150,6 +151,7 @@
         mDialogList->setCellCreator(new DialogItemCreator());
         mDialogViewport->setObjectName("dialogViewport");
         mDialogViewport->setWidget(mDialogList);
+        mDialogViewport->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
     }
 
     mConversationPolicy->addItem(mDialogViewport);
@@ -177,33 +179,6 @@
 void DialogPage::createContent()
 {}
 
-void DialogPage::resizeEvent(QGraphicsSceneResizeEvent *event)
-{
-    MApplicationPage::resizeEvent(event);
-    // hack to work around contactsViewport not resizing correctly
-    QTimer::singleShot(20, this, SLOT(resizeViewport()));
-}
-
-void DialogPage::resizeViewport()
-{
-    qreal contactSearchBarHeight = mContactSearchBar->size().height();
-    qreal textEntryBarHeight = mTextEntryBar->size().height();
-    qreal dialogViewportHeight = size().height()
-        - centralWidget()->geometry().top()
-        - textEntryBarHeight;
-    qreal contactsViewportHeight = size().height()
-        - centralWidget()->geometry().top()
-        - contactSearchBarHeight
-        - textEntryBarHeight;
-
-    mDialogViewport->setMinimumHeight(dialogViewportHeight);
-    mDialogViewport->setMaximumHeight(dialogViewportHeight);
-    mDialogViewport->setPreferredHeight(dialogViewportHeight);
-    mContactsViewport->setMinimumHeight(contactsViewportHeight);
-    mContactsViewport->setMaximumHeight(contactsViewportHeight);
-    mContactsViewport->setPreferredHeight(contactsViewportHeight);
-}
-
 void DialogPage::setDialogMode(QString phone)
 {
     mPhone = canonicalizePhone(phone);
@@ -221,8 +196,6 @@
     mModel = new DialogItemModel(mBackend, mPhone);
     mDialogList->setItemModel(mModel);
     connect(mModel, SIGNAL(dataUpdated()), this, SLOT(scrollToBottom()));
-    // hack to work around dialogViewport not resizing correctly
-    QTimer::singleShot(20, this, SLOT(resizeViewport()));
     mLayout->setPolicy(mConversationPolicy);
 }
 
--- src/dialogpage.h
+++ src/dialogpage.h
@@ -48,7 +48,6 @@
 signals:
         void deleteThread(QString);
 private slots:
-        void resizeViewport();
         void setDialogMode(QString phone);
         void deleteActionTriggered();
         void textChanged();
@@ -56,8 +55,6 @@
         void scrollToBottom();
         void customizedComplete(const QString&);
         void contactItemClicked(const QModelIndex&);
-protected:
-        void resizeEvent(QGraphicsSceneResizeEvent *event);
 private:
         Backend *mBackend;
         DialogItemModel *mModel;

++++++ meego-handset-sms.yaml
--- meego-handset-sms.yaml
+++ meego-handset-sms.yaml
@@ -1,6 +1,6 @@
 Name: meego-handset-sms
 Summary: MeeGo Touch Framework based SMS Application
-Version: 0.0.15
+Version: 0.0.16
 Release: 1
 Group: System/GUI/Other
 License: LGPL v2.1


More information about the Meego-packaging mailing list