QT: Implement themed icons (#3554)
* implement themed icons * fix theme search paths
This commit is contained in:
parent
7abfdb164b
commit
05cf7fe70a
13 changed files with 58 additions and 16 deletions
|
@ -2,6 +2,7 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <QIcon>
|
||||
#include <QMessageBox>
|
||||
#include "citra_qt/configuration/configure_web.h"
|
||||
#include "core/settings.h"
|
||||
|
@ -67,12 +68,12 @@ void ConfigureWeb::RefreshTelemetryID() {
|
|||
void ConfigureWeb::OnLoginChanged() {
|
||||
if (ui->edit_username->text().isEmpty() && ui->edit_token->text().isEmpty()) {
|
||||
user_verified = true;
|
||||
ui->label_username_verified->setPixmap(QPixmap(":/icons/checked.png"));
|
||||
ui->label_token_verified->setPixmap(QPixmap(":/icons/checked.png"));
|
||||
ui->label_username_verified->setPixmap(QIcon::fromTheme("checked").pixmap(16));
|
||||
ui->label_token_verified->setPixmap(QIcon::fromTheme("checked").pixmap(16));
|
||||
} else {
|
||||
user_verified = false;
|
||||
ui->label_username_verified->setPixmap(QPixmap(":/icons/failed.png"));
|
||||
ui->label_token_verified->setPixmap(QPixmap(":/icons/failed.png"));
|
||||
ui->label_username_verified->setPixmap(QIcon::fromTheme("failed").pixmap(16));
|
||||
ui->label_token_verified->setPixmap(QIcon::fromTheme("failed").pixmap(16));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,11 +90,11 @@ void ConfigureWeb::OnLoginVerified() {
|
|||
ui->button_verify_login->setText(tr("Verify"));
|
||||
if (verified.get()) {
|
||||
user_verified = true;
|
||||
ui->label_username_verified->setPixmap(QPixmap(":/icons/checked.png"));
|
||||
ui->label_token_verified->setPixmap(QPixmap(":/icons/checked.png"));
|
||||
ui->label_username_verified->setPixmap(QIcon::fromTheme("checked").pixmap(16));
|
||||
ui->label_token_verified->setPixmap(QIcon::fromTheme("checked").pixmap(16));
|
||||
} else {
|
||||
ui->label_username_verified->setPixmap(QPixmap(":/icons/failed.png"));
|
||||
ui->label_token_verified->setPixmap(QPixmap(":/icons/failed.png"));
|
||||
ui->label_username_verified->setPixmap(QIcon::fromTheme("failed").pixmap(16));
|
||||
ui->label_token_verified->setPixmap(QIcon::fromTheme("failed").pixmap(16));
|
||||
QMessageBox::critical(
|
||||
this, tr("Verification failed"),
|
||||
tr("Verification failed. Check that you have entered your username and token "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue