-
Notifications
You must be signed in to change notification settings - Fork 55
style: enhance OSD window visual effects #1131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideRefactors OSD window styling by extracting windowRadius to a dedicated property, adding theme-aware DWindow borderColor, introducing StyledBehindWindowBlur and InsideBoxBorder components for consistent blur and inner borders, removing legacy FloatingPanel styling, and centralizing theme-based color selection for improved maintainability and visual consistency. Class Diagram: OSD Window Styling RefactorclassDiagram
class Window_OSD {
+windowRadius: var <<new_property>>
+D_DWindow_windowRadius: var /* updated to use root.windowRadius */
+D_DWindow_borderColor: color <<new_property>>
+color: "transparent"
+osdView: Item
+isSingleView: bool
}
note for Window_OSD "Main OSD Window (main.qml from panels/notification/osd/package/main.qml).\nKey changes:\n- 'windowRadius' property extracted and defined on root.\n- 'D.DWindow.borderColor' added, theme-dependent.\n- 'D.DWindow.windowRadius' updated to use root.windowRadius."
class StyledBehindWindowBlur {
<<New Component>>
+control: Item
+anchors: fill
+blendColor: color /* theme-aware, logic detailed in separate flow diagram */
}
note for StyledBehindWindowBlur "org.deepin.dtk.StyledBehindWindowBlur (D.StyledBehindWindowBlur)\nNew component added to Window_OSD for improved background blur effect."
class InsideBoxBorder {
<<New Component>>
+insideBorderColor: D_Palette
+radius: var /* uses Window_OSD.windowRadius */
+anchors: fill
+z: int
+color: ColorSelector_insideBorderColor
}
note for InsideBoxBorder "org.deepin.dtk.InsideBoxBorder (D.InsideBoxBorder)\nNew component added to Window_OSD for consistent inner border styling."
class ControlItem_Delegate {
+contentItem: model.data
-- background: D_FloatingPanel /* styling removed */ --
}
note for ControlItem_Delegate "Represents the sourceComponent for items in the OSD Repeater.\nBackground styling previously done by D.FloatingPanel is removed.\nVisuals now enhanced by Window_OSD's global effects (StyledBehindWindowBlur, InsideBoxBorder)."
class D_FloatingPanel {
-- backgroundColor --
-- insideBorderColor --
-- outsideBorderColor --
}
note for D_FloatingPanel "org.deepin.dtk.D.FloatingPanel\nIts role for background and border styling of OSD items (ControlItem_Delegate) has been removed in this context."
Window_OSD "1" o-- "1" StyledBehindWindowBlur : uses
Window_OSD "1" o-- "1" InsideBoxBorder : uses
Window_OSD "1" *-- "0..N" ControlItem_Delegate : creates_delegates_for
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mhduiy - I've reviewed your changes - here's some feedback:
- Consider using a typed
property real windowRadiusinstead ofvarto make the numeric intent explicit. - Extract the hard-coded RGBA values in
StyledBehindWindowBlur.blendColorinto theme/style tokens or palette entries to avoid magic numbers and improve consistency. - Verify that enabling both
D.DWindow.enableBlurWindowandStyledBehindWindowBlurdoesn’t cause redundant blur layers or impact rendering performance.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy 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 |
1. Extracted windowRadius to a property for better maintainability 2. Added borderColor property for DWindow based on theme type 3. Implemented StyledBehindWindowBlur for improved background blur effect with theme-aware colors 4. Added InsideBoxBorder component for consistent inner border styling 5. Removed FloatingPanel background and delegated styling to new components 6. Improved color handling with proper theme-based selections These changes enhance the visual consistency and theme responsiveness of the OSD window while making the code more maintainable by separating styling concerns into dedicated components. The new implementation provides better visual feedback and matches the system theme more accurately. style: 优化 OSD 窗口视觉效果 1. 将 windowRadius 提取为属性提高可维护性 2. 根据主题类型为 DWindow 添加 borderColor 属性 3. 实现 StyledBehindWindowBlur 提供改进的背景模糊效果,支持主题颜色 4. 添加 InsideBoxBorder 组件实现统一的内边框样式 5. 移除 FloatingPanel 背景,将样式委托给新组件 6. 改进颜色处理,支持基于主题的选择 这些变更增强了 OSD 窗口的视觉一致性和主题响应能力,同时通过将样式关注点 分离到专用组件中提高了代码可维护性。新实现提供了更好的视觉反馈,并能更准 确地匹配系统主题。 pms: BUG-294195
|
/forcemerge |
deepin pr auto review关键摘要:
是否建议立即修改:
|
|
This pr force merged! (status: blocked) |
These changes enhance the visual consistency and theme responsiveness of the OSD window while making the code more maintainable by separating styling concerns into dedicated components. The new implementation provides better visual feedback and matches the system theme more accurately.
style: 优化 OSD 窗口视觉效果
这些变更增强了 OSD 窗口的视觉一致性和主题响应能力,同时通过将样式关注点
分离到专用组件中提高了代码可维护性。新实现提供了更好的视觉反馈,并能更准
确地匹配系统主题。
pms: BUG-294195
Summary by Sourcery
Enhance OSD window visual styling by centralizing radius and border properties, improving blur effects, and delegating appearance to dedicated components for consistent theme responsiveness and maintainability.
Enhancements: