Hi Sanne,
I would advise you to use a static class function something like:
Font theme class:
...
fonts :
{
"default" : {
size : myapp.theme.Util.rem(0.8), // <<----- the static function
lineHeight : 1.33,
family : ["Verdana", "sans-serif"],
decoration : "underline"
},
...
Your util class could be a qx.Class or qx.Bootstrap definition, e.g.:
qx.Class.define("myapp.theme.Util",
{
extend : qx.core.Object,
statics : {
ROOT_FONT_SIZE : 14,
rem : function(factor) {
// add logic and return ;)
}
}
});
It should be possible to force the change of font size in runtime, especially
with current master of qooxdoo (pre 4.1).
Gruß
Mustafa Sak
Applications & Integration
1&1 Internet AG
Ernst-Frey-Straße 10
DE-76135 Karlsruhe
-----Ursprüngliche Nachricht-----
Von: Sanne Peters [mailto:[email protected]]
Gesendet: Montag, 6. Oktober 2014 11:04
An: [email protected]
Betreff: [qooxdoo-devel] Using an em-value-based-like system for qooxdoo
Desktop theming
Hi,
First of all, for as far I can deduce from the documentation and the code using
em values in qooxdoo themes is impossible. I know that.
What I want to do is develop a theme (for our company) that is based on a base
font size (say 14 px) and base all other styling on on that (like em values).
More theory on this you can read here:
http://www.vanseodesign.com/css/em-px/.
But are there alternative methods for using a similar system in qooxdoo theming?
What I have tried so far is using a global variable holding a base font size
defined in Application class, but the theme is loaded before the Application
class and the variable is not available for the Theme yet.
So that's a bust.
Also a second idea would be to define it in the theme somehow, but it does not
allow for custom keys/properties.
Another would be to define the global variable in the index.html file, but that
is kind of messy and hurts the maintainability of the Theme.
Any smart/insightful ideas?
kind regards,
Sanne
kind regards,
Sanne
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel