[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:12:47 UTC 2016


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

The following commit has been merged in the master branch:
commit 3bccf082ffffaa891a75183af8d91025c83b63ba
Author: Lasath Fernando <kde at lasath.org>
Date:   Tue Dec 20 23:51:00 2011 +1100

    Further work on chat plasmoid
---
 chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml   |  13 ++-
 .../contents/ui/ConversationDelegate.qml           | 109 +++++++++++----------
 2 files changed, 65 insertions(+), 57 deletions(-)

diff --git a/chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml b/chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml
index 24231f3..a5286cf 100644
--- a/chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml
+++ b/chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml
@@ -64,10 +64,15 @@ Item {
     Item {
         id:chatArea
 
-        anchors.top: space.bottom
-        anchors.left: parent.left; anchors.right: parent.right
-        anchors.bottom: input.top
-        anchors.margins: 5
+        anchors {
+            top: space.bottom
+            left: parent.left
+            right: parent.right
+            bottom: input.top
+
+            leftMargin: 5
+            rightMargin: leftMargin
+        }
 
 //         PlasmaComponents.Highlight { anchors.fill: chatArea }
 
diff --git a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
index da0c4a8..5bc282b 100644
--- a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
+++ b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
@@ -1,10 +1,25 @@
-import Qt 4.7
+import QtQuick 1.1
 import org.kde.telepathy.declarativeplugins 0.1
 import org.kde.plasma.core 0.1 as PlasmaCore
 import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
 import org.kde.plasma.components 0.1 as PlasmaComponents
 
 Item {
+    id:base
+    width: height
+
+    property alias image: icon.icon
+    property alias text: icon.text
+    property bool pressed: false
+    property string overlayText: "0"
+
+    signal clicked
+
+//     Rectangle {
+//         anchors.fill: parent
+//         color: "blue"
+//     }
+
     PlasmaCore.FrameSvgItem {
         id: canvas
 
@@ -12,48 +27,50 @@ Item {
         imagePath: "widgets/tasks"
         opacity: 1
         anchors.fill: parent
-//         anchors.margins: 5
-    }
-//     height: icon.height + 10
-//     width: icon.width + 10
-    width: height
-
-    PlasmaCore.Dialog {
-        id: dialog
-        windowFlags: Qt.Dialog
-        mainItem: ChatWidget {
-            width: 250
-            height: 350
-            conv: model.conversation
-
-            onCloseRequested: mouse.popupApplet()
-        }
     }
 
     //ise listitem?
     PlasmaWidgets.IconWidget {
         id: icon
 //         text: model.conversation.target.nick
-        icon: model.conversation.target.presenceIcon
-//         anchors {
-//             top: parent.top
-//             bottom: parent.bottom
-// //             left: parent.left
-//         }
+//         icon: model.conversation.target.presenceIcon
+
         anchors.fill: parent
         anchors.margins: 5
-//         width: height
-
-//         size: "32x32"
-//         size: {
-//             console.log("height = " + parent.height);
-//             console.log("width = " + parent.width);
-//             return Qt.size(icon.height, icon.height);
-//         }
-//         Component.onCompleted: {
-//             console.log("height = " + parent.height);
-//             console.log("width = " + parent.width);
-//         }
+
+        orientation: Qt.Horizontal
+    }
+
+    Item {
+        id: notification
+        anchors {
+            right: parent.right
+            top: parent.top
+        }
+
+        width: parent.width / 3
+        height: parent.height / 3
+
+        Rectangle {
+            id: background
+            anchors.fill: parent
+            color: "red"
+            radius: 3
+        }
+
+        Text {
+            id: text
+            anchors.fill: parent
+
+            font.pixelSize: parent.height
+            text: base.overlayText
+            color: "white"
+
+            horizontalAlignment: Text.AlignHCenter
+            verticalAlignment: Text.AlignVCenter
+        }
+
+        visible: base.overlayText != "0"
     }
 
     MouseArea {
@@ -63,29 +80,15 @@ Item {
         hoverEnabled: true
 
         //move le onClicked into main
-        onClicked: popupApplet()
-        function popupApplet() {
-            if(dialog.visible == false) {
-                var point = dialog.popupPosition(icon, Qt.AlignBottom);
-                console.log("Showing dialog at (" + point.x + "," + point.y + ")");
-
-                dialog.x = point.x;
-                dialog.y = point.y;
-
-                dialog.visible = true;
-            } else {
-                console.log("height = " + dialog.height);
-                console.log("width = " + dialog.width);
-                dialog.visible = false;
-            }
-        }
+        onClicked: base.clicked()
+
+        preventStealing: true
     }
 
     states: [
         State {
             name: "focus"
-            //use property instead
-            when: dialog.visible
+            when: pressed
             PropertyChanges {
                 target: canvas
                 prefix: "focus"

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list