[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: i18n of icons
From: Malte.Starostik () t-online ! de (Malte Starostik)
Date: 2001-05-13 0:08:34
[Download RAW message or body]
On Mittwoch, 9. Mai 2001 09:18, Alex Zepeda wrote:
> On Tue, May 08, 2001 at 01:40:56PM -0700, Waldo Bastian wrote:
> > Are shared pixmaps supported by all X servers? Doesn't someone want to
> > make a central pixmap server as KDEDModule?
>
> Well there's always the thought of a big png image with all the icons and
> a text comment describing name,x,y coordinate triplets.
>
> One big icon per app. This whole thing could be loaded at start time or
> whenever the first icon was needed...
This little script builds a .h that contains all files given on the command
line as const char*s plus a size info. Such thing could be put into
libkdeicons.so and kde apps link to it. Then icons could be loaded by just
QByteArray data;
data.setRawData(hi32_app_go, hi32_app_go_size);
QPixmap icon(data);
data.resetRawData(hi32_app_go, hi32_app_go_size);
-Malte
--
Wars don't determine who's right, only who's left.
["png2h.sh" (application/x-shellscript)]
#!/bin/sh
for i in $*; do
name=`echo ${i%%.png}|sed s,-,_,g`
echo "static const char *$name = "
cat "$i" | perl -pi -e 's/(.)/"\\x".unpack("H2", $1)/ges; s/(.{1,40})/"$1"\n/g'
echo ";"
echo "static int ${name}_size = " `ls -l "$i" | awk '{print $5}'` ";"
done
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic