[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Traverso-devel] Theming: fonts, colors, etc
From: |
Remon |
Subject: |
Re: [Traverso-devel] Theming: fonts, colors, etc |
Date: |
Thu, 1 Feb 2007 21:26:06 +0100 |
User-agent: |
KMail/1.9.6 |
> Actually, now that I think of it again, your are probably right that we
> don't need absolute flexibility in that case. It's used for theming only,
> so it is rather predictable what types will be required. Colors, fonts,
> gradients, maybe SVG files and pixmaps. That's about it.
Indeed!
I realized this too, even more, the get_color() and get_font() functions etc.
can be simpler too, when using this type of format:
<Themer>
<general fontscalefactor="1.0" someotherting="whatever" />
<colors>
<color name="AudioClip:wavemacro" red="80" green="80"
blue="120"
alpha="255"/>
</colors>
<fonts>
<font name="AudioClip:cliptitle" size="8" family="Bitstream
Vera Sans" />
</fonts>
</Themer>
From a hand editing point of view, it's nice to have catagorizing of things by
object type, but for the Theme manager, it doesn't matter.
The get function now still can look as it is now:
Themer::get_color(QString color, QColor defaultColor);
In AudioClipView I now have something like:
p->setPen(themer().get_color("AudioClip:wavemacro", QColor("#78c8ff") ));
The parsing of the file will be the same as before (almost), but if we
eventually want to make a GUI for adjusting theme parameters, it's easy to
extract colors and fonts on a per object bases: it's still in the
colorname....
Greetings,
Remon
P.S.
I'm working on it right now, so if you don't agree, let me know please :)