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


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

The following commit has been merged in the master branch:
commit 3bd4b7e5a814953ef9175610e50e43170b3b8faf
Author: Aleix Pol <aleixpol at kde.org>
Date:   Wed Mar 6 02:38:05 2013 +0100

    Chat plasmoid: Polish sizes
    
    I noticed there was a problem where the plasmoid would get the minimum
    size at some point and started to investigate. It turned out that there
    was an ugly property loop between the minimumSize and the plasmoid's size.
    I guess QML is not reporting it because it happens in the Plasma side.
    
    What this patch does is to make sure that we let the plasmoid's width/height be
    0 when it's empty.
    
    Also it reads the form factor and in case it's horizontal, it uses the
    horizontal flow, despite its size.
    
    REVIEW: 109304
---
 chat/org.kde.ktp-chat/contents/ui/main.qml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/chat/org.kde.ktp-chat/contents/ui/main.qml b/chat/org.kde.ktp-chat/contents/ui/main.qml
index 9cd0ed5..e11269e 100644
--- a/chat/org.kde.ktp-chat/contents/ui/main.qml
+++ b/chat/org.kde.ktp-chat/contents/ui/main.qml
@@ -30,8 +30,8 @@ Grid {
     property real preferredItemSize: Math.max(0, Math.min(width, height))
     property real preferredHeight: flow===Flow.TopToBottom ? itemsCount*preferredItemSize : preferredItemSize
     property real preferredWidth: flow===Flow.LeftToRight ? itemsCount*preferredItemSize : preferredItemSize
-    property real minimumHeight: flow===Flow.TopToBottom ? itemsCount*minimumItemSize : minimumItemSize
-    property real minimumWidth: flow===Flow.LeftToRight ? itemsCount*minimumItemSize : minimumItemSize
+    property real minimumHeight: flow===Flow.TopToBottom ? itemsCount*minimumItemSize : itemsCount==0 ? 0 : minimumItemSize
+    property real minimumWidth: flow===Flow.LeftToRight ? itemsCount*minimumItemSize : itemsCount==0 ? 0 : minimumItemSize
     property int currentIndex: -1
     property int itemsCount: pinnedView.count + conversationsView.count
     property real itemWidth: Math.max(0, flow===Flow.LeftToRight ? Math.min(height, width/itemsCount) : width)
@@ -39,7 +39,9 @@ Grid {
 
     clip: true
     spacing: 2
-    flow: (plasmoid.formFactor === Vertical || width<height) ? Flow.TopToBottom : Flow.LeftToRight
+    flow: (plasmoid.formFactor === Vertical   ? Flow.TopToBottom :
+           plasmoid.formFactor === Horizontal ? Flow.LeftToRight :
+                                 width<height ? Flow.TopToBottom : Flow.LeftToRight)
     rows:    flow===Flow.LeftToRight ?  1 : -1
     columns: flow===Flow.LeftToRight ? -1 :  1
 

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list