fix(keyboard focus): After the login interface tab is clicked, the ESC key cannot be returned to the default display of the login interface

Description: 登录界面tab后,esc键位无法回复登录界面默认显示

Log: https://e.gitee.com/openkylin-enterprise/issues/list?issue=I65B7Q
This commit is contained in:
winnerym 2023-03-22 14:56:29 +08:00
parent a91e53d65f
commit d220efe8cf
2 changed files with 2 additions and 2 deletions

View File

@ -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;}"); m_messageButton->setStyleSheet("QPushButton{background-color: rgba(255,255,255,15%); border-radius: 4px; border: 2px solid #2C73C8;}");
break; break;
default: default:
if(m_widgetLoginOpts) if(m_passwordEdit)
m_passwordEdit->setFocusin(target); m_passwordEdit->setFocusin(target);
m_widgetLoginOpts->tabOptionSelected(2); m_widgetLoginOpts->tabOptionSelected(2);
break; break;

View File

@ -1862,7 +1862,7 @@ bool LockWidget::exitSubWidget()
allExited = false; allExited = false;
return allExited; return allExited;
} }
if(tabAt != LINEEDIT) if(tabAt != LINEEDIT && tabAt != MESSAGEBTN && tabAt != ENTERBTN && tabAt != BIOBTN)
authDialog->setFocusin(REMOVE); authDialog->setFocusin(REMOVE);
return allExited; return allExited;
} }