Skip to content

feat(theme): support gradient and translucent color fills - #1181

Open
jh244212647 wants to merge 2 commits into
rime:masterfrom
jh244212647:master
Open

jh244212647 wants to merge 2 commits into
rime:masterfrom
jh244212647:master

Conversation

@jh244212647

Copy link
Copy Markdown

Introduce ThemeFill (solid NSColor or CSS-like linear/radial/conic gradient with multiple color stops) parsed in the new SquirrelColor.swift, plus ThemeFillRenderer that draws gradients via CAGradientLayer masked by the shape path. SquirrelTheme background/highlight/candidate/preedit/border colors now use ThemeFill; text colors stay solid NSColor. Plain 0x/# colors still degrade to solid fills, so existing schemes are unaffected. data/squirrel.yaml gains gradient example schemes.

zhangsheng added 2 commits September 29, 2026 19:23
Introduce ThemeFill (solid NSColor or CSS-like linear/radial/conic gradient with multiple color stops) parsed in the new SquirrelColor.swift, plus ThemeFillRenderer that draws gradients via CAGradientLayer masked by the shape path. SquirrelTheme background/highlight/candidate/preedit/border colors now use ThemeFill; text colors stay solid NSColor. Plain 0x/# colors still degrade to solid fills, so existing schemes are unaffected. data/squirrel.yaml gains gradient example schemes.
Use NSGlassEffectView style .regular instead of .clear, and set cornerRadius/tintColor from the active theme so the glass matches panel rounding and picks up the theme background hue. Opaque backgrounds still hide the glass; translucent themes now show a stronger liquid glass effect.
@LEOYoon-Tsaw

Copy link
Copy Markdown
Member

This adds a lot of complexity, let's see how many people would support it
Thump this up if you like it,支持請點讚
Let's see people's choice

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