User can define margins for the desktop
AbandonedPublic

Authored by mvourlakos on Sep 23 2018, 8:09 AM.

Details

Reviewers
davidedmundson
mart
Group Reviewers
Plasma
Summary

--Trying to find a solution in order for external docks/panels
to not overlap with desktop contents. The easiest and cleaner
way is for plasma desktop to provide margins that the user
can set to not hit such overlap.

BUG: 391073

Test Plan
  • access margins options in Tweaks only when used as containment
  • changing margins options updates the desktop boundaries for applets or files/folders when used as Folder containment
  • dragging applets on the desktop or files in a Folder containment respects the margins
  • dragging/dropping files when Folder is used as an applet is not influenced
  • multi-screen environment desktops are setting their margins independently
  • applets placeholder respects margins

Diff Detail

Repository
R119 Plasma Desktop
Branch
desktopMargins
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3142
Build 3160: arc lint + arc unit
mvourlakos created this revision.Sep 23 2018, 8:09 AM
Restricted Application added a project: Plasma. · View Herald TranscriptSep 23 2018, 8:09 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mvourlakos requested review of this revision.Sep 23 2018, 8:09 AM
mvourlakos edited the test plan for this revision. (Show Details)Sep 23 2018, 8:14 AM
mvourlakos added reviewers: Plasma, davidedmundson, mart.


desktop margins in Tweaks page

mvourlakos edited the test plan for this revision. (Show Details)Sep 23 2018, 8:19 AM

I fully understand we want something. I'm not convinced by this as-is.

Code wise we already have something to make sure Containments don't overlap with hidden panels (Corona::availableScreenRect) which we override in shellcorona, I don't think we need a second one at a different layer.

UI wise, it seems non-optimial; latte dock users have to take a manual step and we get an additionally more complex UI.
Does Latte know the size a user would want? Is there a use-case outside latte?

containments/desktop/package/contents/ui/FolderView.qml
1127

I don't understand this change?

Code wise we already have something to make sure Containments don't overlap with hidden panels (Corona::availableScreenRect) which we override in shellcorona, I don't think we need a second one at a different layer.

there is also availableScreenRegion that plasma is using when dragging applets but how can Latte access them ?
Only way I thought it would be a dbus protocol and that would make things complex.

UI wise, it seems non-optimial; latte dock users have to take a manual step and we get an additionally more complex UI.
Does Latte know the size a user would want?

Latte knows exactly how much space the user wants but I dont know how to inform plasma for this.

Is there a use-case outside latte?

I suppose that all dock implementations fall into the case... such as Plank, Cairo dock etc...

mvourlakos added inline comments.Oct 15 2018, 11:56 AM
containments/desktop/package/contents/ui/FolderView.qml
1127

when I tested the patch there was an issue when the user was dragging an applet at the edges of the desktop and in areas that now the margins are used. This qBound() is trying to only accept x,y values that are valid ones....

A case I remember was that a user was dragging an applet at the far right of the desktop and the applet was moving at the far left on the opposite side.

mart added a comment.Nov 23 2018, 2:22 PM

I'm against this kind of micro configurations, to me seems the problem could have 2 different "proper" solutions, either

  • would be needed some protocol between latte dock and plasmashell to communicate its panels geometries?
  • Or trying again in having everything in-process of plasmashell.

If i remember correctly the problem was that new functionality was needed in PanelView... we could make planelview support.. plugins?

In D15702#364805, @mart wrote:
  • would be needed some protocol between latte dock and plasmashell to communicate its panels geometries?
  • A. it could be a solution but we need to discuss how this should work etc. etc. I have opened the following T10172
  • Or trying again in having everything in-process of plasmashell. If i remember correctly the problem was that new functionality was needed in PanelView... we could make planelview support.. plugins?
  • B. I really dont know how this could work from development perspective, Latte codepage has increased vastly so to reimport all this back in plasma it would need probably something to start from scratch and use Latte codepage only as a reference to cherry-pick some of the basic functionalities.

I would prefer to discuss solution [A]

this is not needed any more... https://phabricator.kde.org/R120:328817b582fa is going to help to add transparent plasma panels below Latte docks/panels

mvourlakos abandoned this revision.Nov 6 2019, 4:53 PM