Discussion:
D15702: User can define margins for the desktop
Michail Vourlakos
2018-09-23 08:09:05 UTC
Permalink
mvourlakos created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
mvourlakos requested review of this revision.

REVISION 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

REPOSITORY
R119 Plasma Desktop

BRANCH
desktopMargins

REVISION DETAIL
https://phabricator.kde.org/D15702

AFFECTED FILES
containments/desktop/package/contents/config/main.xml
containments/desktop/package/contents/ui/ConfigTweaks.qml
containments/desktop/package/contents/ui/FolderView.qml
containments/desktop/package/contents/ui/code/LayoutManager.js
containments/desktop/package/contents/ui/main.qml

To: mvourlakos
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Michail Vourlakos
2018-09-23 08:17:17 UTC
Permalink
mvourlakos added a comment.


F6280352: desktop_margins1.png <https://phabricator.kde.org/F6280352>
desktop margins in Tweaks page

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D15702

To: mvourlakos, #plasma, davidedmundson, mart
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
David Edmundson
2018-10-15 09:18:41 UTC
Permalink
davidedmundson added a comment.


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?

INLINE COMMENTS
FolderView.qml:1127
+ //! x,y values in acceptable values
+ var boundedX = isContainment ? Math.min(Math.max(cellWidth / 2, x - main.anchors.leftMargin), scrollArea.width - cellWidth / 2) : x;
+ var boundedY = isContainment ? Math.min(Math.max(cellHeight / 2, y - main.anchors.topMargin), scrollArea.height - cellHeight / 2) : y;
I don't understand this change?

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D15702

To: mvourlakos, #plasma, davidedmundson, mart
Cc: ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Michail Vourlakos
2018-10-15 11:50:14 UTC
Permalink
mvourlakos added a comment.
Post by David Edmundson
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.
Post by David Edmundson
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.
Post by David Edmundson
Is there a use-case outside latte?
I suppose that all dock implementations fall into the case... such as Plank, Cairo dock etc...

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D15702

To: mvourlakos, #plasma, davidedmundson, mart
Cc: ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Michail Vourlakos
2018-10-15 11:56:28 UTC
Permalink
mvourlakos added inline comments.

INLINE COMMENTS
davidedmundson wrote in FolderView.qml:1127
I don't understand this change?
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.

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D15702

To: mvourlakos, #plasma, davidedmundson, mart
Cc: ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Marco Martin
2018-11-23 14:22:39 UTC
Permalink
mart added a comment.


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?

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D15702

To: mvourlakos, #plasma, davidedmundson, mart
Cc: ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Michail Vourlakos
2018-12-08 23:38:17 UTC
Permalink
mvourlakos added a comment.
Post by Marco Martin
- 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 <https://phabricator.kde.org/T10172>
Post by Marco Martin
- 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]

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D15702

To: mvourlakos, #plasma, davidedmundson, mart
Cc: ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Loading...