12-05-2012 03:42 PM
Is there a "proper" way for a List to set its CellRenderer's attributes (e.g. paddingLeft).
Currently, I have the CellRenderer "ask" its listOwner, but this doesn't seem right...
Regards,
12-05-2012 05:48 PM
12-05-2012 07:19 PM
Different lists use the same renderer class, so wanted them to have the ability to override...
I can set it in the renderer, but wondering why the padding is even there if no way to set it from the outside...
Another Cascades side-effect I suppose...
Regards,
12-05-2012 07:49 PM
12-06-2012 03:12 PM
Another thing you might want to try to improve performance is this:
//Setting global CSS properties to opaqueBackgound improves cell renderer performance by 20FPS
if( ThemeGlobals.currentTheme == ThemeGlobals.WHITE )
{
ThemeGlobals.injectCSS( "CellRenderer { opaqueBackground:#FAFAFA };" );
}
else
{
ThemeGlobals.injectCSS( "CellRenderer { opaqueBackground:#121212 };" );
}
12-06-2012 03:30 PM
Dustin;
Thanks for the performance tip, but right now, I'd settle for an AlternatingCellRenderer that actually works on the DevAlpha
simulator:
Currently, it doesn't display the correct alternating light/dark background all (using a custom CellRenderer that extends AlternatingCellRenderer) and often doesn't properly reset cells to UP state. I tried creating/setting my own Skin without any better success.
Regards,
12-30-2012 02:29 PM
Finally, some progress on this:
Turns out that if the List sets its opaqueBackground to the same color used by the Skin (assigned to the List's CellRenderer) for SkinStates.UP, everything works as it should, otherwise not.
My question:
How can a list determine the color/skin assigned to the UP SkinState, or vice versa: how can a Skin determine the List's opaqueBackground?
Regards,