[Approved] Allow absolute placement of scrollbar + assign width (1 Viewer)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Background
    A vertical scrollbar (GUIVerticalScrollbar) is automatically attached to any listcontrol (GUIListControl) or thumbcontrol (GUIThumbnailPanel) if the listcontrol/thumbcontrol contains more elements than can be fitted in the defined height, and the user has checked the "show special mouse controls (scrollbars, etc)" option in MP Config.

    Problem
    The scrollbar is absolutely positioned 5 pixel to the right of the control, and has an absolute width of 15 pixels. This means that:
    - you cannot have a scrollbar to the left of the panel
    - you cannot use a scrollbar wider than 15 pixels here, even though the scrollbar defined in references.xml may be wider or more narrow

    Solution
    2 new XML-properties called <scrollbarXOff> and <scrollbarwidth> usable with any listcontrol and thumbcontrol. Default values are "0" and "15" so this will not affect existing skins. You can set a negative value on scrollbarXOff to move the control to the left, or a positive value to move it to the right.
     

    Attachments

    • before.png
      before.png
      534.2 KB
    • after_pos.png
      after_pos.png
      534.9 KB
    • after_width.png
      after_width.png
      533.2 KB
    • Patch to allow positioning and width of scrollbar SVN 23209.patch
      30.8 KB

    chemelli

    Retired Team Member
  • Premium Supporter
  • September 28, 2006
    6,159
    2,264
    49
    Milano, Italy
    Home Country
    Italy Italy
    Sorry but no place for new features/changes in skin engine. Will consider it to after 1.1.0

    Simone
     

    chemelli

    Retired Team Member
  • Premium Supporter
  • September 28, 2006
    6,159
    2,264
    49
    Milano, Italy
    Home Country
    Italy Italy
    I state that I didn't check current code in 1.2.0.

    But if it's not implemented can you please update the patch so that we can evaluate ?

    Simone
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #4
    I state that I didn't check current code in 1.2.0.

    But if it's not implemented can you please update the patch so that we can evaluate ?

    Simone

    Patch against current SVN attached. While testing it out, I found that the default skins (Blue3
    and Blue3wide) are missing the properties for the scrollbar and the button in references.xml.

    "default listcontrol" in this file should be updated with

    Code:
        <scrollbarbg>bar_vert.png</scrollbarbg>
        <scrollbartop>mouse_left_vertical.png</scrollbartop>
        <scrollbarbottom>mouse_right_vertical.png</scrollbarbottom>

    I have not had a chance to test the horizontal scrollbar, and normal and big icons may also be missing these properties. It may be intentional, but I think you should check with the rest of the team (Harley mainly?).

    When I started skinning 1½ year ago, the scrollbars vere definately there when switched on in MP Config. Without the properties they are missing.

    :D
     

    Attachments

    • Patch to allow positioning and width of scrollbar SVN 26072.patch.patch
      4.5 KB

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #5
    Thinking of it, maybe references.xml should be kept clean as it is, and the facades should implement the extra attributes instead. Like in common.facade.recordings.xml and the other common.facade-files.
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,427
    10,454
    Königstein (Taunus)
    Home Country
    Germany Germany
    AW: Allow absolute placement of scrollbar + assign width

    AFAIK we decided do not use the scrollbars in B3 skins because main use is on HTPC with remote. But agree with you to have them in for the touch screen users ;)
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #7
    Could this patch be considered to be added to SVN? It's already 15 months old :(
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #10
    Somewhere along with my other fixes to the scrollbars, I ended up with allowing the texture for the scrollbar-background to set the width. With this feature the scrollbarwidth property is not needed, as skinners should just create the background and the handles to the size he wants. These are then scaled and positioned along with the control it belongs to.

    So, I now have this patch you can review for now or for after the Beta (I think it would be wise to wait).

    :sorry: & :D
     

    Attachments

    • Remove scrollbarwidth from VerticalScrollbar SVN 27831.patch
      3.3 KB

    Users who are viewing this thread

    Top Bottom