From 814e9c33ecdc558af6fb9b7ff6e37d38772a5b10 Mon Sep 17 00:00:00 2001 From: nils Date: Sat, 15 Oct 2011 20:24:52 +0000 Subject: verifydetaildialog and verifynotification are refreshed, when keydb changed git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@551 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- verifynotification.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'verifynotification.cpp') diff --git a/verifynotification.cpp b/verifynotification.cpp index 1c4b55d..40d5604 100644 --- a/verifynotification.cpp +++ b/verifynotification.cpp @@ -63,19 +63,24 @@ void VerifyNotification::importFromKeyserver() void VerifyNotification::setVerifyLabel(QString text, verify_label_status verifyLabelStatus) { + QString color; verifyLabel->setText(text); switch (verifyLabelStatus) { - case VERIFY_ERROR_OK: verifyLabel->setObjectName("ok"); + case VERIFY_ERROR_OK: color="#ccffcc"; break; - case VERIFY_ERROR_WARN: verifyLabel->setObjectName("warning"); + case VERIFY_ERROR_WARN: color="#ececba"; break; - case VERIFY_ERROR_CRITICAL: verifyLabel->setObjectName("critical"); + case VERIFY_ERROR_CRITICAL: color="#ff8080"; break; default: break; } - return; -} + + verifyLabel->setAutoFillBackground(true); + QPalette status = verifyLabel->palette(); + status.setColor(QPalette::Background, color); + verifyLabel->setPalette(status); +} void VerifyNotification::showImportAction(bool visible) { @@ -158,6 +163,6 @@ bool VerifyNotification::refresh() verifyLabelText.remove(verifyLabelText.length()-1,1); this->setVerifyLabel(verifyLabelText,verifyStatus); - + qDebug() << verifyStatus; return true; } -- cgit