Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Plasma Desktop Plasma Desktop
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • Plasma DesktopPlasma Desktop
  • Merge requests
  • !714

Implement optional floating panel for Plasma Themes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Niccolò Venerandi requested to merge work/niccolove/floatingpanel into master Nov 24, 2021
  • Overview 37
  • Commits 11
  • Pipelines 7
  • Changes 2

This implements a way to make plasma panels floating upon Plasma Theme request.

Screenshot_20211124_115939

The API to ask for a floating panel is by adding a floating-center element in the panel svg, and then floating-hint-*-margin elements the size of the margin between the panel and the screen.

The margins are applied to the elements in the panels view. The window of the panel is then resized appropriately in panelview.cpp to be thicker by the desired margin.

Fitts law is preserved; clicking on any empty space between the panel and the screen near it will redirect input inside the panel.

When a window is maximized, the panel de-floats by filling the available space with the svg and moving the content down by relevant margin / 2 so that it's centered.

Screenshot_20211124_120318

Known (unfixable?) visual issues: shadows are not supported for floating panels, open applets extend over panel ends (Screenshot_20211124_120412)/Screenshot_20211124_120446.png)). This will be addressed when floating dialogs are implemented later on too.

Known issue: in Wayland, the floating panel preserves a weird shadow around it. It looks really bad. However I'm fairly confident it's Kwin's fault and I'll need help from a kwin dev to fix that in a separate MR.

This adds an option to toggle this on manually: image

Related MRs: plasma-workspace!1215 (merged) and frameworks/plasma-framework!493 (closed)

Edited May 03, 2022 by Niccolò Venerandi
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/niccolove/floatingpanel