forked from qt-creator/qt-creator
PublicKeyDeploymentDialog: Make theme-aware
Change-Id: Id7af63d4bfafeb22fe266c88555a54a04135de86 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
7c985c14ad
commit
89c071f2bf
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
#include <utils/theme/theme.h>
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
|
||||||
@@ -100,16 +101,15 @@ void PublicKeyDeploymentDialog::handleDeploymentError(const QString &errorMsg)
|
|||||||
void PublicKeyDeploymentDialog::handleDeploymentFinished(const QString &errorMsg)
|
void PublicKeyDeploymentDialog::handleDeploymentFinished(const QString &errorMsg)
|
||||||
{
|
{
|
||||||
QString buttonText;
|
QString buttonText;
|
||||||
const char *textColor;
|
QString textColor;
|
||||||
if (errorMsg.isEmpty()) {
|
if (errorMsg.isEmpty()) {
|
||||||
buttonText = tr("Deployment finished successfully.");
|
buttonText = tr("Deployment finished successfully.");
|
||||||
textColor = "blue";
|
textColor = Utils::creatorTheme()->color(Utils::Theme::TextColorNormal).name();
|
||||||
} else {
|
} else {
|
||||||
buttonText = errorMsg;
|
buttonText = errorMsg;
|
||||||
textColor = "red";
|
textColor = Utils::creatorTheme()->color(Utils::Theme::TextColorError).name();
|
||||||
}
|
}
|
||||||
setLabelText(QString::fromLatin1("<font color=\"%1\">%2</font>").arg(QLatin1String(textColor),
|
setLabelText(QString::fromLatin1("<font color=\"%1\">%2</font>").arg(textColor, buttonText));
|
||||||
buttonText));
|
|
||||||
setCancelButtonText(tr("Close"));
|
setCancelButtonText(tr("Close"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user