Skip to content

refactor: remove Qt5Compat dependency - #225

Merged
hthienloc merged 1 commit into
hthienloc:mainfrom
bbedward:main
Aug 20, 2026
Merged

refactor: remove Qt5Compat dependency#225
hthienloc merged 1 commit into
hthienloc:mainfrom
bbedward:main

Conversation

@bbedward

@bbedward bbedward commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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

  • I have tested these changes on my setup
  • I have updated the documentation (README, IPC/settings docs) if needed
  • I have verified the plugin loads without errors

Summary by Sourcery

Remove the Qt5Compat dependency from floating image rendering.

Enhancements:

  • Replace the Qt5Compat opacity mask with Qt 6 MultiEffect masking for rounded floating images.

Build:

  • Remove the Qt5Compat GraphicalEffects dependency from the documented requirements.

@sourcery-ai

sourcery-ai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This 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 MultiEffect

flowchart 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
Loading

File-Level Changes

Change Details Files
Replace Qt5Compat OpacityMask usage with Qt6 MultiEffect-based masking for floating image corner clipping.
  • Switch QML import from Qt5Compat.GraphicalEffects to QtQuick.Effects
  • Change layer.effect from GE.OpacityMask to MultiEffect with maskEnabled and maskSource
  • Introduce a reusable Rectangle-based mask object that mirrors the image size and corner radius and is used as the MultiEffect mask source
components/floating/FloatWindow.qml
Remove Qt5Compat GraphicalEffects from documented dependencies.
  • Delete the Qt5Compat GraphicalEffects / qt6-qt5compat line from the dependency table in the README
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread components/floating/FloatWindow.qml
@hthienloc
hthienloc merged commit 8a836cb into hthienloc:main Aug 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants