[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim/mobile
From:       Artur Duque de Souza <asouza () kde ! org>
Date:       2010-11-30 23:09:57
Message-ID: 20101130230957.F3286AC8A3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1202459 by asouza:

AttachmentList needs a proper size when previewing images

In one of the states we had this comment:

"limited by SlideoutPanel to maximum width anyway"

that right now is not entirely true (SlideoutPanel does not limit the size).

The effect of this was that the requested width of '1000' was
being used and made the panel bigger than needed.

There is still the issue of not expanding the panel properly that
will be fixed in another commit.

Please note that flicking the image does not work horizontally
due to SlideoutPanel's nature of also being flickable in this
direction. The only way of solving this would be to do something
along the lines of calendar/time widgets where we have a dialog
and disable the drag capability of the panel.

CCBUG: 256758


 M  +2 -1      lib/AttachmentList.qml  
 M  +8 -1      mail/kmail-mobile.qml  


--- trunk/KDE/kdepim/mobile/lib/AttachmentList.qml #1202458:1202459
@@ -32,6 +32,7 @@
   property int attachmentListWidth: 300
   property int actionListWidth: 240
   property int requestedWidth: attachmentListWidth
+  property bool requestWidth: true
 
   /** Emittted when an attachment has been selected. */
   signal openAttachment(string url, string mimeType)
@@ -184,7 +185,7 @@
       name: "previewState"
       when: (attachmentListView.currentIndex >= 0 && attachmentListView.currentIndex \
< model.attachmentCount) && attachmentListView.currentMimeType.indexOf( "image" ) == \
0  PropertyChanges { target: previewView; visible: true }
-      PropertyChanges { target: _attachmentList; requestedWidth: 1000 } // limited \
by SlideoutPanel to maximum width anyway +      PropertyChanges { target: \
_attachmentList; requestWidth: false; }  }
   ]
 
--- trunk/KDE/kdepim/mobile/mail/kmail-mobile.qml #1202458:1202459
@@ -475,7 +475,6 @@
       titleIcon: KDE.iconPath( "mail-attachment", 48 );
       handlePosition: actionPanel.handleHeight + actionPanel.handlePosition
       handleHeight: parent.height - actionPanel.handlePosition - \
                actionPanel.handleHeight - anchors.topMargin - anchors.bottomMargin
-      contentWidth: attachmentView.requestedWidth
       content: [
         KPIM.AttachmentList {
           id: attachmentView
@@ -491,8 +490,16 @@
           }
         }
       ]
+
+      states: [
+        QML.State {
+          name: "useRequestedWidth"
+          when: attachmentView.requestWidth
+          QML.PropertyChanges { target: attachmentPanel; contentWidth: \
attachmentView.requestedWidth; }  }
+      ]
   }
+  }
 
   QML.Loader {
     anchors.fill: parent


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic