Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Müller <fmueller@owncloud.com>2022-06-01 10:56:50 +0300
committerHannah von Reth <vonreth@kde.org>2022-06-21 12:11:27 +0300
commit657ab0f6259722f3d3bc11ccd2327a5e438de9c2 (patch)
treef084dc5892c6e1d0a9329aff8c11b90dc811a953 /src/gui/newwizard
parentee876569bff4f738168480cea1c709e5e832927b (diff)
Synchronize username label text and line edit placeholder
Diffstat (limited to 'src/gui/newwizard')
-rw-r--r--src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp28
-rw-r--r--src/gui/newwizard/pages/basiccredentialssetupwizardpage.ui4
2 files changed, 17 insertions, 15 deletions
diff --git a/src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp b/src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp
index e86f34b32..1c5375551 100644
--- a/src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp
+++ b/src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp
@@ -31,19 +31,21 @@ BasicCredentialsSetupWizardPage::BasicCredentialsSetupWizardPage(const QUrl &ser
});
// branding
- switch (Theme::instance()->userIDType()) {
- case Theme::UserIDUserName:
- _ui->usernameLabel->setText(tr("Username"));
- break;
- case Theme::UserIDEmail:
- _ui->usernameLabel->setText(tr("E-mail address"));
- break;
- case Theme::UserIDCustom:
- _ui->usernameLabel->setText(Theme::instance()->customUserID());
- break;
- default:
- Q_UNREACHABLE();
- }
+ const QString usernameLabelText = []() {
+ switch (Theme::instance()->userIDType()) {
+ case Theme::UserIDUserName:
+ return tr("Username");
+ case Theme::UserIDEmail:
+ return tr("E-mail address");
+ case Theme::UserIDCustom:
+ return Theme::instance()->customUserID();
+ default:
+ Q_UNREACHABLE();
+ }
+ }();
+
+ _ui->usernameLabel->setText(usernameLabelText);
+ _ui->usernameLineEdit->setPlaceholderText(usernameLabelText);
if (!Theme::instance()->userIDHint().isEmpty()) {
_ui->usernameLineEdit->setPlaceholderText(Theme::instance()->userIDHint());
diff --git a/src/gui/newwizard/pages/basiccredentialssetupwizardpage.ui b/src/gui/newwizard/pages/basiccredentialssetupwizardpage.ui
index 0f43f90c8..69d489f16 100644
--- a/src/gui/newwizard/pages/basiccredentialssetupwizardpage.ui
+++ b/src/gui/newwizard/pages/basiccredentialssetupwizardpage.ui
@@ -76,7 +76,7 @@
<item row="0" column="0">
<widget class="QLabel" name="usernameLabel">
<property name="text">
- <string>Username</string>
+ <string notr="true">Username (placeholder)</string>
</property>
</widget>
</item>
@@ -89,7 +89,7 @@
</size>
</property>
<property name="placeholderText">
- <string>Username</string>
+ <string notr="true">Username (placeholder)</string>
</property>
</widget>
</item>