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


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

The following commit has been merged in the master branch:
commit 3699fc9d4259b15f092d094463f17d22a35126c7
Author: Aleix Pol <aleixpol at kde.org>
Date:   Fri Oct 31 17:34:19 2014 +0100

    Make the plasmoid integrate better in the panel by using the taskbar look
---
 .../contents/ui/ConversationDelegate.qml           |  3 +-
 .../contents/ui/ConversationDelegateButton.qml     | 57 ++++++++++++++++++----
 2 files changed, 49 insertions(+), 11 deletions(-)

diff --git a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
index 5bf8b9e..9165f5f 100644
--- a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
+++ b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
@@ -33,6 +33,7 @@ ConversationDelegateButton {
     account: model.conversation.account
     contact: model.conversation.targetContact
     onClicked: toggleVisibility()
+    needsAttention: model.conversation.messages.unreadCount !== 0
     
     function toggleVisibility() { setVisible(!isCurrentConversation) }
     function openConversation() { base.currentIndex = index }
@@ -109,6 +110,6 @@ ConversationDelegateButton {
             verticalAlignment: Text.AlignVCenter
         }
 
-        visible: model.conversation.messages.unreadCount !== 0
+        visible: convButton.needsAttention
     }
 }
diff --git a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegateButton.qml b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegateButton.qml
index e9e9fef..60fcd81 100644
--- a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegateButton.qml
+++ b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegateButton.qml
@@ -24,26 +24,63 @@ import org.kde.kquickcontrolsaddons 2.0 as ExtraComponents
 import org.kde.plasma.core 2.0 as PlasmaCore
 import org.kde.telepathy 0.1
 
-PlasmaComponents.ToolButton
+MouseArea
 {
+    id: mouseArea
+    hoverEnabled: true
+
     property variant account
     property variant contact
     property alias avatar: icon.source
     property string title
-    property var presenceIconName
+    property string presenceIconName
     property alias overlay: overlayLoader.sourceComponent
-    checked: base.currentIndex==index
-    checkable: checked
+    property bool needsAttention: false
+//     checked: base.currentIndex==index
+//     checkable: checked
 
-    PlasmaCore.IconItem {
-        id: icon
-        opacity: dropArea.containsDrag ? 0.5 : 1
-        anchors {
-            fill: parent
+    PlasmaCore.FrameSvgItem {
+        id: frame
+
+        anchors.fill: parent
+
+        imagePath: "widgets/tasks"
+        prefix: taskPrefix(base.currentIndex==index ? "focus" :
+                           mouseArea.containsMouse  ? "hover" :
+                           mouseArea.needsAttention ? "attention"
+                                                    : "normal")
+
+        function taskPrefix(prefix) {
+            var effectivePrefix;
+            switch (plasmoid.location) {
+                case PlasmaCore.Types.LeftEdge:
+                    effectivePrefix = "west-" + prefix;
+                    break;
+                case PlasmaCore.Types.TopEdge:
+                    effectivePrefix = "north-" + prefix;
+                    break;
+                case PlasmaCore.Types.RightEdge:
+                    effectivePrefix = "east-" + prefix;
+                    break;
+                case PlasmaCore.Types.BottomEdge:
+                    effectivePrefix = "south-" + prefix;
+                    break;
+            }
+            if (!frame.hasElementPrefix(effectivePrefix)) {
+                effectivePrefix = prefix;
+            }
+            return effectivePrefix;
         }
 
-        Behavior on opacity { SmoothedAnimation { duration: 250; velocity: 0.01 } }
+        PlasmaCore.IconItem {
+            id: icon
+            opacity: dropArea.containsDrag ? 0.5 : 1
+            anchors.fill: parent
+
+            Behavior on opacity { SmoothedAnimation { duration: 250; velocity: 0.01 } }
+        }
     }
+
 //     //The MouseArea is just a workaround because otherwise the ToolTip steals the mouse hover events
 //     //and the button doesn't get painted properly
 //     MouseArea {

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list