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


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

The following commit has been merged in the master branch:
commit 4a0b1ca441e4ed5869032ee174774e041aa79748
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Thu Oct 27 10:15:40 2011 +0200

    Make sure the spinning wheel is always in the right position
    
    BUG: 284479
---
 global-presence-chooser.cpp | 16 +++++++++++++---
 global-presence-chooser.h   |  2 ++
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/global-presence-chooser.cpp b/global-presence-chooser.cpp
index 44c081a..78383c0 100644
--- a/global-presence-chooser.cpp
+++ b/global-presence-chooser.cpp
@@ -118,9 +118,6 @@ GlobalPresenceChooser::GlobalPresenceChooser(QWidget *parent) :
     m_busyOverlay = new KPixmapSequenceOverlayPainter(this);
     m_busyOverlay->setSequence(KPixmapSequence("process-working"));
     m_busyOverlay->setWidget(this);
-    QPoint topLeft(sizeHint().width() - m_busyOverlay->sequence().frameSize().width() - 22,
-                   (sizeHint().height() - m_busyOverlay->sequence().frameSize().height())/2);
-    m_busyOverlay->setRect(QRect(topLeft, m_busyOverlay->sequence().frameSize()));
 
     connect(this, SIGNAL(activated(int)), SLOT(onCurrentIndexChanged(int)));
     connect(m_globalPresence, SIGNAL(currentPresenceChanged(Tp::Presence)), SLOT(onPresenceChanged(Tp::Presence)));
@@ -163,6 +160,10 @@ bool GlobalPresenceChooser::event(QEvent *e)
         QToolTip::showText(helpEvent->globalPos(), toolTipText, this);
         return true;
     }
+
+    if (e->type() == QEvent::Resize) {
+        repositionSpinner();
+    }
     return QComboBox::event(e);
 }
 
@@ -207,11 +208,20 @@ void GlobalPresenceChooser::onPresenceChanged(const Tp::Presence &presence)
 void GlobalPresenceChooser::onPresenceChanging(bool isChanging)
 {
     if (isChanging) {
+        repositionSpinner();
         m_busyOverlay->start();
     } else {
         m_busyOverlay->stop();
     }
 }
 
+void GlobalPresenceChooser::repositionSpinner()
+{
+    QPoint topLeft(width() - m_busyOverlay->sequence().frameSize().width() - 22,
+                   (height() - m_busyOverlay->sequence().frameSize().height())/2);
+    m_busyOverlay->setRect(QRect(topLeft, m_busyOverlay->sequence().frameSize()));
+}
+
+
 #include "global-presence-chooser.moc"
 #include "moc_global-presence-chooser.cpp" //hack because we have two QObejcts in teh same file
diff --git a/global-presence-chooser.h b/global-presence-chooser.h
index a627e1a..740f6f3 100644
--- a/global-presence-chooser.h
+++ b/global-presence-chooser.h
@@ -36,6 +36,8 @@ public:
     explicit GlobalPresenceChooser(QWidget *parent = 0);
     void setAccountManager(const Tp::AccountManagerPtr &accountManager);
 
+    void repositionSpinner();
+
 protected:
     virtual bool event(QEvent *event);
 

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list