[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-devel] Theming: fonts, colors, etc
From: |
Remon |
Subject: |
[Traverso-devel] Theming: fonts, colors, etc |
Date: |
Wed, 31 Jan 2007 15:59:33 +0100 |
User-agent: |
KMail/1.9.6 |
Hi,
Currently only colors are stored in the theming file, I'd like to improve that
situation a bit, please have a look at the 'new' format and help me figure
out if this makes sense, if I forgot something, and so on.
<Themer>
<general fontscalefactor="1.0" someotherthing="whatever" >
<menus>
<font size="blah" />
</menus>
</general>
<objects>
<object name="AudioClipView" >
<colors>
<color name="backgroundactive" red="120"
green="200" blue="255" />
</colors>
<fonts>
<font name ="cliptitle" size="9"
type="Helvetica" />
</fonts>
</object>
<object name="VUMeter" >
<colors>
<color name="background" red="120" green="200"
blue="255" />
</colors>
<gradients>
<gradient name="background" type="linear" />
</gradients>
<fonts>
<font name ="cliptitel" size="9"
type="Helvetica" />
</fonts>
</object>
</objects>
</Themer>
Objects then can get their color, font and whatnot in a more convenient way:
void paint()
{
QColor color = themer().get_color("AudioClipView", "backgroundactive");
// Just to make clear how it 'could' be used
bool useFontScaleFactor;
QFont font = themer().get_font("AudioClipView", "cliptitle",
useFontScaleFactor);
}
Gradient's saving/loading could be done by existing infrastructure btw, so one
can use e.g. inkscape to create a gradient, store it in a file, and the
themer loads that, or something similar :-)
Greetings,
Remon
- [Traverso-devel] Theming: fonts, colors, etc,
Remon <=