fix: remove wordWrap on passkey prompt label to keep single line on greeter - #77
fix: remove wordWrap on passkey prompt label to keep single line on greeter#77MyLeeJiEun 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 GuideThis PR adjusts the AuthPasskey prompt label so that the FIDO security key text consistently renders on a single line in the greeter, aligning its behavior with the fingerprint auth widget by removing word wrapping from the label. Flow diagram for AuthPasskey label layout behavior before and after wordWrap removalflowchart TD
A[AuthPasskey::initUI sets m_textLabel text] --> B{m_textLabel wordWrap enabled?}
B -- Yes (before PR) --> C[m_textLabel setWordWrap true]
C --> D[m_textLabel reports small sizeHint width]
D --> E[SFAWidget column shrinks to narrow width]
E --> F[FIDO prompt wraps to two lines on greeter]
B -- No (after PR) --> G[m_textLabel uses natural text width in sizeHint]
G --> H[SFAWidget column keeps adequate width]
H --> I[FIDO prompt renders as single line on greeter]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…reeter FIDO 认证提示文案在 greeter(10.5pt 字体)下因 `m_textLabel->setWordWrap(true)` + stretch 0 导致 sizeHint 过小、外层列收缩、短文案被挤换行。删除 wordWrap 使标签按自然宽度布局,与 auth_fingerprint 写法对齐,FIDO 提示文案稳定单行展示。同时更新文件头版权年份至 2026。关联 PMS bug 370733。 Log: 修复登录界面安全密钥 FIDO 认证提示文案跨两行显示 Bug: https://pms.uniontech.com/bug-view-370733.html
9369d31 to
d51d20d
Compare
背景
登录界面(greeter)的安全密钥 FIDO 认证提示文案跨两行显示,而锁屏界面同样场景下一行展示正常。
关联 PMS bug:https://pms.uniontech.com/bug-view-370733.html
根因
greeter 在
src/app/lightdm-deepin-greeter.cpp中显式把应用字体设为 10.5pt(为修复 bug 161915),而AuthPasskey的m_textLabel没有显式绑定字号、直接继承应用字体。initUI()中m_textLabel->setWordWrap(true)与m_stretchLayout->addWidget(m_textLabel, 0)(stretch 0)组合,使标签上报一个很小的sizeHint宽度,导致外层SFAWidget居中列收缩到很窄,标签被分配到约 100px 固定宽度;一旦文案自然宽度(随字号增大)超过该宽度就换行成两行。改动
src/session-widgets/auth_passkey.cpp::initUI()删除一行m_textLabel->setWordWrap(true);,与兄弟控件auth_fingerprint.cpp(不设 wordWrap、greeter/锁屏均正常单行)的写法对齐。删除 wordWrap 后,标签
sizeHint即文案自然宽度,打破「小 sizeHint → 外层列收缩 → 标签被挤 → 换行」的反馈链,FIDO 短提示可稳定单行展示。spinner 与两侧addStretch(1)的居中布局保持不变。注意事项
m_textLabel,行为一致。验证
建议在 greeter(10.5pt 字体)与锁屏两种场景下分别切到安全密钥认证界面,确认上述文案单行展示且无截断。
Summary by Sourcery
Prevent passkey prompt labels from wrapping so security-key authentication messages remain readable on one line.
Bug Fixes:
Chores: