[SCM] ktp-contact-applet packaging branch, master, updated. debian/15.12.1-1-966-gde83ac5

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:11:21 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=7e5021d

The following commit has been merged in the master branch:
commit 7e5021d5c1d72b15634520265b60ab71be2cff26
Author: Francesco Nwokeka <francesco.nwokeka at gmail.com>
Date:   Thu Jul 28 16:28:53 2011 +0200

    ADD: toolbar with buttons to switch view
    
    these buttons are not connected yet
---
 package/contents/ui/ContactList.qml                | 42 +++++++++++++++++++---
 .../ui/{ContactDisplayName.qml => ToolBar.qml}     | 32 +++++++++++------
 2 files changed, 58 insertions(+), 16 deletions(-)

diff --git a/package/contents/ui/ContactList.qml b/package/contents/ui/ContactList.qml
index b9847fe..8fd5823 100644
--- a/package/contents/ui/ContactList.qml
+++ b/package/contents/ui/ContactList.qml
@@ -24,7 +24,7 @@ import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
 import org.kde.telepathy.declarativeplugins 0.1 as TelepathyDeclarative
 
 /// TODO
-// - button to switch views
+// - connect buttons in toolbar to switch view
 // - (after above) animation from list to grid
 // - add bar @ the bottom for gridview (hidden in list view)
 // - get contact list to load nepomuk:/bla/foo/bar images as contact avatars
@@ -35,10 +35,41 @@ Item {
     id: contactListContainer;
     anchors.fill: parent;
 
+    // TOOLBAR
+    ToolBar {
+        id: toolbar;
+        height: 20;
+
+        anchors {
+            top: parent;
+            left: parent.left;
+            right: parent.right;
+        }
+    }
+
+    // TOP SEPARATOR
+    PlasmaWidgets.Separator {
+        id: topSeparator;
+        anchors {
+            top: toolbar.bottom;
+            topMargin: 5;
+            left: parent.left;
+            right:parent.right;
+        }
+    }
+
     // LISTVIEW
     ListView {
         id: contactsList;
-        anchors.fill: parent;
+
+        anchors {
+            top: topSeparator.bottom;
+            topMargin: 5;
+            left: parent.left;
+            right: parent.right;
+            bottom: parent.bottom;
+        }
+
         clip: true;
         model: TelepathyDeclarative.ContactListModel{}
 
@@ -53,12 +84,13 @@ Item {
         id: contactsGrid;
         boundsBehavior: Flickable.StopAtBounds;
         clip: true;
-        height: parent.height - 30;
+
         anchors {
-            top: parent.top;
+            top: topSeparator.bottom;
             left: parent.left;
             right: parent.right;
-            margins: 5;
+            bottom: parent.bottom;
+            bottomMargin: 20;
         }
 
         model: TelepathyDeclarative.ContactListModel{}
diff --git a/package/contents/ui/ContactDisplayName.qml b/package/contents/ui/ToolBar.qml
similarity index 77%
copy from package/contents/ui/ContactDisplayName.qml
copy to package/contents/ui/ToolBar.qml
index 854e5d6..e351b7a 100644
--- a/package/contents/ui/ContactDisplayName.qml
+++ b/package/contents/ui/ToolBar.qml
@@ -17,21 +17,31 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
  ***************************************************************************/
 
-/*
-  This component is used ONLY by the contactlist in GRID view mode. It
-  displays the contact display name when a contact is hovered over.
-*/
-
 import Qt 4.7
-//import org.kde.plasma.core 0.1 as PlasmaCore
 import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
 
 Item {
-    property string nickToShow;
 
-    PlasmaWidgets.Label {
-        id: idLabel;
-        text: nickToShow;
-        anchors.fill: parent;
+    PlasmaWidgets.IconWidget {
+        id: listViewButton;
+
+        height: 22;
+        width: 22;
+        icon: QIcon("view-list-details");
+
+        anchors.left: parent.left;
+    }
+
+    PlasmaWidgets.IconWidget {
+        id: gridViewButton;
+
+        height: 22;
+        width: 22;
+        icon: QIcon("view-list-icons");
+
+        anchors {
+            left: listViewButton.right;
+            leftMargin: 2;
+        }
     }
 }

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list