feat(appearance): 候选框液态玻璃无极调节滑块 - #8
Merged
Merged
Conversation
…quirrel overwrite)
…, 0=full glass, 1=opaque)
Owner
Author
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.


目的
在设置面板「外观」页新增候选框液态玻璃程度的连续无极滑块,用于调整候选框在「液态玻璃」与「不透明」之间的过渡,改善暗色页面下候选文字的可读性。
变更内容
style/glass_opacity(Float 0~1):候选框背景不透明度。0=完全液态玻璃(透明底,露出 NSGlassEffectView 毛玻璃),1=完全不透明。sources/SquirrelTheme.swift:glassOpacity(默认按原translucency推导:true→0,false→1),被style/glass_opacity连续覆盖;panelBackgroundColor:把方案底色朝白色拉近 15%,让「玻璃感变弱」时背景微微发白、有对比,而非纯黑/纯透明。sources/SquirrelView.swift:面板背景改为panelBackgroundColor.withAlphaComponent(glassOpacity)(连续无极),替代原二值开关。EffectiveModel.swift/SettingsRepository.swift:StyleValues.glassOpacity+ 读写style/glass_opacity(写入并校验)。AppearancePage.swift:「外观」页新增「候选框液态玻璃」滑块(Slider无 step,可无极拖动;左右用「液态玻璃 / 不透明」图标示意,参考 Apple 风格)。测试
bash settings/scripts/build-app.sh release编译通过。xcodebuild编译通过。style/glass_opacity写入生效。说明
fix/update-source(更新源修复),即同时包含该修复与玻璃滑块;两者可分两个 PR 合并。panelBackgroundColor中的系数。