fix(auth-passkey): remove wordWrap to keep FIDO prompt single-line - #78
fix(auth-passkey): remove wordWrap to keep FIDO prompt single-line#78MyLeeJiEun wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: MyLeeJiEun The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @MyLeeJiEun. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves word wrapping on the FIDO/passkey prompt label so the layout structurally enforces a single-line message across greeter and lock screen, aligning behavior with other biometric auth widgets. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1e8f5f3 to
477e37f
Compare
1. Remove setWordWrap(true) from AuthPasskey::initUI 2. Align with AuthFingerprint which does not enable wordWrap 3. wordWrap plus stretch=0 let the layout shrink the label below full text width, wrapping the FIDO prompt to two lines in greeter 4. Without wordWrap the label keeps full single-line width in both greeter and lock 5. Update SPDX-FileCopyrightText year 2023 to 2026 in the file Log: Fixed FIDO security key prompt wrapping to two lines on the login screen; it now stays on a single line. Influence: 1. Log out or reboot to the login screen, switch to FIDO security key auth and confirm the prompt shows on a single line 2. On the lock screen switch to FIDO auth and confirm the prompt is still single-line (no regression) 3. Verify other auth modules (password, fingerprint, face, iris) are unaffected 4. Check the prompt under different display scales and resolutions fix: 保持 FIDO 提示单行并更新 SPDX 版权年份 1. 删除 AuthPasskey::initUI 中的 setWordWrap(true) 2. 与不开启 wordWrap 的 AuthFingerprint 保持一致 3. wordWrap 配合 stretch=0 使布局可将 label 压缩到低于整句宽度, 导致登录界面 FIDO 提示文案跨两行 4. 移除 wordWrap 后 label 保持完整单行宽度,登录与锁屏均单行展示 5. 更新文件头 SPDX-FileCopyrightText 版权年份 2023 为 2026 Influence: 1. 注销或重启到登录界面,切换到 FIDO 安全密钥认证,确认提示单行展示 2. 锁屏界面切换到 FIDO 认证,确认提示仍单行(无回归) 3. 验证其它认证模块(密码/指纹/面容/虹膜)不受影响 4. 在不同缩放与分辨率下检查提示文案显示 Log: 修复登录界面 FIDO 安全密钥提示文案跨两行显示的问题,现单行展示。 PMS: BUG-370733
477e37f to
c985bb0
Compare
问题
登录界面(greeter)切换到 FIDO 安全密钥认证后,提示文案跨两行显示;锁屏界面同一提示文案正常单行展示。
根因
AuthPasskey::initUI()(src/session-widgets/auth_passkey.cpp)中m_textLabel->setWordWrap(true)配合文本 labelstretch=0(嵌在带双侧 stretch 的子布局中),使 QHBoxLayout 可将 label 压缩至低于整句宽度,触发换行。greeter 与锁屏共用同一
AuthPasskey组件,但运行环境的缩放/字体不同:greeter(约 1.5x 缩放)渲染使文本宽度超过换行阈值,锁屏(1.0x)未超过。其它认证模块(AuthFingerprint/AuthFace/AuthIris)因不设 wordWrap 或给 label stretch=1,不受影响。改动
删除
AuthPasskey::initUI()中m_textLabel->setWordWrap(true);一行,与AuthFingerprint保持一致。/* 文案提示 */ m_textLabel->setText(tr("Please plug in the security key")); - m_textLabel->setWordWrap(true); /* 旋转提示和文案提示布局 */移除 wordWrap 后,QLabel 的
minimumSizeHint() == sizeHint()(完整单行宽度),QHBoxLayout 无法再压缩该 label,两侧 stretch 自动让出空间,文案结构性保证单行展示——对 greeter 与锁屏均生效,锁屏无回归(由"碰巧不换行"变为"结构上不可换行")。验证
说明
master分支为 v20/Qt5 变体,系统实际运行的 6.0.x 为 Qt6/snipe 变体,两者auth_passkey.cpp经验证完全一致(唯一差异即本次删除行),故直接在 master 分支提交。Summary by Sourcery
Keep passkey authentication prompts on a single line across authentication environments.
Bug Fixes:
Chores: