fix: adjust dark mode button style parameters and add soft shadow support / 修复深色模式按钮样式参数并新增柔和投影支持 - #676
Merged
18202781743 merged 1 commit intoSep 4, 2026
Conversation
…port Fix several dark mode (common family) button styling issues on the v25-flowstyle branch: FlowStyle.qml: - background1/background2 normalDark: reduce opacity from 1.0 to 0.6 - background1/background2 hoveredDark: reduce opacity from 0.6 to 0.4 - background1/background2 pressedDark: set to (40,40,40,1) / (46,46,46,1) - dropShadow pressedDark: add (0,0,0,0.4) for visible pressed shadow - innerShadow1 normalDark: 0.5 -> 0.2, hoveredDark: 0.6 -> 0.3 - innerShadow1 pressedDark: add transparent (fix DTK palette fallback bug) - innerShadow2 pressedDark: add (255,255,255,0.07) for subtle top highlight - insideBorder hoveredDark: add transparent (no inner border in dark hover) - outsideBorder pressedDark: add transparent (no outer border in dark pressed) BoxPanel.qml: - Add BoxShadow Loader for soft drop shadow rendering when boxShadowBlur > 0 - Hard shadow Rectangles and soft shadow Loader are mutually exclusive ButtonPanel.qml: - boxShadowBlur: pressed state uses blur=1 (soft shadow), normal/hover use 0 - Update stale comment to reflect pressed now uses soft shadow 修复深色模式按钮样式的若干问题(v25-flowstyle 分支): FlowStyle.qml: - background1/background2 normalDark 不透明度从 1.0 降至 0.6 - background1/background2 hoveredDark 不透明度从 0.6 降至 0.4 - background1/background2 pressedDark 设为 (40,40,40,1) / (46,46,46,1) - dropShadow pressedDark: 新增 (0,0,0,0.4) 按压投影 - innerShadow1 normalDark: 0.5 -> 0.2, hoveredDark: 0.6 -> 0.3 - innerShadow1 pressedDark: 新增 transparent(修复 DTK Palette 回退 bug) - innerShadow2 pressedDark: 新增 (255,255,255,0.07) 顶部高光 - insideBorder hoveredDark: 新增 transparent(深色 hover 无内描边) - outsideBorder pressedDark: 新增 transparent(深色 pressed 无外描边) BoxPanel.qml: - 新增 BoxShadow Loader,当 boxShadowBlur > 0 时渲染柔和投影 - 硬投影 Rectangle 与柔和投影 Loader 互斥,不会同时渲染 ButtonPanel.qml: - boxShadowBlur: pressed 状态使用 blur=1(柔和投影),normal/hover 使用 0 - 更新过时注释,反映 pressed 现在使用柔和投影
Reviewer's GuideFixes dark-mode common button palette fallbacks and appearance, and introduces a gated BoxShadow path so pressed buttons render with a soft one-pixel shadow while normal and hovered buttons retain hard shadows. Flow diagram for button shadow rendering by stateflowchart TD
State[Button state] --> Select[ButtonPanel selects boxShadowBlur]
Select -->|normal or hovered: 0| Hard[Hard shadow Rectangles]
Select -->|pressed: 1| Gate[BoxPanel shadow gates]
Gate -->|enableBoxShadow and enableDropShadow| Soft[Soft BoxShadow Loader]
Hard --> Render[Rendered button shadow]
Soft --> Render
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Author
18202781743
approved these changes
Sep 4, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, iCancely The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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.
Summary / 概述
Fix several dark mode (common family) button styling issues on the
v25-flowstylebranch, and add soft shadow rendering support for the pressed state.修复
v25-flowstyle分支上深色模式(common 系列)按钮的若干样式问题,并为 pressed 状态新增柔和投影渲染支持。Changes / 变更内容
FlowStyle.qml — dark mode button parameters / 深色模式按钮参数
background1.normalDark.commonopacitybackground2.normalDark.commonopacitybackground1.hoveredDark.commonopacitybackground2.hoveredDark.commonopacitybackground1.pressedDarkrgba(1,1,1,0.05)rgba(40,40,40,1)background2.pressedDarkrgba(46,46,46,1)dropShadow.pressedDarkrgba(0,0,0,0.4)innerShadow1.normalDarkrgba(0,0,0,0.5)rgba(0,0,0,0.2)innerShadow1.hoveredDarkrgba(0,0,0,0.6)rgba(0,0,0,0.3)innerShadow1.pressedDarktransparentinnerShadow2.pressedDarkrgba(255,255,255,0.07)insideBorder.hoveredDarktransparentoutsideBorder.pressedDarktransparentBoxPanel.qml — soft shadow rendering / 柔和投影渲染
Added a
BoxShadowLoaderfor soft drop shadow rendering whenboxShadowBlur > 0.Hard shadow
Rectangles (boxShadowBlur === 0) and the soft shadowLoader(boxShadowBlur > 0) are mutually exclusive — only one renders at a time.Gated by
enableBoxShadowandenableDropShadow, so checked/highlighted buttons are unaffected.新增
BoxShadowLoader,当boxShadowBlur > 0时渲染柔和投影。硬投影
Rectangle(boxShadowBlur === 0)与柔和投影Loader(boxShadowBlur > 0)互斥,同一时刻只渲染一个。受
enableBoxShadow和enableDropShadow约束,不影响 checked/highlighted 按钮。ButtonPanel.qml — pressed shadow blur / pressed 投影模糊
boxShadowBlur: pressed state usesblur=1(soft shadow), normal/hover use0(hard shadow).Updated stale comment to reflect the new behavior.
boxShadowBlur:pressed 状态使用blur=1(柔和投影),normal/hover 使用0(硬投影)。更新过时注释以反映新行为。
Verification / 验证
Compiles cleanly with no warnings (
make -j$(nproc)inbuild-dtk6/).Verified visually in
dtk6-exhibitionexample under dark theme: normal, hover, and pressed states all render correctly.编译无警告(
build-dtk6/下make -j$(nproc))。在
dtk6-exhibition示例中深色主题下目视验证:normal、hover、pressed 状态均渲染正确。Summary by Sourcery
Fix dark-mode button appearance and add soft shadows for pressed states.
New Features:
Bug Fixes:
Enhancements: