fix: 修复主页卡片编辑器深色模式样式不生效 - #1166
Open
wha7ev9r wants to merge 1 commit into
Open
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.
修复内容
修复"编辑主页卡片"对话框在深色模式下卡片编辑器背景/边框样式不生效的问题(#1080)。
根因
CardEditorWidget使用setFrameStyle(QFrame.Shape.StyledPanel | QFrame.Shadow.Raised),而QFrame.Shape.StyledPanel的枚举值为 6。但
assets/app/qss/{dark,light}/card_edit_dialog.qss中的属性选择器写的是QFrame[frameShape="5"](值为 5 的是VLine),匹配不到StyledPanel(值为 6)的卡片编辑器,导致深色模式下该区域拿不到rgba(39,39,39,0.96)深色背景与边框,渲染异常。修复方式
仅修改两处 qss 选择器:
QFrame[frameShape="5"]→QFrame[frameShape="6"](dark / light 各一行),不涉及任何 Python 代码。验证
rgba(39,39,39,0.96)的合成色 (39,39,39) ✓uv run pytest tests/ -v --tb=short:590 passed, 1 skipped ✓Related: #1080