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


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

The following commit has been merged in the master branch:
commit 6a3235def3a300c461de6c3bf7d7d1bae29eab3f
Author: Aleix Pol <aleixpol at kde.org>
Date:   Fri Apr 5 19:38:39 2013 +0200

    Properly compute the edge where to put the dialog
    
    This patch makes it so the dialogs appear in the side they are supposed to
    appear in case the plasmoid is in a panel.
    
    REVIEW: 109805
---
 chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml | 6 +++---
 chat/org.kde.ktp-chat/contents/ui/main.qml                 | 7 ++++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
index 8a854b3..d309159 100644
--- a/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
+++ b/chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml
@@ -25,7 +25,7 @@ import org.kde.telepathy 0.1
 ConversationDelegateButton {
     id: convButton
     property alias isCurrentConversation: dialog.visible
-    property bool popupBelow: true
+    property variant popupSide
     
     avatar: model.conversation.target.avatar
     nick: model.conversation.target.nick
@@ -59,12 +59,12 @@ ConversationDelegateButton {
         onVisibleChanged: {
             if(visible) {
                 windowHide.hideWindowFromTaskbar(dialog.windowId)
-                var pos = convButton.popupBelow ? Qt.AlignBottom : Qt.AlignRight;
+
                 //if we are opening the dialog right away (e.g. started chat from pinned)
                 //when we open the dialog by the button plasma will collapse because the
                 //item is not positioned yet. Use the plasmoid root instead, in those cases
                 var item = convButton.state==Component.Ready ? convButton : base;
-                var point = dialog.popupPosition(item, pos);
+                var point = dialog.popupPosition(item, convButton.popupSide);
                 console.log("Showing dialog at (" + point.x + "," + point.y + ")");
 
                 dialog.x = point.x;
diff --git a/chat/org.kde.ktp-chat/contents/ui/main.qml b/chat/org.kde.ktp-chat/contents/ui/main.qml
index 834ecaa..9fb78c9 100644
--- a/chat/org.kde.ktp-chat/contents/ui/main.qml
+++ b/chat/org.kde.ktp-chat/contents/ui/main.qml
@@ -106,13 +106,18 @@ Grid {
             }
         }
     }
+    property variant popupSide:   plasmoid.location === TopEdge ?Qt.AlignBottom
+                                : plasmoid.location === BottomEdge ? Qt.AlignTop
+                                : plasmoid.location === LeftEdge ? Qt.AlignRight
+                                : plasmoid.location === RightEdge ? Qt.AlignLeft
+                                : base.flow === Flow.LeftToRight ? Qt.AlignBottom : Qt.AlignRight
 
     Repeater {
         id: conversationsView
         delegate: ConversationDelegate {
             width: base.itemWidth
             height: base.itemHeight
-            popupBelow: base.flow === Flow.LeftToRight
+            popupSide: base.popupSide
         }
         model: handler.conversations
     }

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list