Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR adjusts the eyeComfort switch row layout so its height and spacing match the design-spec 48px row height and 6px gap to the following group, by explicitly zeroing out the top/bottom insets while preserving existing margins for the right-side switch control. Sequence diagram for updated eyeComfort row layout handlingsequenceDiagram
participant EyeComfort
participant ParentItem
participant DccEditorItem
EyeComfort->>ParentItem: onParentItemChanged item
rect rgb(230,230,255)
EyeComfort->>ParentItem: topInset = 0
EyeComfort->>ParentItem: bottomInset = 0
EyeComfort->>ParentItem: rightItemTopMargin = 6
EyeComfort->>ParentItem: rightItemBottomMargin = 6
end
ParentItem->>DccEditorItem: implicitHeight
DccEditorItem->>DccEditorItem: implicitHeight = max(48, ...) + topInset + bottomInset
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot New tag: 6.1.105 |
0493bc1 to
2ffecf9
Compare
The editor row height/gap spec (description rows 48px, gap 6px) is a common design rule, not an eye-comfort-only tweak. Move it to the framework so every non-group Editor/MenuEditor row with a description gets 0/0 insets (48px content) instead of the delegate's default 3/3 (54px), matching group-internal description rows. Group-external rows without a description keep 3/3, so the existing d0b4e85 spacing for single-line switches is preserved. Affected rows: eyeComfort, grubTheme, regions, regionAndFormat (all 54->48px). Group-internal description rows (15) and group-external no-description rows are unchanged. Also restore Layout.minimumHeight on DccEditorItem. The implicitHeight Math.max(48,40,...) floor is dead code: DccEditorItem inherits QQuickControl, which recomputes implicitHeight from content and overrides the QML binding, so the 40/48 floor never took effect and colorTemperature (no description, content ~38) rendered 38px. Layout .minimumHeight is enforced by the parent ColumnLayout and not overridden by QQuickControl, so no-description rows are at least 40px and description rows at least 48px. Only raises rows below the floor, never lowers them. Influence: 1. Verify eye-comfort switch row height is 48px and gap to group is 6px 2. Verify grubTheme / regions / regionAndFormat rows are 48px 3. Verify color-temperature row height is 40px 4. Regression: group-internal description rows and no-description rows unchanged fix(dcc): 框架级 48px 行高与编辑项最小高度 带 description 的编辑项 48px 行高 + 6px 间距是通用设计规范,不应靠 eyeComfort 单点覆盖。将修复提到框架层:组外带 description 的 Editor/MenuEditor 项委托 inset 由 3/3 改为 0/0(48px 内容行),与组内 带 description 项对齐;组外无 description 项维持 3/3,保留 d0b4e85 对单行开关的间距意图。受影响项:eyeComfort、grubTheme、regions、 regionAndFormat(均 54→48px)。组内带 description 项(15 个)与组外 无 description 项不变。 同时在 DccEditorItem 补回 Layout.minimumHeight。implicitHeight 的 Math.max(48,40,...) 下限是死代码:DccEditorItem 继承 QQuickControl, Control 按内容重算 implicitHeight 并覆盖 QML 绑定,故下限从未生效、 colorTemperature(无描述、内容约 38)渲染 38px。Layout.minimumHeight 由父级 ColumnLayout 强制执行、不被 QQuickControl 覆盖,使无描述项 至少 40px、有描述项至少 48px。只抬高低于下限的行,不压低任何行。 Influence: 1. 验证护眼模式开关项行高 48px、与下方组间距 6px 2. 验证 grubTheme / regions / regionAndFormat 行高为 48px 3. 验证色温调节项行高为 40px 4. 回归:组内带 description 项与组外无 description 项无变化 PMS: bug-308813
2ffecf9 to
212f676
Compare
|
TAG Bot New tag: 6.1.106 |
|
TAG Bot New tag: 6.1.107 |
修复内容(框架级实现)
将「带 description 的编辑项 48px 行高 + 6px 间距」从 eyeComfort 单点覆盖提升为框架级默认,并补回
DccEditorItem.Layout.minimumHeight解决行高下限死代码。本 PR 取代之前的 eyeComfort 单点覆盖方案,diff 仅 2 个文件。改动(2 个文件)
1.
src/dde-control-center/plugin/DccGroupView.qml— Editor + MenuEditor 委托 inset 条件化(#2/#4 通用化)Editor 与 MenuEditor 委托的
topInset/bottomInset:即「组内项 OR 组外带 description 项」→ 0/0(48px 内容行,与组内带 description 项对齐);组外无 description 项维持 3/3。Menu 委托与 Item 委托未改,标题/分组容器不受影响。
2.
src/dde-control-center/plugin/DccEditorItem.qml— 补回Layout.minimumHeight(#5)implicitHeight: Math.max(model.item.description.length !== 0 ? 48 : 40, implicitContentHeight) + topInset + bottomInset + Layout.minimumHeight: (model.item.description.length !== 0 ? 48 : 40) + topInset + bottomInsetimplicitHeight的Math.max(48,40,...)下限是死代码(DccEditorItem继承QQuickControl,Control 按内容重算覆盖绑定)。Layout.minimumHeight由父级ColumnLayout强制执行、不被覆盖,使无描述项至少 40px、有描述项至少 48px。只抬高低于下限的行,不压低任何行。与前一版(eyeComfort 单点覆盖)的差异
DisplayMain.qml的 eyeComforttopInset=0/bottomInset=0单点覆盖(由框架默认接管)。console.log(Update zh_TW.po #1 诊断,不进入正式提交)。DisplayMain.qml现与 master 无 diff,本 PR diff 仅含上述 2 个文件。5 条 UI 要求覆盖
DccTitleObject=14 +displayColorTemperature.leftPadding=14,已满足)rightItemTopMargin/BottomMargin=6调右侧 Switch;文字列为 AlignVCenter,需 UI 实测兜底,后续跟进)回归影响
框架级改动精确影响 4 个组外带 description 的 Editor 项(行高 54→48px):
eyeComfortgrubThemeregions、regionAndFormat不受影响:组内带 description 项(约 15 个,本就 0/0)、组外无 description 项(维持 3/3)、Menu/Item 委托(未改)。建议安装 deb 后抽查上述 4 项行高 48px、间距无视觉异常。
说明
DisplayMain.qml无 diff)。关联
691df0b38(本 PR 以框架级方案补全其 eyeComfort 行高/间距,并修复 Layout.minimumHeight 下限)