Skin bugs in DefaultWideHD (1 Viewer)

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    15,627
    10,557
    Kyiv
    Home Country
    Ukraine Ukraine
    Unfortunately, MP seems to have ended up with a confusing mixture of letter case
    Something which will operate in spite of the letter case.
    https://github.com/MediaPortal/Medi...al/Core/guilib/GUIControlFactory.cs#L261-L263
    C#:
    if (String.Compare(valueName, "textcolor", StringComparison.OrdinalIgnoreCase) == 0 ||
                  String.Compare(valueName, "colorkey", StringComparison.OrdinalIgnoreCase) == 0 ||
                  String.Compare(valueName, "colordiffuse", StringComparison.OrdinalIgnoreCase) == 0)
              {
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    Specify the context (window, dialog or whatever) please.
    A specific example can be found in "MyTvSchedulerServer.xml" in "DefaultWide".

    I don't like the black background in the left side-bar menu, so I changed "backslide.png" to "white.png", but found that I got a pure white background whatever value I specified for "colorDiffuse". Presumably if "colorDiffuse" is omitted (or spelled incorrectly), the colour defaults fo FFFFFFFF. After I corrected the spelling of "colorDiffuse", the background appeared in the specified colour.

    Something which will operate in spite of the letter case.
    Is the code that you showed the current code, or are you suggesting that the code could be changed to allow tag names to be case insensitive?

    -- from CyberSimian in the UK
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    A specific example can be found in "MyTvSchedulerServer.xml" in "DefaultWide".
    The applicable element name for for the colour-diffuse attribute on GUIImages is colordiffuse:
    https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/Core/guilib/GUIImage.cs#L37
    https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/Core/guilib/GUIControl.cs#L114

    If catavolt intended to write colorDiffuse instead of colordiffuse, the reason escapes me. The code/definition won't set the colour-diffuse attribute value based on the colorDiffuse specification because of the code here:
    https://github.com/MediaPortal/Medi...aportal/Core/guilib/GUIControlFactory.cs#L631
    https://github.com/MediaPortal/Medi...aportal/Core/guilib/GUIControlFactory.cs#L156

    Is the code that you showed the current code, or are you suggesting that the code could be changed to allow tag names to be case insensitive?
    That's current code, but I don't think it implies that attribute or element names can be case insensitive. There are (many?) other limiting factors like these:
    https://github.com/MediaPortal/Medi...aportal/Core/guilib/GUIControlFactory.cs#L168
    https://github.com/MediaPortal/Medi...aportal/Core/guilib/GUIControlFactory.cs#L205
    https://github.com/MediaPortal/Medi...aportal/Core/guilib/GUIControlFactory.cs#L531
    https://github.com/MediaPortal/Medi...aportal/Core/guilib/GUIControlFactory.cs#L903
     

    wizard123

    Retired Team Member
  • Premium Supporter
  • January 24, 2012
    2,569
    2,680
    Home Country
    United Kingdom United Kingdom
    After I changed the spelling, it worked as expected (so no problem for me, but it may be a problem for "DefaultWideHD" and "Ares").
    Nope the few that are left in Ares won't affect in any way because the ones that are left are set as
    <colorDiffuse>fffffffff</colorDiffuse>
    So essentially off even if they were case correct, all of which except for 3 are left over from the Trakt files which originated from defaultwide.
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,426
    10,451
    Königstein (Taunus)
    Home Country
    Germany Germany
    All <colorDiffuse> tags you encountered where obviously taken over from older skins or from plugin devs skin snippets ;)
    And as all those have ffffffff as value, so nothing bad will happen ;)
    But to be sure I will change all occurences to the correct spelling ;)
     

    Users who are viewing this thread

    Top Bottom