[Approved] Add support for spinCanFocus in filmstrip (1 Viewer)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Problem:
    Filmstrip has never supported <spinCanFocus> attribute, even though list-layout and thumbnail-layout supports this. In filmstrip some skinners decide to hide the spincontrol, but it can still focus. To make MediaPortal more consistent and easier to skin, I propose that we add support for this.

    Solution:
    Add new XML skin-element <spinCanFocus> to filmstrip, apply small patch.

    Code:
    Index: GUIFilmstripControl.cs
    ===================================================================
    --- GUIFilmstripControl.cs	(revision 27445)
    +++ GUIFilmstripControl.cs	(working copy)
    @@ -136,6 +136,7 @@
     
         [XMLSkinElement("textXOff")] protected int _textXOff = 0;
         [XMLSkinElement("textYOff")] protected int _textYOff = 0;
    +    [XMLSkinElement("spinCanFocus")] protected bool _spinCanFocus = true;
     
         #endregion
     
    @@ -2099,10 +2100,16 @@
           if (_listType == GUIListControl.ListType.CONTROL_LIST)
           {
             _listType = GUIListControl.ListType.CONTROL_UPDOWN;
    -        if (_upDownControl != null)
    +        if (_upDownControl != null && _spinCanFocus)
             {
               _upDownControl.Focus = true;
             }
    +        else
    +        {
    +          _listType = GUIListControl.ListType.CONTROL_LIST;
    +          this.Focus = true;
    +          base.OnAction(action);
    +        }
           }
           else if (_upDownControl != null)
           {

    Patch created against SVN 27445 attached.
     

    Attachments

    • filmstrip spincanfocus.patch
      961 bytes

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #3
    Most definately still needed, as the current behaviour is unwanted and inconsistent ;)

    Thanks Andy
     

    Users who are viewing this thread

    Top Bottom