This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kdm theme for different resolutions

Tags: None
(comma "," separated)
TheOne
Registered Member
Posts
3
Karma
0
OS
Hi @all,
I try to make my own kdm theme. But i have a problem to understand the XML format documentation http://docs.kde.org/stable/en/kdebase-w ... ormat.html

My problem is the pixmap item. I don't know what file name i should use if I want to support different screen resolutions with my kdm theme.
The documentation describes that my image files can have the format basename-widthxheight.extension and kdm choose the best matching one automaticly. But what I should write to my XML file in that case???

If I have only one background image named background.png I would write something like that:
Code: Select all
<item type="pixmap" id="background" background="true">
   <normal file="background.png"/>
   <pos x="0%" y="0%" width="100%" height="100%"/>
</item>

But what should I write if I have more images named e.g. background-1920x1200.png and background-1600x1200.png?

I hope you understand my question and somebody can help me. :(
TheOne
TheOne
Registered Member
Posts
3
Karma
0
OS
I got it! Thanks to the help from an Opensuse Artwork IRC-Channel. So how it works...

If you have multiple images named like background-1920x1200.png or background-1600x1200.png your XML code should look like this especily the file attribute.
Code: Select all
<item type="pixmap" id="background" background="true">
   <normal file="background.png"/>
   <pos x="0%" y="0%" width="100%" height="100%"/>
</item>
The file background.png can exists but thats not necessary. If it exists kdm only accept size-tagged images that match perfectly otherwise kdm fall back to the original file (background.png). So if you provide the non size-tagged image you have to create images for every resolution you want to support (or just size-tagged symlinks to an image with the correct screen ratio - kdm will scale it correctly).

Maybe it is helpful for other people.

TheOne


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar