fix: Dock can overlapping right-click menu#566
Merged
Conversation
PR-455 and PR-454. Set menu margin according to dock location PMS-BUG-316719
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wjyrich 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 |
deepin pr auto review代码审查意见:
综上所述,建议对代码进行重构,以提高代码质量、性能和可维护性。 |
Reviewer's GuideContext menus in AppItemMenu and DummyAppItemMenu now compute dock orientation and spacing at runtime and apply corresponding margins in fullscreen mode to avoid overlapping the dock. Sequence Diagram: Context Menu Margin Calculation LogicsequenceDiagram
actor User
participant MenuLoader as "AppItemMenu/DummyAppItemMenu"
participant ContextMenu
participant LauncherController
participant DesktopIntegration
User->>+MenuLoader: Right-click (triggers menu)
MenuLoader->>ContextMenu: Show menu
activate ContextMenu
ContextMenu->>MenuLoader: Get isFullscreen property
MenuLoader->>LauncherController: Get currentFrame
LauncherController-->>MenuLoader: Returns currentFrame
MenuLoader-->>ContextMenu: Provides isFullscreen (computed)
ContextMenu->>MenuLoader: Get dockSpacing property
MenuLoader->>DesktopIntegration: Get dockPosition
DesktopIntegration-->>MenuLoader: Returns dockPosition
MenuLoader->>DesktopIntegration: Get dockGeometry
DesktopIntegration-->>MenuLoader: Returns dockGeometry
MenuLoader-->>ContextMenu: Provides dockSpacing (computed)
ContextMenu->>DesktopIntegration: Get dockPosition (for margin side)
DesktopIntegration-->>ContextMenu: Returns dockPosition
ContextMenu-->>User: Display menu with correct margins
deactivate ContextMenu
deactivate MenuLoader
Class Diagram: Updated Menu Component StructureclassDiagram
class AppItemMenu {
+isFullscreen: bool
+isHorizontalDock: bool
+dockSpacing: int
}
class DummyAppItemMenu {
+isFullscreen: bool
+isHorizontalDock: bool
+dockSpacing: int
}
class Menu {
+topMargin: int
+bottomMargin: int
+leftMargin: int
+rightMargin: int
}
AppItemMenu "1" o-- "1" Menu : contains_internal_menu
DummyAppItemMenu "1" o-- "1" Menu : contains_internal_menu
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @wjyrich - I've reviewed your changes and they look great!
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.
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.
PR-455 and PR-454.
Set menu margin according to dock location
PMS-BUG-316719
Summary by Sourcery
Bug Fixes: