Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lighter-greeter/lightergreeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ void LighterGreeter::initUI()

m_loginFrame->setMaximumSize(1152, 300);
m_userCbx->setMinimumWidth(300);
m_userCbx->setObjectName("UserCbx");
m_passwordEdit->setMinimumWidth(300);
m_passwordEdit->setContextMenuPolicy(Qt::NoContextMenu);
m_passwordEdit->setSecureInputEnabled(true);
Expand All @@ -83,8 +84,10 @@ void LighterGreeter::initUI()
m_passwordEdit->setEchoMode(QLineEdit::Password);
m_passwordEdit->setFocusPolicy(Qt::StrongFocus);
m_passwordEdit->lineEdit()->setValidator(new QRegExpValidator(QRegExp("^[ -~]+$")));
m_passwordEdit->setObjectName("PasswordEdit");

m_loginBtn->setIcon(DStyle::SP_LockElement);
m_loginBtn->setObjectName("LoginBtn");

auto lockPalette = m_loginBtn->palette();
QColor color = lockPalette.color(QPalette::Active, QPalette::Highlight);
Expand All @@ -95,6 +98,7 @@ void LighterGreeter::initUI()
m_avatar->setFocusPolicy(Qt::NoFocus);
m_avatar->setIcon("/var/lib/AccountsService/icons/guest.png");
m_avatar->setAvatarSize(AVATAR_ICON_SIZE);
m_avatar->setObjectName("Avatar");

layout->addStretch();
layout->addWidget(m_loginFrame, 0, Qt::AlignCenter);
Expand Down Expand Up @@ -123,6 +127,7 @@ void LighterGreeter::initUI()
hLayout->setContentsMargins(SPACING, SPACING, SPACING, SPACING);
hLayout->addWidget(m_sessionCbx, 0, Qt::AlignCenter);
hLayout->addWidget(m_switchGreeter, 0, Qt::AlignCenter);
m_switchGreeter->setObjectName("SwitchGreeter");

controlFrame->setMaskColor(DBlurEffectWidget::LightColor);
controlFrame->setMaskAlpha(70);
Expand Down Expand Up @@ -150,6 +155,7 @@ void LighterGreeter::initUI()
}

m_sessionCbx->setVisible(m_sessionCbx->count() > 1);
m_sessionCbx->setObjectName("SessionCbx");

m_loginFrame->installEventFilter(this);
installEventFilter(this);
Expand Down
3 changes: 2 additions & 1 deletion plugins/examples/login-plugins/login-basic/login_module.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -63,6 +63,7 @@ void LoginModule::initUI()
m_loginWidget->setLayout(new QHBoxLayout);
QPushButton *passButton = new QPushButton("Validation passed", m_loginWidget);
passButton->setFixedSize(160, 40);
passButton->setObjectName("PassButton");
m_loginWidget->layout()->addWidget(passButton);

