fix: adjust menu item height, separator spacing and dark mode - #711
Conversation
|
Hi @zqq-dora. 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 compacts menu layout, adds consistent separator spacing and dark-mode coloring, binds menus to the DTK palette to preserve highlight colors in inactive popups, and suppresses hover highlighting for disabled items. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1. Reduce menu item height from 30px to 26px for compact layout 2. Add menu item padding property (3px) to constrain content height 3. Reduce menu top/bottom padding from 8px to 6px 4. Set separator top/bottom padding to 3px for proper spacing 5. Add normalDark color for separator to fix invisible separator in dark mode 6. Disable highlight for disabled menu items in MenuItem.qml 7. Update SPDX copyright year in MenuItem.qml Log: Fix menu styling and dark mode rendering issues Influence: 1. Verify menu item height is 26px and content fits within bounds 2. Verify separator appears with 3px padding above and below 3. Verify separator is visible in dark mode 4. Verify disabled menu items show no hover highlight effect 5. Verify menu top/bottom edge padding is 6px fix: 调整菜单项高度、分割线间距及深色模式样式 1. 菜单项高度从30px调整为26px,使布局更紧凑 2. 添加菜单项padding属性(3px),限制内容高度不超出26px 3. 菜单上下边距从8px调整为6px 4. 分割线上下间距设置为3px,保证合理的间距 5. 添加分割线深色模式颜色,修复深色模式下分割线不可见的问题 6. MenuItem.qml中禁用项不再显示hover高亮效果 7. 更新MenuItem.qml的SPDX版权年份 Log: 修复菜单样式及深色模式渲染问题 Influence: 1. 验证菜单项高度为26px,内容不超出边界 2. 验证分割线上下间距为3px 3. 验证深色模式下分割线可见 4. 验证禁用菜单项不显示hover高亮效果 5. 验证菜单上下边距为6px
9a896f0 to
7b5a71c
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, zqq-dora 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 |
d7830c1
into
linuxdeepin:v25-flowstyle
Summary
normalDarkcolor for separator to fix invisible separator in dark modepalette: D.DTK.palettebinding in Menu.qml to fix greyed-out highlight color when popup window is not activeFiles Changed
qt6/src/qml/FlowStyle.qml— menu height/padding/separator style values and dark mode separator colorqt6/src/qml/Menu.qml— palette binding fixqt6/src/qml/MenuItem.qml— padding source and disabled highlight fixRoot Cause
lineColorpalette inFlowStyle.qmlwas missing thenormalDarkproperty, so the separator fell back to the light-mode color (Qt.rgba(0, 0, 0, 0.1)) which is nearly invisible on dark backgrounds.Menu.qmlwas missing thepalette: D.DTK.palettebinding thatPopup.qmlalready had. Without it, the highlight color used the default window palette instead of the DTK theme palette when the popup window was not active.MenuItem.qmlapplied thehighlightedstate based purely onhovered, without checkingenabled, so disabled items still showed a hover highlight effect.概述(中文)
根本原因
FlowStyle.qml中lineColor调色板缺少normalDark属性,导致深色模式下分割线回退使用浅色模式颜色(Qt.rgba(0, 0, 0, 0.1)),在深色背景上几乎不可见。Menu.qml缺少palette: D.DTK.palette绑定(Popup.qml中已有此绑定)。缺少该绑定时,弹出窗口非激活状态下高亮颜色使用默认窗口调色板而非 DTK 主题调色板。MenuItem.qml中highlighted状态仅基于hovered判断,未检查enabled,导致禁用项仍显示 hover 高亮效果。Summary by Sourcery
Improve menu layout and theming while correcting separator, popup highlight, and disabled-item hover behavior.
Bug Fixes:
Enhancements: