diff options
author | bunnei <bunneidev@gmail.com> | 2022-09-17 03:12:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-17 03:12:04 +0200 |
commit | 92813f01a44300970d124ce10f54e63cc9220474 (patch) | |
tree | 342806b29bdd057218b9d06bc030c3ed4f0a2a6c /src | |
parent | Merge pull request #8869 from SachinVin/cmake (diff) | |
parent | UI: move icons from default into colorful theme. (diff) | |
download | yuzu-92813f01a44300970d124ce10f54e63cc9220474.tar yuzu-92813f01a44300970d124ce10f54e63cc9220474.tar.gz yuzu-92813f01a44300970d124ce10f54e63cc9220474.tar.bz2 yuzu-92813f01a44300970d124ce10f54e63cc9220474.tar.lz yuzu-92813f01a44300970d124ce10f54e63cc9220474.tar.xz yuzu-92813f01a44300970d124ce10f54e63cc9220474.tar.zst yuzu-92813f01a44300970d124ce10f54e63cc9220474.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/configuration/configure_web.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/yuzu/configuration/configure_web.cpp b/src/yuzu/configuration/configure_web.cpp index d668c992b..ab526e4ca 100644 --- a/src/yuzu/configuration/configure_web.cpp +++ b/src/yuzu/configuration/configure_web.cpp @@ -128,20 +128,25 @@ void ConfigureWeb::RefreshTelemetryID() { void ConfigureWeb::OnLoginChanged() { if (ui->edit_token->text().isEmpty()) { user_verified = true; - - const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("checked")).pixmap(16); - ui->label_token_verified->setPixmap(pixmap); + // Empty = no icon + ui->label_token_verified->setPixmap(QPixmap()); + ui->label_token_verified->setToolTip(QString()); } else { user_verified = false; - const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("failed")).pixmap(16); + // Show an info icon if it's been changed, clearer than showing failure + const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("info")).pixmap(16); ui->label_token_verified->setPixmap(pixmap); + ui->label_token_verified->setToolTip( + tr("Unverified, please click Verify before saving configuration", "Tooltip")); } } void ConfigureWeb::VerifyLogin() { ui->button_verify_login->setDisabled(true); ui->button_verify_login->setText(tr("Verifying...")); + ui->label_token_verified->setPixmap(QIcon::fromTheme(QStringLiteral("sync")).pixmap(16)); + ui->label_token_verified->setToolTip(tr("Verifying...")); verify_watcher.setFuture(QtConcurrent::run( [username = UsernameFromDisplayToken(ui->edit_token->text().toStdString()), token = TokenFromDisplayToken(ui->edit_token->text().toStdString())] { @@ -155,13 +160,13 @@ void ConfigureWeb::OnLoginVerified() { if (verify_watcher.result()) { user_verified = true; - const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("checked")).pixmap(16); - ui->label_token_verified->setPixmap(pixmap); + ui->label_token_verified->setPixmap(QIcon::fromTheme(QStringLiteral("checked")).pixmap(16)); + ui->label_token_verified->setToolTip(tr("Verified", "Tooltip")); ui->username->setText( QString::fromStdString(UsernameFromDisplayToken(ui->edit_token->text().toStdString()))); } else { - const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("failed")).pixmap(16); - ui->label_token_verified->setPixmap(pixmap); + ui->label_token_verified->setPixmap(QIcon::fromTheme(QStringLiteral("failed")).pixmap(16)); + ui->label_token_verified->setToolTip(tr("Verification failed", "Tooltip")); ui->username->setText(tr("Unspecified")); QMessageBox::critical(this, tr("Verification failed"), tr("Verification failed. Check that you have entered your token " |