0

backbutton and pageindicator in fullscreen

I'm attempting to use the BackButton and PageIndicator components in a fullscreen view, but I find that some aspects of the way they look seem to be hardcoded to the sidebar width and background color. What's the correct way to set the styles on these two components so that their width can be stretched, and the background color of the text in the back button can be modified?

Thanks

by
3 Replies
  • QUOTE (kraney2 @ Feb 16 2010, 08:33 PM) <{POST_SNAPBACK}>
    I'm attempting to use the BackButton and PageIndicator components in a fullscreen view, but I find that some aspects of the way they look seem to be hardcoded to the sidebar width and background color. What's the correct way to set the styles on these two components so that their width can be stretched, and the background color of the text in the back button can be modified?

    Thanks

    All the KONtx.control components are themed. You can use the KONtx.element components that are the un-themed versions and create your own theme, or you can create your own components.
    0
  • QUOTE (Steve @ Feb 17 2010, 04:29 AM) <{POST_SNAPBACK}>
    All the KONtx.control components are themed. You can use the KONtx.element components that are the un-themed versions and create your own theme, or you can create your own components.


    Ah, I had not realized that "themed" implied "fixed size". OK, I will convert to using KONtx.element components.
    0
  • Wow, there's a huge cliff between using a themed control, and using an element - so I dug around in the yahoo code and found that the problem with PageIndicator looking odd at different widths could be fixed with a single line, by inserting this into the renderSkin method of the theme:

    CODE
    ff.lastChild.width = w;


    I've defined a subclass of KONtx.control.PageIndicator with its own theme, which is a workalike to its parent, but has that one line that scales the "shine overlay" image to fit.

    Personally, I think it would be great if the standard control scaled itself, although I've gathered there's a strong resistance to scaling images for any reason. Is that related to the processing power of some devices? I haven't gotten to the point of trying my widget on a real device yet.
    0

Recent Posts

in General - Yahoo! TV Widgets