[Kde-games-devel] KMines SVG

Mauricio Piacentini mauricio at tabuleiro.com
Fri Feb 9 20:36:22 CET 2007


> Thanks.  I think it looks sharp.  Deriving from existing oxygen icons saved a 
> bunch of work as well, all I had to do in some case was re-implement the 
> icons so that it is easier to change the colors at runtime.  For example, 
> replacing a colored linear gradient shape with two identical shapes, one with 
> a solid base color fill, the other with a grey to transparent fill gradient.

This is something I am still unsure of how to handle in code. While it 
is definately possible to style a SVG using an external .css file and 
QSVGRenderer, I did not get an answer yet (on IRC) on how to do this 
programatically, without the external style file. Of course, the program 
could parse and re-write the .css included with the theme, but this has 
several issues, like lack of privileges, etc. Does anyone here know how 
if it is possible to style the CSS from code without too much hacking? 
Maybe we will have to load the SVG as XML, add elements to it, and feed 
the result to KSVGRenderer. It looks cumbersome. Suggestions?

A complementary question: do we really want to expose this level of 
customization in the configuration options? Does anyone actually 
configure the color types for each numeral in the current KMines? Or 
simply having the option to switch themes is enough, as we can include 
one for accessibility, another with a classic look, etc. ?

> In an earlier mail you said we should use the default font for the numbers.  
> Until we get a svg graphical version of i18n(), I agree that we *must* do 
> that so those who use non-arabic numbers can play the game with their native 
> symbols.

Yes, that is my initial feeling. But on the other hand, the default font 
sometimes looks ugly, and it is a bit more difficult to get perfect 
alignment for all face types, depending on the metrics. So it is 
something we need to consider as well. Ultimately I am not against 
including number shapes in the theme, as this can lead to very 
interesting themes imo. Think about a medieval theme, or a Japanese one, 
where the numerals would match the current style. The oxygen theme could 
have its typical shading in the numbers as well. Having always the same 
system font for all of the themes start to look non-optimal if you 
consider these scenarios. hum...

Lots of options to choose from, it is nice to have this conversation so 
we can consider all of them.

Regards,
Mauricio


More information about the kde-games-devel mailing list