DesktopView contains a property candidateContainments which are all containments with the same screen for all activities.
Plasma mobile can use it to do activity switching with a swipe gesture
depends from D11361
davidedmundson |
Plasma |
DesktopView contains a property candidateContainments which are all containments with the same screen for all activities.
Plasma mobile can use it to do activity switching with a swipe gesture
depends from D11361
works well on plasma mobile, misused it by purpose, it doesn't crash
No Linters Available |
No Unit Test Coverage |
switching activities by swipe in plasma mobile shell, the rectangle in the center has the activity name
ShellCorona only creates the containment in currentActivityChanged, so this swiping stuff isn't going to work until you've first switched containment an existing way, then started swiping.
shell/desktopview.cpp | ||
---|---|---|
265 | In the main code path shellcorona is responsible for assigning containments to desktopviews. In this code path DesktopView is extracting the relevant containments for itself. That's super messy, please redesign. | |
shell/shellcorona.cpp | ||
1239 | This is generically finding a containment. The method name and comment shouldn't have anything to do with what 1 usage of it is doing. |
no, the Containment* instances are all created immediately, as well the contained ContainmentInterface*
What's created on demand (that is heavy indeed) is the qml stuff, which is created when the ContainmentInterface* gets a view, which can be controlled by the qml part of the shell (ie, when to cann this function and reparent the resulting ContainmentInterface*)
shell/desktopview.cpp | ||
---|---|---|
265 | shellcorona assigns what is actually the current one, which is conceptually another thing. |
approach with a model
a possible approach is this: a model with all the activities that map to
items, but i don't like this, because it's pretty much duplicating the
activity model present in kactivities with a worse version.
another approach i'll try shortly, is to just have a list property
of all possible containments and then it's a problem of the qml part to
find the right ones for the right activities
a possible approach is this: a model with all the activities that map to
items, but i don't like this, because it's pretty much duplicating the
activity model present in kactivities with a worse version.
another approach i'll try shortly, is to just have a list property
of all possible containments and then it's a problem of the qml part to
find the right ones for the right activities