Repository navigation
顶栏三窗口切换改原生分段胶囊控件;发送按钮实心朱砂红 - #306
Merged
Merged
Conversation
- 新增 WeiBeiSegmentedControl:外层胶囊 + 悬浮药丸滑入悬停段 + 仅在未被高亮吸收的分段间渲染白色细分隔线;选中面板保持白色药丸与朱砂图标,文字缩放/减少动态全程生效 - ContentView 顶栏 paneToggleCluster 换用该组件,交互与 macOS 原生分段控件对齐 - WeiBeiIconButtonStyle .primary 改为实心朱砂填充、图标恒为米白(发送按钮),去掉玻璃半透明按压感
v1 用 ZStack+offset 摆按钮,布局位置与渲染位置分离,在应用真实环境 (overlay 居中+环境动画)下产生偏移、按钮越出胶囊。v2 每个按钮是 HStack(spacing:0) 的真实布局单元,胶囊/药丸/分隔线全部作为固定 网格上的装饰层,离屏渲染像素级验证 1.0/1.25 缩放、overlay 摆放、 hover、选中态均精确对位。
taekchef
marked this pull request as ready for review
August 22, 2026 04:27
This was referenced Aug 22, 2026
Merged
Merged
Merged
wang-kaopu
pushed a commit
to wang-kaopu/weibei
that referenced
this pull request
Aug 23, 2026
固定 100ms 睡眠在满载 CI runner 上会被 20ms 空闲计时器超出 主线程调度窗口,今天三次假失败(WroughtMind#287/WroughtMind#306/WroughtMind#311)。改为最长 2s 的 10ms 轮询:正常路径仍在一个空闲延迟内返回,只有真实失败才 等满时限;断言语义(恰好一条、最小修订 2)不变。
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
实际改动
Sources/WeiBei/Views/WeiBeiSegmentedControl.swift:macOS 原生风格分段胶囊控件。外层一个胶囊容器;悬停段浮现一个略长的圆角药丸(在胶囊内部),并在分段间平滑滑动;白色细分隔线只出现在未被高亮吸收的分段之间(悬停第 1 段时,第 2/3 段之间显示白色小线,与原生一致)。选中(面板打开)的分段保持白色药丸 + 朱砂图标。支持文字缩放档位与减少动态效果。HStack(spacing: 0)的真实布局单元,胶囊/药丸/分隔线全部是固定网格上的装饰层,分段位置不可能漂出胶囊。首版用 ZStack+offset 摆按钮,在真实应用环境(overlay 居中 + 环境动画)下出现按钮偏移越出胶囊,已重写修复并重新打包验证。ContentView.swift:顶栏paneToggleCluster由三个独立圆角按钮改为WeiBeiSegmentedControl,图标、help 提示、行为(toggleReader/Agent/Notes)不变。Theme.swift:WeiBeiIconButtonStyle的.primary渲染改为实心朱砂填充、图标恒为米白(发送按钮),去掉按压时的玻璃半透明感。发送按钮是.primary的唯一调用方,NotesAgentView零改动。未做内容
共享核心文件占用
Sources/WeiBei/Views/ContentView.swift(仅 paneToggleCluster 一处)验证
swift build通过。轻量冒烟