Repository navigation
feat(ui): support an image behind the candidate panel (back_image) - #1192
Open
IrisRainbowNeko wants to merge 1 commit into
Open
IrisRainbowNeko wants to merge 1 commit into
IrisRainbowNeko wants to merge 1 commit into
Conversation
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.
Implements the request in #743, kept small and opt-in.
A color scheme can now draw an image behind the panel, as image themes do in Fcitx5 and Weasel skins. Three optional keys under
preset_color_schemes/<name>:CALayer.contentsCenter). HiDPI images are drawn at their point size.back_color: 0x00fffffflets the image show under the candidates.back_imagebehave exactly as before: the image layer stays hidden and the padding is zero.The change is small (3 files, +93/-11): two
NSEdgeInsetsand aCGImageinSquirrelTheme, and inSquirrelPanelapanelViewthat holds the existing views and is inset by the padding, with an image view under it.Tested on GitHub arm64 runners — this branch on macOS 26, the same change backported to 1.1.2 on macOS 15 — by showing
SquirrelPanelwith a test image (colored corners of different sizes, striped center) in linear, stacked, vertical and single-candidate layouts and capturing the window. SwiftLint and Periphery report nothing new.在配色方案中可用一张图片作候选窗背景(九宫格拉伸),对应 #743 的需求;不设
back_image时行为不变。