[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:14:25 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=55ee19c

The following commit has been merged in the master branch:
commit 55ee19c98ff9b03bc168441b0b7790e74e1d1d53
Author: mayank jha <mjnovice at gmail.com>
Date:   Wed Mar 12 15:18:52 2014 +0100

    fixes the right to left position for global presence chooser widget edit button.
    
    As the values were hardcoded, so the changes were not reflected upon applying layout. Had to give the value for right to left.
    
    REVIEW: 116601
    BUG: 319885
    FIXED-IN: 0.8.1
---
 global-presence-chooser.cpp | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/global-presence-chooser.cpp b/global-presence-chooser.cpp
index 2047473..14afd5d 100644
--- a/global-presence-chooser.cpp
+++ b/global-presence-chooser.cpp
@@ -421,12 +421,20 @@ void GlobalPresenceChooser::repositionOverlays()
     //set 2px margins so that the button is not bigger than the combo
     m_changePresenceMessageButton->setMaximumHeight(height() - 2);
     m_changePresenceMessageButton->setMaximumWidth(height() - 2);
-    //move the button 22px from the right edge
-    m_changePresenceMessageButton->move(width() - m_changePresenceMessageButton->width() - 22, 0);
-
-    //place the spinner 2px left from the button
-    QPoint topLeft(m_changePresenceMessageButton->pos().x() - m_busyOverlay->sequence().frameSize().width() - 2,
-                   (height() - m_busyOverlay->sequence().frameSize().height())/2);
+    QPoint topLeft;
+    if (m_changePresenceMessageButton->layoutDirection() == Qt::RightToLeft) {
+        //move the button 22px from the left edge
+        m_changePresenceMessageButton->move(22, 0);
+        //place the spinner 2px right from the button, 4 is added to take the margin.
+        topLeft.setX(m_changePresenceMessageButton->pos().x() + m_busyOverlay->sequence().frameSize().width() + 4);
+        topLeft.setY((height() - m_busyOverlay->sequence().frameSize().height()) / 2);
+    } else {
+        //move the button 22px from the right edge
+        m_changePresenceMessageButton->move(width() - m_changePresenceMessageButton->width() - 22, 0);
+        //place the spinner 2px left from the button
+        topLeft.setX(m_changePresenceMessageButton->pos().x() - m_busyOverlay->sequence().frameSize().width() - 2);
+        topLeft.setY((height() - m_busyOverlay->sequence().frameSize().height()) / 2);
+    }
     m_busyOverlay->setRect(QRect(topLeft, m_busyOverlay->sequence().frameSize()));
 }
 

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list