connect(passButton, &QPushButton::clicked, this, [this] {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -27,6 +27,7 @@ void LoginWidget::init()
userNameLabel->setFixedHeight(35);
QLineEdit *userNameEdit = new QLineEdit(this);
userNameEdit->setFixedHeight(35);
userNameEdit->setObjectName("UserNameEdit");
QHBoxLayout *userNameLayout = new QHBoxLayout();
userNameLayout->addWidget(userNameLabel, 3, Qt::AlignRight);
userNameLayout->addSpacing(15);
Expand All @@ -37,6 +38,7 @@ void LoginWidget::init()
tokenLabel->setFixedHeight(35);
QLineEdit *tokenEdit = new QLineEdit(this);
tokenEdit->setFixedHeight(35);
tokenEdit->setObjectName("TokenEdit");
QHBoxLayout *tokenLayout = new QHBoxLayout();
tokenLayout->addWidget(tokenLabel, 3, Qt::AlignRight);
tokenLayout->addSpacing(15);
Expand All @@ -54,6 +56,7 @@ void LoginWidget::init()
sendButton->setFixedSize(120, 35);
sendButton->setEnabled(false);
sendButton->setDefault(true);
sendButton->setObjectName("SendButton");

QVBoxLayout* layout = new QVBoxLayout(this);
setLayout(layout);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -32,6 +32,7 @@ void FullManagedLoginWidget::initUI()
m_userNameLabel->setFixedHeight(35);

m_userNameEdit = new QLineEdit(this);
m_userNameEdit->setObjectName("UserNameEdit");
m_userNameEdit->setFixedHeight(35);

QHBoxLayout *m_userNameLayout = new QHBoxLayout();
Expand All @@ -44,6 +45,7 @@ void FullManagedLoginWidget::initUI()
m_tokenLabel->setFixedHeight(35);

m_tokenEdit = new QLineEdit(this);
m_tokenEdit->setObjectName("TokenEdit");
m_tokenEdit->setFixedHeight(35);

QHBoxLayout *tokenLayout = new QHBoxLayout();
Expand All @@ -63,8 +65,10 @@ void FullManagedLoginWidget::initUI()
m_sendButton->setFixedSize(120, 35);
m_sendButton->setEnabled(false);
m_sendButton->setDefault(true);
m_sendButton->setObjectName("SendButton");

m_disMissButton = new QPushButton("deactive", this);
m_disMissButton->setObjectName("DisMissButton");
m_disMissButton->setFixedSize(120, 35);
m_disMissButton->setEnabled(true);
m_disMissButton->setDefault(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down
3 changes: 2 additions & 1 deletion plugins/login-gesture/resetDialog/gesturedialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -92,6 +92,7 @@ QWidget* GestureDialog::createCancelButton()
QHBoxLayout *layout = new QHBoxLayout(cancelWidget);
layout->setContentsMargins(10, 0, 10, 10);
m_confirmButton = new QPushButton(TranslastionDoc::instance()->getDoc(DocIndex::Cancel), cancelWidget);
m_confirmButton->setObjectName("ConfirmButton");
m_confirmButton->setAttribute(Qt::WA_NoMousePropagation);
layout->addWidget(m_confirmButton);

Expand Down
3 changes: 2 additions & 1 deletion plugins/login-gesture/src/modulewidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -53,6 +53,7 @@ void ModuleWidget::init()
m_tip->setFixedHeight(26);
m_startEnrollBtn = new DPushButton;
m_startEnrollBtn->setFixedSize(200, 54);
m_startEnrollBtn->setObjectName("StartEnrollBtn");

m_title->setVisible(false);
m_tip->setVisible(false);
Expand Down
3 changes: 1 addition & 2 deletions src/session-widgets/auth_passkey.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -37,7 +37,6 @@ void AuthPasskey::initUI()

/* 文案提示 */
m_textLabel->setText(tr("Please plug in the security key"));
m_textLabel->setWordWrap(true);

/* 旋转提示和文案提示布局 */
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Expand Down
7 changes: 7 additions & 0 deletions src/session-widgets/auth_password.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ void AuthPassword::initUI()
m_lineEdit->lineEdit()->setValidator(new QRegExpValidator(QRegExp("^[ -~]+$")));
#endif
DFontSizeManager::instance()->bind(m_lineEdit, DFontSizeManager::T6);
m_lineEdit->setObjectName("LineEdit");

setLineEditInfo(tr("Password"), PlaceHolderText);

Expand All @@ -125,6 +126,7 @@ void AuthPassword::initUI()

/*显示密码*/
m_passwordShowBtn->setAccessibleName(QStringLiteral("PasswordShow"));
m_passwordShowBtn->setObjectName("PasswordShow");
m_passwordShowBtn->setContentsMargins(0, 0, 0, 0);
m_passwordShowBtn->setFocusPolicy(Qt::NoFocus);
m_passwordShowBtn->setCursor(Qt::ArrowCursor);
Expand All @@ -136,6 +138,7 @@ void AuthPassword::initUI()

/* 密码提示 */
m_passwordHintBtn->setAccessibleName(QStringLiteral("PasswordHint"));
m_passwordHintBtn->setObjectName("PasswordHint");
m_passwordHintBtn->setContentsMargins(0, 0, 0, 0);
m_passwordHintBtn->setFocusPolicy(Qt::NoFocus);
m_passwordHintBtn->setCursor(Qt::ArrowCursor);
Expand Down Expand Up @@ -734,9 +737,13 @@ void AuthPassword::showResetPasswordMessage()
iconButton->installEventFilter(this);
m_iconButton = iconButton;
}
if (m_iconButton) {
m_iconButton->setObjectName("IconButton");
}
m_resetPasswordFloatingMessage->setIcon(QIcon("://misc/images/dss_warning.svg"));
DSuggestButton *suggestButton = new DSuggestButton(tr("Reset Password"));
suggestButton->setAutoDefault(true);
suggestButton->setObjectName("SuggestButton");
m_resetPasswordFloatingMessage->setWidget(suggestButton);
m_resetPasswordFloatingMessage->setMessage(tr("Forgot password?"));
connect(suggestButton, &QPushButton::clicked, this, [this] {
Expand Down
7 changes: 7 additions & 0 deletions src/session-widgets/auth_single.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void AuthSingle::initUI()
m_lineEdit->setContextMenuPolicy(Qt::NoContextMenu);
m_lineEdit->setFocusPolicy(Qt::StrongFocus);
m_lineEdit->lineEdit()->setAlignment(Qt::AlignCenter);
m_lineEdit->setObjectName("LineEdit_2");
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
m_lineEdit->lineEdit()->setValidator(new QRegularExpressionValidator(QRegularExpression("^[ -~]+$")));
#else
Expand All @@ -72,6 +73,7 @@ void AuthSingle::initUI()
passwordLayout->setSpacing(0);
/* 键盘布局按钮 */
m_keyboardBtn->setAccessibleName(QStringLiteral("KeyboardButton"));
m_keyboardBtn->setObjectName("KeyboardButton");
m_keyboardBtn->setContentsMargins(0, 0, 0, 0);
m_keyboardBtn->setFocusPolicy(Qt::NoFocus);
m_keyboardBtn->setCursor(Qt::ArrowCursor);
Expand All @@ -87,6 +89,7 @@ void AuthSingle::initUI()
passwordLayout->addWidget(m_capsLock, 0, Qt::AlignRight | Qt::AlignVCenter);
/* 密码提示 */
m_passwordHintBtn->setAccessibleName(QStringLiteral("PasswordHintButton"));
m_passwordHintBtn->setObjectName("PasswordHintButton");
m_passwordHintBtn->setContentsMargins(0, 0, 0, 0);
m_passwordHintBtn->setFocusPolicy(Qt::NoFocus);
m_passwordHintBtn->setCursor(Qt::ArrowCursor);
Expand Down Expand Up @@ -478,9 +481,13 @@ void AuthSingle::showResetPasswordMessage()
iconButton->installEventFilter(this);
m_iconButton = iconButton;
}
if (m_iconButton) {
m_iconButton->setObjectName("IconButton_2");
}
m_resetPasswordFloatingMessage->setIcon(QIcon("://misc/images/dss_warning.svg"));
DSuggestButton *suggestButton = new DSuggestButton(tr("Reset Password"));
suggestButton->setAutoDefault(true);
suggestButton->setObjectName("SuggestButton_2");
m_resetPasswordFloatingMessage->setWidget(suggestButton);
m_resetPasswordFloatingMessage->setMessage(tr("Forgot password?"));
connect(suggestButton, &QPushButton::clicked, this, [this]{
Expand Down
1 change: 1 addition & 0 deletions src/session-widgets/auth_ukey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void AuthUKey::initUI()
m_lineEdit->setContextMenuPolicy(Qt::NoContextMenu);
m_lineEdit->setFocusPolicy(Qt::StrongFocus);
m_lineEdit->lineEdit()->setAlignment(Qt::AlignCenter);
m_lineEdit->setObjectName("LineEdit_3");
setLineEditInfo(tr("Enter your PIN"), PlaceHolderText);

QHBoxLayout *UKeyLayout = new QHBoxLayout(m_lineEdit->lineEdit());
Expand Down
5 changes: 4 additions & 1 deletion src/session-widgets/auth_widget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -74,13 +74,15 @@ void AuthWidget::initUI()
m_userAvatar->setFocusPolicy(Qt::NoFocus);
m_userAvatar->setIcon(m_user->avatar());
m_userAvatar->setAvatarSize(UserAvatar::AvatarLargeSize);
m_userAvatar->setObjectName("UserAvatar");
/* 用户名输入框 */
m_accountEdit = new DLineEditEx(this);
m_accountEdit->setContextMenuPolicy(Qt::NoContextMenu);
m_accountEdit->lineEdit()->setAlignment(Qt::AlignCenter);
m_accountEdit->setClearButtonEnabled(false);
m_accountEdit->setPlaceholderText(tr("Account"));
m_accountEdit->setEnableTableKeyEvent(true);
m_accountEdit->setObjectName("AccountEdit");

// 账户名有效字符使用dsg配置
const QString accountExpression = DConfigHelper::instance()->getConfig("accountExpression", "[a-zA-Z0-9-_@]+$").toString();
Expand All @@ -107,6 +109,7 @@ void AuthWidget::initUI()
m_lockButton->setIcon(DStyle::SP_ArrowNext);
}
m_lockButton->setAccessibleName("LockButton");
m_lockButton->setObjectName("LockButton");
/* 模糊背景 */
m_blurEffectWidget->setMaskColor(DBlurEffectWidget::LightColor);
m_blurEffectWidget->setMaskAlpha(BlurTransparency);
Expand Down
11 changes: 10 additions & 1 deletion src/session-widgets/sfa_widget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -68,6 +68,7 @@ void SFAWidget::initUI()
/* 重试按钮 */
m_retryButton->setIcon(QIcon(":/img/bottom_actions/reboot.svg"));
m_retryButton->hide();
m_retryButton->setObjectName("RetryButton");

m_mainLayout->setContentsMargins(10, 0, 10, 0);
m_mainLayout->setSpacing(0);
Expand Down Expand Up @@ -407,6 +408,7 @@ void SFAWidget::initSingleAuth()
btn->setIconSize(AuthButtonIconSize);
btn->setFixedSize(AuthButtonSize);
btn->setFocusPolicy(Qt::NoFocus);
btn->setObjectName("PamAuthBtn");
m_authButtons.insert(AT_PAM, btn);
connect(btn, &ButtonBoxButton::toggled, this, [this](const bool checked) {
if (checked) {
Expand Down Expand Up @@ -519,6 +521,7 @@ void SFAWidget::initPasswdAuth()
btn->setIconSize(AuthButtonIconSize);
btn->setFixedSize(AuthButtonSize);
btn->setFocusPolicy(Qt::NoFocus);
btn->setObjectName("PasswordAuthBtn");
m_authButtons.insert(AT_Password, btn);
connect(btn, &ButtonBoxButton::toggled, this, [this](const bool checked) {
if (checked) {
Expand Down Expand Up @@ -568,6 +571,7 @@ void SFAWidget::initFingerprintAuth()
btn->setIconSize(AuthButtonIconSize);
btn->setFixedSize(AuthButtonSize);
btn->setFocusPolicy(Qt::NoFocus);
btn->setObjectName("FingerprintAuthBtn");
m_authButtons.insert(AT_Fingerprint, btn);
connect(btn, &ButtonBoxButton::toggled, this, [this](const bool checked) {
if (checked) {
Expand Down Expand Up @@ -616,6 +620,7 @@ void SFAWidget::initPasskeyAuth()
btn->setIconSize(AuthButtonIconSize);
btn->setFixedSize(AuthButtonSize);
btn->setFocusPolicy(Qt::NoFocus);
btn->setObjectName("PasskeyAuthBtn");
m_authButtons.insert(AT_Passkey, btn);
connect(btn, &ButtonBoxButton::toggled, this, [this](const bool checked) {
if (checked) {
Expand Down Expand Up @@ -672,6 +677,7 @@ void SFAWidget::initUKeyAuth()
btn->setIconSize(AuthButtonIconSize);
btn->setFixedSize(AuthButtonSize);
btn->setFocusPolicy(Qt::NoFocus);
btn->setObjectName("UkeyAuthBtn");
m_authButtons.insert(AT_Ukey, btn);
connect(btn, &ButtonBoxButton::toggled, this, [this](const bool checked) {
if (checked) {
Expand Down Expand Up @@ -733,6 +739,7 @@ void SFAWidget::initFaceAuth()
btn->setIconSize(AuthButtonIconSize);
btn->setFixedSize(AuthButtonSize);
btn->setFocusPolicy(Qt::NoFocus);
btn->setObjectName("FaceAuthBtn");
m_authButtons.insert(AT_Face, btn);
connect(btn, &ButtonBoxButton::toggled, this, [this](const bool checked) {
if (checked) {
Expand Down Expand Up @@ -799,6 +806,7 @@ void SFAWidget::initIrisAuth()
btn->setIconSize(AuthButtonIconSize);
btn->setFixedSize(AuthButtonSize);
btn->setFocusPolicy(Qt::NoFocus);
btn->setObjectName("IrisAuthBtn");
m_authButtons.insert(AT_Iris, btn);
connect(btn, &ButtonBoxButton::toggled, this, [this](const bool checked) {
if (checked) {
Expand Down Expand Up @@ -1262,6 +1270,7 @@ void SFAWidget::initAccount()
btn->setIconSize(AuthButtonIconSize);
btn->setFixedSize(AuthButtonSize);
btn->setFocusPolicy(Qt::NoFocus);
btn->setObjectName("AccountAuthBtn");
m_authButtons.insert(AT_None, btn);
connect(btn, &ButtonBoxButton::toggled, this, [this](const bool checked) {
if (checked) {
Expand Down
3 changes: 2 additions & 1 deletion src/session-widgets/user_widget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -44,6 +44,7 @@ void UserWidget::initUI()
m_avatar->setFocusPolicy(Qt::NoFocus);
m_avatar->setIcon(m_user->avatar());
m_avatar->setAvatarSize(UserAvatar::AvatarSmallSize);
m_avatar->setObjectName("Avatar_2");

/* 用户全名 */
m_displayNameWidget->setAccessibleName(QStringLiteral("NameWidget"));
Expand Down
3 changes: 2 additions & 1 deletion src/session-widgets/userpanel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -38,6 +38,7 @@ void UserPanel::initUI()
m_typeLabel->setElideMode(Qt::ElideRight);

m_avatar->setAvatarSize(UserAvatarSize);
m_avatar->setObjectName("Avatar_3");
m_mainLayout->setSpacing(12);
m_mainLayout->setContentsMargins(10, 10, 10, 10);
QWidget *rightWidget = new QWidget;
Expand Down
Loading
Loading