Hi there, I am currently facing a 'theming' problem:
I have a Table containing one column which displays Symbols
(qx.ui.table.cellrenderer.Image derived).
These Symbols are 'dark' and when one selects a row in the table, the 'dark'
background color ("table-row-background-selected") makes it hard to see.
Which can be seen at 1st attached image.
The 2nd attached image shows what it *should* look like.
So my question is: How to 'theme' or program an Image CellRenderer that can
react on 'select'?
The "dirty" approach is something like this:
// ------------------------------------------------------------------
<code>
// ------------------------------------------------------------------
qx.Class.define("app.ui.table.cellrenderer.FooIconRenderer",
{
extend : qx.ui.table.cellrenderer.Image,
members :
{
_identifyImage : function (cellInfo)
{
var imageHints = {
imageWidth : 11,
imageHeight: 11,
url : this.__valueToUrl(cellInfo.value) // {String|null}
};
// URL set to something like "app/icon-3" or <null>...
if (imageHints.url) {
if (cellInfo.selected) {
imageHints.url += "-invert"; // inverted icon (light toned)
}
imageHints.url += ".png";
imageHints.tooltip = this.__valueToTip(cellInfo.value);
}
return imageHints;
}
}
});
// ------------------------------------------------------------------
</code>
// ------------------------------------------------------------------
Which *only* *works* if the Table, that makes use of this cell renderer has set
the 'alwaysUpdateCells' flag to <true>! But this slows down the update of the
table, which is _not_really_ an option!
So, is there any theming that I can do? i could only find selection handling
for row-renderer. And the stylesheet of tables seems to be way different than
'regular' Widget styling :(
Regards,
Peter
--
** Unsere Veranstaltungen:
T-Matik in Greven, 20.05.2014
Post-Expo in Stockholm, Halle A - Stand A10.05, 23.-25.09.2014
TIS-Hausmesse in Bocholt, 16.10.2014
transfairlog in Hamburg, 04.-06.11.2014
<<attachment: CellRenderer.png>>
<<attachment: CellRenderer-invert.png>>
------------------------------------------------------------------------------
_______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
