[PATCH] Add center focus to WrappingList and FixedList
#1
This one is a bit hard to explain.

I was working on a skin and was frustrated when I could not center the focused item in a "wraplist" control. (i.e. the focused element stays dead center of the container).

I was able to get around it by making the list 3/5/7/etc times the size of the child element and making "focusposition" = 1/2/3/etc. But this wasn't ideal as I wanted the container to be an different size.

I've submitted a patch to add a "centerfocus" property to "wraplist" and "fixedlist" controls. Setting this to true achieves what I explained above.

When "centerfocus" is set to true "focusposition" adjusts which item is selected by default.

See: http://trac.xbmc.org/ticket/8454


Edit: Screenshot of what I'm trying to explain Tongue

Image
Reply
#2
well I'm confused Smile
Reply
#3
I'll attach some screenshots in a minute to explain.
Reply
#4
Right so basically this is useful for people who use conditional layouts in a wrap list that have more or less items in it depending on the layout used ? Otherwise how is it any easier than using the correct number
I have to wonder what does it pick if you have an even number of items does it go 1 lower or 1 higher
Reply
#5
Hmm, I'm not explaining this very well.

It doesn't simply 'detect' the middle item in the list and put focus on that, it positions the items so that the focused item appears in the middle of the container.
Reply

Logout Mark Read Team Forum Stats Members Help
[PATCH] Add center focus to WrappingList and FixedList0