styled dialogs for pa
Marco Martin
notmart at gmail.com
Mon Jan 9 17:22:36 UTC 2012
Hi all,
to make coherent looking dialogs all around, there is the Dialog component in
the standard set (one is used for instance in the timezone selection on active
settings)
one complaint was that it wasn't looking too much mobile, since the window
appeared immediately and clicking on the background didn't dismiss.
( when continuous integration will be again up and running, consistent update
of images and whatnot will be in place again ;)
now there is a partially tranlucent/black fullscreen background that fades in,
the dialog itself slides from the bottom, clicking on the background dismisses
the dialog.
i am not sure the animations will be fast enough since they are done by the
application event loop, it may be necessary have kwin doing this, we'll see.
particularly interesting is the how the thing is done (quite epic): since is
not possible to have private c++ classes in qml usable only inside the
components, it's a c++ import that has the exact api of the Dialog component,
and loads a qml file of an implementation of Dialog.
at that point, it creates a maximized qgraphicsview and puts the object
created from the qml file in it.
so we have the code made to do a new window in c++, but only Dialog being able
to use it
(the last thing on earth i want is random qml plasmoids being able to create
fullscreen windows ;)
so, if this will prove actually working, it will be worth to see if the epic
hack can be used to have other things that really need to be done in c++ -and-
private.
Cheers,
Marco Martin
More information about the Active
mailing list