summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Kyle Kienapfel2022-09-12 08:56:24 -0700
committerGravatar Kyle Kienapfel2022-09-15 23:00:49 -0700
commit9554c67809a674cad2de1482634da2f79de90474 (patch)
tree895b1c4366085713de06dcd627423b236a4d0b34 /src
parentMerge pull request #8878 from Kelebek1/remove_pause (diff)
downloadyuzu-9554c67809a674cad2de1482634da2f79de90474.tar.gz
yuzu-9554c67809a674cad2de1482634da2f79de90474.tar.xz
yuzu-9554c67809a674cad2de1482634da2f79de90474.zip
UI: move icons from default into colorful theme.
colorful theme has been default theme for awhile. having colorful theme try and grab icons from other theme doesn't work on Linux. Also adding two additional icons, info is to hint to the user that they should hit verify after pasting in a token, sync is to show that the verification is occurring.
Diffstat (limited to '')
-rw-r--r--src/yuzu/configuration/configure_web.cpp21
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() {
128void ConfigureWeb::OnLoginChanged() { 128void ConfigureWeb::OnLoginChanged() {
129 if (ui->edit_token->text().isEmpty()) { 129 if (ui->edit_token->text().isEmpty()) {
130 user_verified = true; 130 user_verified = true;
131 131 // Empty = no icon
132 const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("checked")).pixmap(16); 132 ui->label_token_verified->setPixmap(QPixmap());
133 ui->label_token_verified->setPixmap(pixmap); 133 ui->label_token_verified->setToolTip(QString());
134 } else { 134 } else {
135 user_verified = false; 135 user_verified = false;
136 136
137 const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("failed")).pixmap(16); 137 // Show an info icon if it's been changed, clearer than showing failure
138 const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("info")).pixmap(16);
138 ui->label_token_verified->setPixmap(pixmap); 139 ui->label_token_verified->setPixmap(pixmap);
140 ui->label_token_verified->setToolTip(
141 tr("Unverified, please click Verify before saving configuration", "Tooltip"));
139 } 142 }
140} 143}
141 144
142void ConfigureWeb::VerifyLogin() { 145void ConfigureWeb::VerifyLogin() {
143 ui->button_verify_login->setDisabled(true); 146 ui->button_verify_login->setDisabled(true);
144 ui->button_verify_login->setText(tr("Verifying...")); 147 ui->button_verify_login->setText(tr("Verifying..."));
148 ui->label_token_verified->setPixmap(QIcon::fromTheme(QStringLiteral("sync")).pixmap(16));
149 ui->label_token_verified->setToolTip(tr("Verifying..."));
145 verify_watcher.setFuture(QtConcurrent::run( 150 verify_watcher.setFuture(QtConcurrent::run(
146 [username = UsernameFromDisplayToken(ui->edit_token->text().toStdString()), 151 [username = UsernameFromDisplayToken(ui->edit_token->text().toStdString()),
147 token = TokenFromDisplayToken(ui->edit_token->text().toStdString())] { 152 token = TokenFromDisplayToken(ui->edit_token->text().toStdString())] {
@@ -155,13 +160,13 @@ void ConfigureWeb::OnLoginVerified() {
155 if (verify_watcher.result()) { 160 if (verify_watcher.result()) {
156 user_verified = true; 161 user_verified = true;
157 162
158 const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("checked")).pixmap(16); 163 ui->label_token_verified->setPixmap(QIcon::fromTheme(QStringLiteral("checked")).pixmap(16));
159 ui->label_token_verified->setPixmap(pixmap); 164 ui->label_token_verified->setToolTip(tr("Verified", "Tooltip"));
160 ui->username->setText( 165 ui->username->setText(
161 QString::fromStdString(UsernameFromDisplayToken(ui->edit_token->text().toStdString()))); 166 QString::fromStdString(UsernameFromDisplayToken(ui->edit_token->text().toStdString())));
162 } else { 167 } else {
163 const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("failed")).pixmap(16); 168 ui->label_token_verified->setPixmap(QIcon::fromTheme(QStringLiteral("failed")).pixmap(16));
164 ui->label_token_verified->setPixmap(pixmap); 169 ui->label_token_verified->setToolTip(tr("Verification failed", "Tooltip"));
165 ui->username->setText(tr("Unspecified")); 170 ui->username->setText(tr("Unspecified"));
166 QMessageBox::critical(this, tr("Verification failed"), 171 QMessageBox::critical(this, tr("Verification failed"),
167 tr("Verification failed. Check that you have entered your token " 172 tr("Verification failed. Check that you have entered your token "