kwin thumbnail effect in Workspaces 2
Michail Vourlakos
mvourlakos at gmail.com
Tue Jan 22 13:24:55 UTC 2013
Στις 21/01/2013 01:57 μμ, ο/η Aaron J. Seigo έγραψε:
> On Monday, January 21, 2013 12:37:43 Martin Graesslin wrote:
>> The logic to determine the size of the thumbnail is not very difficult. We
>> could provide a QML item (outside KWin) which has the same algorithm
>> implemented and annotate code in KWin and the item to keep it in sync.
> sounds good .. i'm warming up to this idea more and more :)
>
> and if only QML imports were conditional, then the QML Item could even be in
> an import provided with kwin itself and the code could be properly shared in
> the tree :/ in any case, i doubt the algorithm to determine thumbnail size
> from window size is complex at all and so keeping them in sync should be easy
> .. and should QML imports improve sufficiently we can always move the item later
> without causing problems like BIC :)
>
>
Just to add a bit my experience from the above features which have been
implemented
for the workflow plasmoid for the window previews. I dont know if my
implementations are any
of use because this is a plasmoid case until the kwin effect is
implemented in the near future
now that the plasmoid is clean qml with all the C++ staff in qml plugins.
To determine the thumbnail size for a preview I used
Plasma::WindowEffects:windowSizes
(I needed that in order to place the close button of the preview exactly
next to the preview)
For the scrolling of the previews in qml the plasmoid supports it when a
user wants to see
the previews for a specific desktop (if the dialog has to show more than
9 windows, scrolling is activated).
Fow window previews a Rectangle is used to track where the preview must
be placed.
(I use previews through Plasma::WindowEffects::showWindowThumbnails )
When the Rectangle for a specific preview gets out of the shown
scrolling area the preview is disabled.
(issue here is I think that if half of the rectangle is not shown the
preview is disabled and not clipped).
One way to solve it could be to show only complete rectangles all the
time . (disable smooth scrolling and
when scrolling the windows to move row by row).
Other way could be to provide clipping in windows previews but I dont
know how this can be done...
More information about the Plasma-devel
mailing list