[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:19:14 UTC 2016


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

The following commit has been merged in the master branch:
commit 6cd629e3c38a847074a86421011866b19c1e3c16
Author: Aleix Pol <aleixpol at kde.org>
Date:   Sun Apr 13 15:11:16 2014 +0200

    Make sure the contact list works fine on Plasma2
---
 .../contents/ui/ContactList.qml                    | 31 ++++++++++++----------
 .../contents/ui/ListContactDelegate.qml            |  2 --
 .../org.kde.ktp-contactlist/contents/ui/main.qml   | 19 +++++--------
 3 files changed, 24 insertions(+), 28 deletions(-)

diff --git a/contactlist/org.kde.ktp-contactlist/contents/ui/ContactList.qml b/contactlist/org.kde.ktp-contactlist/contents/ui/ContactList.qml
index 1eba304..564338d 100644
--- a/contactlist/org.kde.ktp-contactlist/contents/ui/ContactList.qml
+++ b/contactlist/org.kde.ktp-contactlist/contents/ui/ContactList.qml
@@ -18,14 +18,24 @@
  ***************************************************************************/
 
 import QtQuick 2.1
+import QtQuick.Layouts 1.1
 import org.kde.telepathy 0.1 as KTp
 import org.kde.plasma.components 2.0 as PlasmaComponents
 import org.kde.plasma.extras 2.0 as PlasmaExtras
-
+import org.kde.plasma.plasmoid 2.0
 
 Item {
-    id: contactListContainer
-    anchors.fill: parent
+    id: root
+    Layout.minimumHeight: delegateHeight*3
+    Layout.minimumWidth: 100
+    height: delegateHeight*10
+    width: 300
+    property real delegateHeight: Math.ceil(theme.mSize(theme.defaultFont).height*2)
+
+    onVisibleChanged: {
+        if (visible)
+            filterLineEdit.forceActiveFocus();
+    }
 
     PlasmaComponents.TextField {
         id: filterLineEdit
@@ -70,20 +80,13 @@ Item {
 
             boundsBehavior: Flickable.StopAtBounds
 
-            delegate: ListContactDelegate {}
+            delegate: ListContactDelegate {
+                height: root.delegateHeight
+            }
 
             highlight: PlasmaComponents.Highlight {
-                hover: contactList.focus
+                hover: contactsList.focus
             }
         }
     }
-
-    function popupEventSlot(shown) {
-        if (shown)
-            filterLineEdit.forceActiveFocus();
-    }
-
-    Component.onCompleted: {
-        plasmoid.popupEvent.connect(popupEventSlot);
-    }
 }
diff --git a/contactlist/org.kde.ktp-contactlist/contents/ui/ListContactDelegate.qml b/contactlist/org.kde.ktp-contactlist/contents/ui/ListContactDelegate.qml
index b4c1e11..7fd4188 100644
--- a/contactlist/org.kde.ktp-contactlist/contents/ui/ListContactDelegate.qml
+++ b/contactlist/org.kde.ktp-contactlist/contents/ui/ListContactDelegate.qml
@@ -26,8 +26,6 @@ PlasmaComponents.ListItem {
     id: delegate
     enabled: true
 
-    height: Math.ceil(nickLabel.height*1.5)
-
     onClicked: telepathyManager.startChat(model.account, model.contact, "org.freedesktop.Telepathy.Client.KTp.chatPlasmoid")
 
     ExtraComponents.QPixmapItem {
diff --git a/contactlist/org.kde.ktp-contactlist/contents/ui/main.qml b/contactlist/org.kde.ktp-contactlist/contents/ui/main.qml
index 2787820..a1a377e 100644
--- a/contactlist/org.kde.ktp-contactlist/contents/ui/main.qml
+++ b/contactlist/org.kde.ktp-contactlist/contents/ui/main.qml
@@ -1,5 +1,6 @@
 /***************************************************************************
  *   Copyright (C) 2011 by Francesco Nwokeka <francesco.nwokeka at gmail.com> *
+ *   Copyright (C) 2014 by Aleix Pol Gonzalez <aleixpol at kde.org>           *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -19,22 +20,16 @@
 
 import QtQuick 2.1
 import org.kde.telepathy 0.1 as KTp
+import org.kde.plasma.plasmoid 2.0
 
+QtObject
+{
+    Plasmoid.switchWidth: 200
+    Plasmoid.switchHeight: 300
 
-Item {
-    id: main;
-
-    property int minimumWidth: 200
-    property int minimumHeight: 300
-
-    ContactList {
-        id: contactList
-        anchors.fill: parent
-    }
+    Plasmoid.fullRepresentation: ContactList {}
 
     Component.onCompleted: {
-        plasmoid.aspectRatioMode = IgnoreAspectRatio;
-
         telepathyManager.addContactListFeatures();
         telepathyManager.becomeReady();
     }

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list