refactor: remove Qt5Compat dependency - #225
Merged
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR removes the Qt5Compat GraphicalEffects dependency by replacing the OpacityMask-based corner clipping of floating images with Qt6’s MultiEffect and a dedicated Rectangle mask, and updates the README to no longer list Qt5Compat as a requirement. Flow diagram for updated floating image corner clipping with MultiEffectflowchart LR
PanelWindow --> img
img --> MultiEffect
imgMask[Rectangle imgMask]
imgMask --> MultiEffect
subgraph MaskSetup
imgMask --- img
end
subgraph EffectLayer
MultiEffect --> ClippedImage[img with clipped corners]
end
ClippedImage --> PanelWindow
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="components/floating/FloatWindow.qml" line_range="401-408" />
<code_context>
}
}
+ Rectangle {
+ id: imgMask
+ anchors.fill: img
+ radius: Math.max(0, Theme.cornerRadius - window.borderWidth)
+ visible: false
+ antialiasing: true
+ layer.enabled: true
+ }
+
</code_context>
<issue_to_address>
**suggestion (performance):** Re-evaluate whether `imgMask.layer.enabled: true` is necessary, as it may introduce extra offscreen rendering.
Because this Rectangle is only used as `maskSource` and never shown, enabling its layer likely causes an unnecessary offscreen render pass. If `MultiEffect` can sample `maskSource` from a non-layer Item (as expected), you can remove `layer.enabled: true` on `imgMask` to avoid the extra overhead.
```suggestion
Rectangle {
id: imgMask
anchors.fill: img
radius: Math.max(0, Theme.cornerRadius - window.borderWidth)
visible: false
antialiasing: true
}
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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
Use qt6 MultiEffect to clip the floating image corners instead of Qt5 OpacityMask
Use Case
Removes the Qt5Compat dependency, which DMS users may not have installed by default
Changes
Related Issues
Testing
Screenshots / Screen Recordings
Checklist
Summary by Sourcery
Remove the Qt5Compat dependency from floating image rendering.
Enhancements:
Build: