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

List:       kde-commits
Subject:    KDE/kdepim/mobile
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2010-12-09 10:25:05
Message-ID: 20101209102505.693A2AC8A5 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1204849 by tokoe:

Port attachment flap to ReorderList


 M  +10 -1     lib/ActionButton.qml  
 M  +17 -24    mail/AttachmentEditor.qml  
 M  +4 -0      mail/CMakeLists.txt  
 AM            mail/add-attachment-button.png  
 AM            mail/remove-attachment-button.png  
 AM            mail/toggle-encryption-button.png  
 AM            mail/toggle-signature-button.png  


--- trunk/KDE/kdepim/mobile/lib/ActionButton.qml #1204848:1204849
@@ -36,5 +36,14 @@
   enabled: action.enabled
   opacity: enabled ? 1 : 0.65
 
-  onClicked : { action.triggered( true ) }
+  onClicked : { action.trigger() }
+
+  QML.Connections {
+    target : action
+    onChanged : {
+      border.width = action.checked ? 2 : 0
 }
+  }
+
+  border.width : action.checked ? 2 : 0
+}
--- trunk/KDE/kdepim/mobile/mail/AttachmentEditor.qml #1204848:1204849
@@ -22,17 +22,10 @@
 import Qt 4.7
 import org.kde.pim.mobileui 4.5 as KPIM
 
-Item {
+KPIM.ReorderListContainer {
   width: 600
 
-  KPIM.DecoratedListView {
-    id: attachmentListView
-    anchors.top: parent.top
-    anchors.left: parent.left
-    anchors.bottom: parent.bottom
-    width: parent.width / 2
     model: attachmentModel
-    clip: true
 
     delegate: Item {
       id: wrapper
@@ -83,25 +76,25 @@
       }
     }
 
-    onCurrentIndexChanged : {
-      attachmentEditor.setRowSelected( currentIndex )
+  onCurrentIndexChanged : { attachmentEditor.setRowSelected( index ) }
+
+  KPIM.ActionButton {
+    icon : KDE.locate( "data", "kmail-mobile/add-attachment-button.png" )
+    actionName : "attach"
     }
+
+  KPIM.ActionButton {
+    icon : KDE.locate( "data", "kmail-mobile/remove-attachment-button.png" )
+    actionName : "remove"
   }
 
-  KPIM.ActionMenuContainer {
-    id : actionColumn
-    anchors.top : parent.top
-    anchors.bottom : parent.bottom
-    anchors.right : parent.right
-    actionItemWidth : width
-    actionItemHeight : 70
-    width: parent.width/2
+  KPIM.ActionButton {
+    icon : KDE.locate( "data", "kmail-mobile/toggle-signature-button.png" )
+    actionName : "toggle_attachment_signed"
+  }
 
-    content : [
-      KPIM.ActionListItem { name : "attach" },
-      KPIM.ActionListItem { name : "remove" },
-      KPIM.ActionListItem { name : "toggle_attachment_signed" },
-      KPIM.ActionListItem { name : "toggle_attachment_encrypted" }
-    ]
+  KPIM.ActionButton {
+    icon : KDE.locate( "data", "kmail-mobile/toggle-encryption-button.png" )
+    actionName : "toggle_attachment_encrypted"
   }
 }
--- trunk/KDE/kdepim/mobile/mail/CMakeLists.txt #1204848:1204849
@@ -125,6 +125,10 @@
   SnippetsEditor.qml
   SnippetsList.qml
   VacationScriptIndicator.qml
+  add-attachment-button.png
+  remove-attachment-button.png
+  toggle-signature-button.png
+  toggle-encryption-button.png
   DESTINATION ${DATA_INSTALL_DIR}/kmail-mobile
 )
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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