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


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

The following commit has been merged in the master branch:
commit fca441760b05004a5b1f02b2d4a1597a9d71cca7
Author: Aleix Pol <aleixpol at kde.org>
Date:   Thu Apr 12 00:51:43 2012 +0200

    Simplify some bits of the chat plasmoid's code
    
    Simplify the ConversationDelegate by actually using a Button and a QItemWidget, don't deal with plasma themes directly for no reason (if there was, I didn't see it).
    Unify the checked state of the chat views. Now there's not the problem when you press "Esc" that the Chat disappeared but the button remained pressed.
    
    REVIEW: 104543
---
 .../contents/ui/ConversationDelegate.qml           | 84 ++++------------------
 1 file changed, 14 insertions(+), 70 deletions(-)

diff --git a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
index aa667b7..cdfff9e 100644
--- a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
+++ b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
@@ -1,61 +1,39 @@
 import QtQuick 1.1
-import org.kde.telepathy.chat 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
+import org.kde.qtextracomponents 0.1 as ExtraComponents
 
-Item {
-    id:base
+PlasmaComponents.Button {
+    id: base
     width: height
 
     property alias image: icon.icon
-    property alias text: icon.text
-    property bool pressed: false
-    property string overlayText: "0"
+    property alias overlayText: text.text
+    checkable: true
 
-    signal toggled
-
-    PlasmaCore.FrameSvgItem {
-        id: canvas
-
-        prefix: "normal"
-        imagePath: "widgets/tasks"
-        opacity: 1
-        anchors.fill: parent
-    }
-
-    PlasmaWidgets.IconWidget {
+    ExtraComponents.QIconItem {
         id: icon
-
-        anchors.fill: parent
-        anchors.margins: 5
-
-        orientation: Qt.Horizontal
+        anchors {
+            fill: parent
+            margins: 5
+        }
     }
 
-    Item {
-        id: notification
+    Rectangle {
         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
-        }
+        color: "red"
+        radius: 3
 
         Text {
             id: text
             anchors.fill: parent
 
             font.pixelSize: parent.height
-            text: base.overlayText
+            text: "0"
             color: "white"
 
             horizontalAlignment: Text.AlignHCenter
@@ -64,38 +42,4 @@ Item {
 
         visible: base.overlayText != "0"
     }
-
-    MouseArea {
-        id: mouse
-        anchors.fill: parent
-
-        hoverEnabled: true
-        preventStealing: true
-
-        onClicked: toggle();
-    }
-
-    function toggle() {
-        base.pressed = !base.pressed;
-        base.toggled();
-    }
-
-    states: [
-        State {
-            name: "pressed"
-            when: base.pressed
-            PropertyChanges {
-                target: canvas
-                prefix: "focus"
-            }
-        },
-        State {
-            name: "hover"
-            when: mouse.containsMouse
-            PropertyChanges {
-                target: canvas
-                prefix: "hover"
-            }
-        }
-    ]
 }
\ No newline at end of file

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list