summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Ritter2019-11-14 13:59:47 +0100
committerSteffen Ritter2019-11-14 13:59:47 +0100
commit87e02504ce1feb347facaf9e747f96f9220a3c1a (patch)
treee60b1ec8498025de40285d6094240e3367db7c74
parentminor formatting issue (diff)
downloadslxgreeter-87e02504ce1feb347facaf9e747f96f9220a3c1a.tar.gz
slxgreeter-87e02504ce1feb347facaf9e747f96f9220a3c1a.tar.xz
slxgreeter-87e02504ce1feb347facaf9e747f96f9220a3c1a.zip
Make password placeholder configurable
-rw-r--r--src/loginform.cpp3
-rw-r--r--src/settings.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/loginform.cpp b/src/loginform.cpp
index 5f60636..b6dcd4a 100644
--- a/src/loginform.cpp
+++ b/src/loginform.cpp
@@ -111,6 +111,9 @@ void LoginForm::initialize()
if(!Settings::usernamePlaceholder().isEmpty()) {
ui->userInput->setPlaceholderText(Settings::usernamePlaceholder());
}
+ if(!Settings::passwordPlaceholder().isEmpty()) {
+ ui->passwordInput->setPlaceholderText(Settings::passwordPlaceholder());
+ }
addLeaveEntry(Global::power()->canShutdown(), "system-shutdown", tr("Shutdown"), "shutdown");
addLeaveEntry(Global::power()->canRestart(), "system-reboot", tr("Restart"), "restart");
diff --git a/src/settings.h b/src/settings.h
index 8a0cf81..cc9cda3 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -43,6 +43,7 @@ public:
static QString clockBackgroundStyle() { return s_settings->value("clock-background-style").toString(); }
static QStringList clockShadow() { return s_settings->value("clock-shadow").toString().split(QRegExp("\\s"), QString::SkipEmptyParts); }
static QString usernamePlaceholder() { return s_settings->value("username-placeholder").toString(); }
+ static QString passwordPlaceholder() { return s_settings->value("password-placeholder").toString(); }
static bool guestSessionEnabled() { return s_settings->value("guest-session-enabled").toBool(); }
static QString userSessionButtonText() { return s_settings->value("user-session-button-text").toString(); }
static QString guestSessionButtonText() { return s_settings->value("guest-session-button-text").toString(); }