Port FolderView to ContainmentLayoutManager plugin

Authored by mart on Jun 23 2019, 11:26 AM.



Remove the Javascript based layout manager and use the ContainmentLayoutManager plugin instead.
functionality doesn't change, minimal ui changes and solves some issues related to plasmoids resizing and screen resolution changes: now applets stay with the same distance to their nearest border or center.
Touch manipulation also works better as resize handles and applet handle buttons become bigger when interacting with touch, also pinch-based resizing is now possible

Depends on D22034

Test Plan

running since a while, seems to be stable and some of long standing bugs seem to be solved.
now resizing gets correctly blocked when it collides with another applet and changing temporarly screen resolution doesn't mess up the layout that much
Config migration script also works correctly

Diff Detail

R119 Plasma Desktop
Lint OK
No Unit Test Coverage
Build Status
Buildable 13224
Build 13242: arc lint + arc unit
mart created this revision.Jun 23 2019, 11:26 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 23 2019, 11:26 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart requested review of this revision.Jun 23 2019, 11:26 AM
mart updated this revision to Diff 60461.Jun 23 2019, 11:27 AM
  • no automatic edit mode for now
mart retitled this revision from first prototype of port to the new C++ layout code to Port FolderView to ContainmentLayoutManager plugin.Jun 23 2019, 11:33 AM
mart edited the summary of this revision. (Show Details)
mart edited the test plan for this revision. (Show Details)
mart added a comment.EditedJun 23 2019, 12:08 PM

That's the only graphical change: note that the loss of the "merging" of the applet handle makes the code much simpler and same some memory, while makes it possible to have visible resize handles all around (before it had them only in the sides without big applethandle)


+1 visually!

I wonder if it might make sense to make the icons on the handle bigger even in desktop mode. They're awfully small, and bigger click targets can help desktop users, too.

Works perfectly with my testing on using both a pointing device and touchscreen. The touchscreen use case in particular is hugely improved.

I'm not an expert on this code, but it looks pretty sane to me on read-through.


The feature seems to work without this commented code; can we remove it?

mart updated this revision to Diff 60493.Jun 23 2019, 2:25 PM
  • remove dead code
mart marked an inline comment as done.Jun 23 2019, 2:25 PM
ngraham accepted this revision.Jun 23 2019, 3:40 PM
This revision is now accepted and ready to land.Jun 23 2019, 3:40 PM
mart updated this revision to Diff 61577.Jul 11 2019, 10:39 AM
  • adapt to api change
  • add migration script
mart edited the test plan for this revision. (Show Details)Jul 11 2019, 10:44 AM
mart updated this revision to Diff 61974.Jul 18 2019, 12:17 PM
  • use the locked editmodecondition
davidedmundson added inline comments.

why do we do it explicitly here, but backed by a timer for movement?


leftover debug

mart updated this revision to Diff 61988.Jul 18 2019, 4:01 PM
mart marked an inline comment as done.
  • remove leftovers
mart added inline comments.Jul 19 2019, 8:58 AM

This is after being rotated, when changing rotation of an item the same doesn't get invoked automatically

This revision was automatically updated to reflect the committed changes.