Skip to content

Conversation

@deepin-ci-robot
Copy link
Contributor

@deepin-ci-robot deepin-ci-robot commented Feb 27, 2025

Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#468

Summary by Sourcery

Replace MouseArea with TapHandler and HoverHandler in TitleBar and DialogTitleBar QML components. This change improves the handling of mouse events, especially right-click events for opening the system window menu.

@deepin-ci-robot
Copy link
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-ci-robot

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @deepin-ci-robot - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider whether TapHandler is the correct replacement for MouseArea given the different semantics.
  • The change from implicitHeight: (!__isFullScreen || __isVisible) ? DS.Style.titleBar.height : 0 to implicitHeight: (!__isFullScreen || __isVisible) ? DS.Style.titleBar.height : 1 looks suspicious - is there a reason for this change?
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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.

property var __dwindow: Window.window.D.DWindow
property bool __isFullScreen: Window.window.visibility === Window.FullScreen
property bool __isVisible: mouseArea.containsMouse
property bool __isVisible: hovereHandler.hovered
Copy link

Choose a reason for hiding this comment

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

nitpick (typo): Consider renaming 'hovereHandler' for clarity.

The identifier 'hovereHandler' seems like it might be a typo. Renaming it to 'hoverHandler' could enhance code readability and consistency.

Suggested implementation:

    property bool __isVisible: hoverHandler.hovered

Ensure that all other instances of "hovereHandler" are similarly renamed to "hoverHandler" throughout the file.

@deepin-ci-robot deepin-ci-robot force-pushed the sync-pr-468-nosync branch 3 times, most recently from d4b0578 to 02745cc Compare February 27, 2025 10:01
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#468
@18202781743 18202781743 merged commit 0dcb4ee into master Feb 27, 2025
11 of 13 checks passed
@18202781743 18202781743 deleted the sync-pr-468-nosync branch February 27, 2025 12:11
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.

3 participants