✨ Allow configuring a vertical gutter separator
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- macos, swift
- 领域
- design, desktop-dev
调研方向
首先阅读 GutterView 以及周围的 SourceEditor gutter 布局和绘制代码。跟踪 gutter 宽度如何随行号位数变化,然后定义一个向后兼容的可选分隔线,并支持配置颜色和绘制样式;完成的标准是它默认保持禁用,并在 gutter 宽度变化时跟随 gutter 边界。
由索引模型根据 Issue 内容生成。
描述
Description
Please allow API consumers to configure an optional vertical separator between the line-number gutter and the editor content.
Some editor designs use a thin solid or dashed line beside the line numbers. The separator needs to be drawn by the gutter itself because the gutter width changes as the document's line-number digit count grows. There is currently no public configuration for this, so matching such a design requires maintaining a fork of GutterView.
A backward-compatible configuration could keep the separator disabled by default and allow consumers to specify its color and drawing style. The exact API is open to the maintainers' preference.
Alternatives Considered
- Overlaying a line outside
SourceEditor. This cannot reliably follow the gutter because its width is managed internally and changes with the number of line-number digits. - Making internal gutter layout properties public. A configuration option would expose less implementation detail.
Additional Context
Our current use case is a 1 pt separator using NSColor.separatorColor with a [1, 1] dash pattern.
No matching open or closed issue was found before filing this request. Observed on current main at revision 1fa4d3c.
Screenshots
Not included.
- 主要语言
- Swift
- 星标
- 720
- 派生
- 162
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CodeEditApp/CodeEditSourceEditor 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
CodeEditApp/CodeEditSourceEditor#377 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
CodeEditApp/CodeEditSourceEditor#376 · 1 条评论 ·
-
难度 1/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 32/100
-
bug
难度 3/5 1-2 天 新手友好度 45/100
查看 CodeEditApp/CodeEditSourceEditor 的全部 Issue
相似的 Issue
-
area:dictation documentation P2
难度 2/5 1-3 小时 新手友好度 78/100
uttrflow/uttrflow-swift#1180 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 84/100
OneBusAway/onebusaway-ios#1451 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100