Skip to content

fix(settings): 统一只读设置行与操作按钮的布局 - #2467

Merged
1lck merged 2 commits into
1lck:mainfrom
WhiteZeek:fix/2151-settings-form-rows
Nov 27, 2026
Merged

1lck merged 2 commits into
1lck:mainfrom
WhiteZeek:fix/2151-settings-form-rows

Conversation

@WhiteZeek

@WhiteZeek WhiteZeek commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

关联 Issue / Linked issue

Refs #2151

配套插件改动见 lithe-plugin-java#48。

PR 类型 / Type

  • fix

改动说明 / What changes

插件设置区里,当一行只有一个占满宽度的只读文本框和一个操作按钮时,使用设置页已有的两列表单布局。使信息框、右侧按钮和上下间距与同页可编辑设置对齐。

  • 将行的纵向边距、换行间距和标题列宽提取为共享布局函数,原有声明式设置行也调用同一实现。
  • 只读文本使用 Viva 原生输入框。标题通过宿主已有的 ⓘ 按钮提供说明,右侧操作使用小尺寸按钮。
  • 窄窗口沿用表单的换行方式。登记通用插件设置能力的变化。

类型专属:fix

复现与根因

在设置区并排声明只读文本框与按钮,原先走通用视图的流式布局,按钮使用默认尺寸。与下方原生设置行对照时,标题、控件和行距不一致。

检查项

  • 变更限定在设置区上述控件组合,继续使用现有按钮事件和主题。
  • macOS、Windows 原生窗口交互与截图待验收。

范围检查 / Scope checks

项目 结论
功能矩阵 更新 declarative-plugin-settings,变更门禁及 226 项矩阵校验通过。
插件归属、逻辑归属 桌面端处理通用控件排版。插件自身的文案、测试及诊断逻辑在配套 PR。
UI 验证 已编译两个受影响的 Go 包。完整页面模拟图仅供布局参考,原生验收待补。
统一日志、i18n 沿用现有事件处理、提示及输入文案。
性能与内存 在绘制当前行时识别两个直接子节点。
设置、插件契约 继续读取现有视图模型,不写设置,无协议变更。
发行包与资源 无新资源路径或运行时文件写入。
无用代码与重构 原有设置行的相同布局已复用。

验证 / Verification

命令或操作 平台 结果
go build -p 1 ./internal/pluginview ./internal/settingswindow Windows x64 通过
verify-platform-feature-matrix-change.sh origin/main HEAD 本地 通过
verify-platform-feature-matrix.sh 本地 226 项通过
go test ./internal/pluginview ./internal/settingswindow -run 'Test(Draw|Region|NarrowInstalledRegion|MarketplaceDivider)' Windows x64,链接固定版本 Core 通过
TestNarrowInstalledRegionKeepsReadOnlyFieldActionClickable Windows x64,无头设置窗口 相同测试在修复前拖动分隔条后找不到按钮,修复后能点击并收到插件事件
仓库固定 Go 1.27.4 的 gofmt -l .,受影响包 go vet Windows x64 通过

提交前确认 / Final checks

  • 基于 main,提交为 Draft。
  • 仅包含桌面端通用设置布局和对应功能矩阵。
  • 本次提交操作未启动应用实例。

Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

@ghfind-review ghfind-review Bot added the review: no-score ghfind author score missing (not zero) label Nov 27, 2026
@WhiteZeek
WhiteZeek marked this pull request as ready for review November 27, 2026 10:54
@ghfind-review ghfind-review Bot added review: medium ghfind author score; see https://ghfind.com and removed review: no-score ghfind author score missing (not zero) labels Nov 27, 2026
@1lck
1lck merged commit c3d0842 into 1lck:main Nov 27, 2026
17 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: medium ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants