From d220efe8cf3af2e0188c5a3093a43725acda1d26 Mon Sep 17 00:00:00 2001 From: winnerym Date: Wed, 22 Mar 2023 14:56:29 +0800 Subject: [PATCH] fix(keyboard focus): After the login interface tab is clicked, the ESC key cannot be returned to the default display of the login interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: 登录界面tab后,esc键位无法回复登录界面默认显示 Log: https://e.gitee.com/openkylin-enterprise/issues/list?issue=I65B7Q --- src/authdialog.cpp | 2 +- src/lockwidget.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/authdialog.cpp b/src/authdialog.cpp index 11bd9a0..07f9e26 100644 --- a/src/authdialog.cpp +++ b/src/authdialog.cpp @@ -632,7 +632,7 @@ void AuthDialog::setFocusin(int target) m_messageButton->setStyleSheet("QPushButton{background-color: rgba(255,255,255,15%); border-radius: 4px; border: 2px solid #2C73C8;}"); break; default: - if(m_widgetLoginOpts) + if(m_passwordEdit) m_passwordEdit->setFocusin(target); m_widgetLoginOpts->tabOptionSelected(2); break; diff --git a/src/lockwidget.cpp b/src/lockwidget.cpp index cafeb59..f648e24 100644 --- a/src/lockwidget.cpp +++ b/src/lockwidget.cpp @@ -1862,7 +1862,7 @@ bool LockWidget::exitSubWidget() allExited = false; return allExited; } - if(tabAt != LINEEDIT) + if(tabAt != LINEEDIT && tabAt != MESSAGEBTN && tabAt != ENTERBTN && tabAt != BIOBTN) authDialog->setFocusin(REMOVE); return allExited; }