Mercurial > trustbridge
changeset 507:20973a56d5ec
Use is_admin to determine if UAC icon should be painted on the button
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 28 Apr 2014 09:22:12 +0000 |
parents | bfcfbae151ab |
children | 27bcdee4e4a6 |
files | ui/mainwindow.cpp |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/mainwindow.cpp Mon Apr 28 09:21:27 2014 +0000 +++ b/ui/mainwindow.cpp Mon Apr 28 09:22:12 2014 +0000 @@ -50,6 +50,7 @@ #include "certificateitemdelegate.h" #include "separatoritemdelegate.h" #include "installwrapper.h" +#include "util.h" MainWindow::MainWindow(bool trayMode): mTrayMode(trayMode) @@ -414,6 +415,13 @@ bottomLayout->addWidget(quitButton); bottomLayout->setAlignment(quitButton, Qt::AlignBottom); +#ifdef Q_OS_WIN + if (is_admin()) { + QIcon uacShield = QApplication::style()->standardIcon(QStyle::SP_VistaShield); + installButton->setIcon(uacShield); + } +#endif + // The certificate details QGroupBox *detailBox = new QGroupBox(tr("Details")); QLabel *subjectCN = new QLabel(tr("Subject Common Name:"));