[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:01:56 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=936cc40

The following commit has been merged in the master branch:
commit 936cc40303d96102087a14b7462bd72a3bed0148
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Tue Feb 28 01:34:16 2012 +0100

    Cleanup
---
 src/accounts-list-delegate.cpp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/accounts-list-delegate.cpp b/src/accounts-list-delegate.cpp
index 43d4b12..9c1ff3c 100644
--- a/src/accounts-list-delegate.cpp
+++ b/src/accounts-list-delegate.cpp
@@ -173,7 +173,8 @@ void AccountsListDelegate::updateItemWidgets(const QList<QWidget *> widgets, con
     statusTextLabel->setPalette(statusTextLabelPalette);
     statusTextLabel->setFont(statusTextFont);
     statusTextLabel->setText(statusText);
-    statusTextLabel->setFixedSize(statusTextLabel->fontMetrics().boundingRect(statusText).width(), statusTextLabel->height());
+    statusTextLabel->setFixedSize(statusTextLabel->fontMetrics().boundingRect(statusText).width(),
+                                  statusTextLabel->height());
     int statusTextLabelLeftMargin = contentRect.right() - statusTextLabel->width();
     int statusTextLabelTopMargin = (outerRect.height() - statusTextLabel->height()) / 2;
     statusTextLabel->move(statusTextLabelLeftMargin, statusTextLabelTopMargin);
@@ -197,7 +198,7 @@ void AccountsListDelegate::updateItemWidgets(const QList<QWidget *> widgets, con
     QFont displayNameButtonFont = option.font;
     QPalette displayNameButtonPalette = option.palette;
     if (isEnabled) {
-        displayNameButtonPalette.setColor(QPalette::WindowText, displayNameButtonPalette.color(QPalette::Normal, QPalette::Text));
+        displayNameButtonPalette.setColor(QPalette::WindowText, displayNameButtonPalette.color(QPalette::Active, QPalette::Text));
         displayNameButtonFont.setBold(true);
     } else {
         displayNameButtonFont.setItalic(true);
@@ -214,9 +215,8 @@ void AccountsListDelegate::updateItemWidgets(const QList<QWidget *> widgets, con
     QString displayNameButtonText = displayNameButton->fontMetrics().elidedText(displayName,
                                                                                 Qt::ElideRight,
                                                                                 innerRect.width() - (7*2));
-    QRect displayNameButtonTextRect = displayNameButton->fontMetrics().boundingRect(displayNameButtonText);
     displayNameButton->setText(displayNameButtonText);
-    displayNameButton->setFixedSize(displayNameButtonTextRect.width() + (7*2),
+    displayNameButton->setFixedSize(displayNameButton->fontMetrics().boundingRect(displayNameButtonText).width() + (7*2),
                                     displayNameButton->minimumSizeHint().height());
     displayNameButton->setAccount(account);
 
@@ -229,7 +229,7 @@ void AccountsListDelegate::updateItemWidgets(const QList<QWidget *> widgets, con
     QFont connectionErrorLabelFont = option.font;
     QPalette connectionErrorLabelPalette = option.palette;
     if (isEnabled) {
-        connectionErrorLabelPalette.setColor(QPalette::WindowText, connectionErrorLabelPalette.color(QPalette::Normal, QPalette::Text));
+        connectionErrorLabelPalette.setColor(QPalette::WindowText, connectionErrorLabelPalette.color(QPalette::Active, QPalette::Text));
     } else {
         connectionErrorLabelFont.setItalic(true);
         connectionErrorLabelPalette.setColor(QPalette::Text, connectionErrorLabelPalette.color(QPalette::Disabled, QPalette::Text));
@@ -241,10 +241,12 @@ void AccountsListDelegate::updateItemWidgets(const QList<QWidget *> widgets, con
     connectionErrorLabel->setFont(connectionErrorLabelFont);
     connectionErrorLabel->setPalette(connectionErrorLabelPalette);
 
-    connectionErrorLabel->setText(connectionErrorLabel->fontMetrics().elidedText(connectionError,
+    QString connectionErrorLabelText = connectionErrorLabel->fontMetrics().elidedText(connectionError,
                                                                                       Qt::ElideRight,
-                                                                                      innerRect.width() - (7*2)));
-    connectionErrorLabel->setFixedSize(connectionErrorLabel->minimumSizeHint().width(), displayNameButton->height());
+                                                                                      innerRect.width() - (7*2));
+    connectionErrorLabel->setText(connectionErrorLabelText);
+    connectionErrorLabel->setFixedSize(connectionErrorLabel->fontMetrics().boundingRect(connectionErrorLabelText).width(),
+                                       displayNameButton->height());
 
     int connectionErrorLabelLeftMargin = innerRect.left() + 7;
     int connectionErrorLabelTopMargin = contentRect.bottom() - displayNameButton->height();
@@ -257,9 +259,7 @@ void AccountsListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
         return;
     }
 
-    QStyle *style = QApplication::style();
-
-    style->drawPrimitive(QStyle::PE_PanelItemViewItem, &option, painter, 0);
+    QApplication::style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &option, painter, 0);
 }
 
 

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list