Skip to content

Add widget background style (solid / clear Liquid Glass) and tinted support - #3

Merged
TakeruF merged 1 commit into
mainfrom
feat/widget-background-style
Jul 24, 2026
Merged

Add widget background style (solid / clear Liquid Glass) and tinted support#3
TakeruF merged 1 commit into
mainfrom
feat/widget-background-style

Conversation

@TakeruF

@TakeruF TakeruF commented Jul 24, 2026

Copy link
Copy Markdown
Owner

概要

ウィジェットの背景色を設定で選べるようにし、macOS 26 の Liquid Glass / tinted 外観に対応します。

変更内容

アプリ内の背景スタイル選択

  • Solid: 従来の不透明 .fill.tertiary(light/dark 自動追従)
  • Clear (Liquid Glass): 半透明の glassEffect 背景。API が存在する macOS 26+ でのみ設定に表示し、それ以前は自動的に solid にフォールバック
  • 選択値は既存の language/notation と同様に App Group スナップショット(WidgetBackgroundStyle)で widget に渡し、変更時に再発行

OS 外観への対応

  • tinted(accented rendering mode)を最適化: ブランドアイコン・進捗バーの塗り・パーセント表示・大ウィジェットのチャート線を .widgetAccentable() でアクセントグループに配置。ラベル類は減光側に残して階層を維持
  • containerBackground は removable のままなので、OS 側の light/dark/tinted/clear がすべて機能

その他

  • サンプルデータ付き SwiftUI プレビューを追加(macOS はキャンバスでウィジェット拡張をプレビューできないため、通常View方式)
  • ローカライズ3言語(ja / zh-Hans / ko)を追加

検証

  • swift test: 111 件パス(スナップショットの後方互換デコード含む)
  • xcodebuild ... CODE_SIGNING_ALLOWED=NO: BUILD SUCCEEDED

備考

本 PR には app icon 関連(project.yml / AppIcon.icon)は含めていません。

🤖 Generated with Claude Code

…upport

Let the user choose the widget background in Settings:
- Solid: the existing opaque .fill.tertiary (light/dark aware).
- Clear (Liquid Glass): translucent glassEffect background, offered only on
  macOS 26+ where the API exists; the widget falls back to solid on older systems.

The choice rides the App Group snapshot (WidgetBackgroundStyle) alongside the
existing language/notation, and republishes on change.

Also optimize the widget for tinted (accented) rendering mode: brand icons, the
progress-bar fill, the headline percentage, and the large-widget chart line are
marked .widgetAccentable() so they take the accent colour while labels stay in
the dimmed group. containerBackground is left removable, so the OS-level
light/dark/tinted/clear appearances all work.

Adds sample-data SwiftUI previews (plain views, since macOS cannot preview a
widget extension in the canvas).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@TakeruF
TakeruF merged commit 2571cfe into main Jul 24, 2026
2 checks passed
@TakeruF TakeruF mentioned this pull request Jul 24, 2026
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.

1 participant