Hi, List
Consider the piece of code plz:
var title = new qx.ui.basic.Label(item.title + ':');
var width = title.getPreferredBoxWidth();
It worked well in qooxdoo 0.6.6 for me, but it starts to produce unexpected
results in qooxdoo 0.7.2. I made a bit of research and noticed that the Label
object just doesn't know the font* properties after creation which follows to
unexpected results of getPreferredBoxWidth method (since default browser font
seems to be used).
I've found a workaround for 0.7.2:
var title = new qx.ui.basic.Label(item.title + ':');
qx.ui.core.Font.fromConfig(
window.qx.theme.manager.Font.
getInstance().getFontTheme().fonts.default)
.render(title);
var width = title.getPreferredBoxWidth();
Although it looks a bit hackish to me. I'd rather patch the Label object
somehow, but I'm not sure where the font is applied to Label?
So the questions are:
1. Is my workaround correct?
2. Where font properties are applied to object?
3. Probably this piece of code (font) should be included to the Label
constructor?
Thanks much,
Alexei Golovko
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel