Skip to content

fix: correct text elision behavior with shortcuts#660

Merged
18202781743 merged 1 commit intolinuxdeepin:masterfrom
18202781743:master
Apr 29, 2025
Merged

fix: correct text elision behavior with shortcuts#660
18202781743 merged 1 commit intolinuxdeepin:masterfrom
18202781743:master

Conversation

@18202781743
Copy link
Contributor

Fixed the text elision behavior in DLabel to properly handle cases
where the label contains shortcut mnemonics. The change modifies the
Qt::TextShowMnemonic flag to only be applied when the label actually has
a shortcut (d->hasShortcut). This prevents incorrect text display when
eliding labels without shortcuts.

fix: 修正带快捷键标签的文本省略行为

修复了 DLabel 中文本省略行为,正确处理包含快捷键助记符的情况。修改了
Qt::TextShowMnemonic 标志,使其仅在标签实际具有快捷键(d->hasShortcut)时
应用。这防止了在没有快捷键的标签上出现错误的文本显示。

pms: BUG-285143

@18202781743 18202781743 requested review from BLumia and mhduiy April 28, 2025 10:45
deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Apr 28, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#660
Fixed the text elision behavior in DLabel to properly handle cases
where the label contains shortcut mnemonics. The change modifies the
Qt::TextShowMnemonic flag to only be applied when the label actually has
a shortcut (d->hasShortcut). This prevents incorrect text display when
eliding labels without shortcuts.

fix: 修正带快捷键标签的文本省略行为

修复了 DLabel 中文本省略行为,正确处理包含快捷键助记符的情况。修改了
Qt::TextShowMnemonic 标志,使其仅在标签实际具有快捷键(d->hasShortcut)时
应用。这防止了在没有快捷键的标签上出现错误的文本显示。

pms: BUG-285143
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • flags 变量在修改后的代码中未定义,可能会导致编译错误。
  • toolTipShowMode 变量在修改后的代码中未定义,可能会导致编译错误。

是否建议立即修改:

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Apr 29, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#660
@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, mhduiy, yixinshark

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@18202781743 18202781743 merged commit 70e2338 into linuxdeepin:master Apr 29, 2025
19 of 21 checks passed
18202781743 pushed a commit to linuxdeepin/dtk6widget that referenced this pull request Apr 29, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants