Skip to content

整理菜单栏内容显示选项 - #17

Merged
TNT-Likely merged 2 commits into
TNT-Likely:mainfrom
1254455745:review/menu-content-options-v2
Jun 5, 2026
Merged

整理菜单栏内容显示选项#17
TNT-Likely merged 2 commits into
TNT-Likely:mainfrom
1254455745:review/menu-content-options-v2

Conversation

@1254455745

Copy link
Copy Markdown
Contributor

这个 PR 重新整理菜单栏设置里的内容显示选项,保留原软件命名,同时把几个显示开关拆得更清楚。

改动内容:

  • 增加显示软件图标、股票代码、股票名称等开关。
  • 支持菜单栏不显示股票代码。
  • 兼容旧的“不带代码”滚动设置迁移。
  • 菜单栏渲染根据设置决定是否显示代码和名称。

验证:

  • 单独分支构建通过。

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — This PR reorganizes menu bar content display options into a dedicated "Display Content" section, adds three new toggles (showAppIcon, showQuoteCode, showQuoteName), migrates the legacy .scrollNoCode display mode to .scroll + showQuoteCode = false, and refactors icon/text layout positioning across all four ticker view types.

  • Add showAppIcon, showQuoteCode, showQuoteName preferences — Three new @Published properties in TickerPreferences following the established persistence pattern
  • Legacy .scrollNoCode migration — On init, detects the old mode and maps to .scroll + showQuoteCode = false, persisting both changes
  • leadingTextX refactoring — All four ticker views extract icon-aware horizontal offset into a private computed property, replacing hardcoded iconWidth + 6 calculations
  • Conditional icon rendering — Each view's draw(_:) gates icon behind if showsIcon
  • Conditional quote text in TickerRendererpiece(for:) conditionally appends code and name segments
  • UI reorganization — New "Display Content" Section in TickerPane; code/name toggles shown only for scroll and carousel modes
  • Localization — Four new .xcstrings entries (en + zh-Hans)

Pullfrog  | View workflow run | Using DeepSeek Flash𝕏

@TNT-Likely

Copy link
Copy Markdown
Owner

@1254455745 多谢拆分提交!这个 PR 目前和 main 有冲突了 —— #15 / #18(自动宽度)/ #21 / #22 已经合入 main,和本 PR 改动了同一批菜单栏 ticker 文件,所以产生了冲突。麻烦 rebase 到最新 main、解决冲突后再推一下,我这边复测通过就合入。🙏

@1254455745
1254455745 force-pushed the review/menu-content-options-v2 branch from e2baac3 to 33e8ca2 Compare June 4, 2026 14:52
@1254455745
1254455745 force-pushed the review/menu-content-options-v2 branch from 33e8ca2 to 5a55370 Compare June 4, 2026 15:23
@1254455745

Copy link
Copy Markdown
Contributor Author

重新提交啦,你看看~

@TNT-Likely
TNT-Likely merged commit 6e98853 into TNT-Likely:main Jun 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants