using device targets in qml plasmoids

Aaron J. Seigo aseigo at kde.org
Wed Oct 24 09:41:17 UTC 2012


hi ...

i think it is time that we started using PLASMA_CUSTOM_PREFIX_PATHS and 
KDE_PLASMA_COMPONENTS_PLATFORM. what do they do, you ask? :)

the first one adds additional paths to plasmoid packages. the intended use is 
to define the current device target in a way that is largely transparent to the 
developer. if it was set to "tablet" for instance, then one could have:

org.kde.somePackage
	metadata.desktop
	contents/
		ui/
		config/
		images/
	tablet/
		ui/

PLASMA_CUSTOM_PREFIX_PATHS allows setting a set of paths, colon separated, 
e.g.:

	PLASMA_CUSTOM_PREFIX_PATHS=tablet:vivaldi

KDE_PLASMA_COMPONENTS_PLATFORM is similar, but it controls which components 
are used by default (e.g. touch vs desktop).

what i'd like to propose is this:

* merge PLASMA_CUSTOM_PREFIX_PATHS and KDE_PLASMA_COMPONENTS_PLATFORM; the 
first entry (if any) of PLASMA_CUSTOM_PREFIX_PATHS would become what 
KDE_PLASMA_COMPONENTS_PLATFORM is. this causes a small issue: the two are not 
100% corelated -> PATHS should probably be tablet for a tablet, but the 
COMPONENTS should be touch; PATHS should probably be mediacenter (or whatever) 
for a mediacenter and COMPONENTS should perhaps be touch as well (ok, maybe 
not, but just for argument's sake let's pretend ;) ... a solution to this 
would be to symlink the touch components directory to a directory called 
"tablet".

* define the common PATHS target definitions: tablet, handset, mediacenter, 
desktop, etc.

* set this env var in Plasma Desktop just as we do on Plasma Active

this is motivated by my experience with the SLC plasmoid on the dekstop where 
the spacing between icons is too large on the desktop, but just right for 
touch screens. :)

thoughts?

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20121024/68891ec7/attachment.sig>


More information about the Plasma-devel mailing list