[Approved] Patch to fix GUIMultiImage (2 Viewers)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Hi!

    Attached is a patch against SVN 23143 on GUIMultiImage.cs

    I have earlier created a thread where i was nagging about it being broken. Now I fixed it instead ;): https://forum.team-mediaportal.com/...tiimage-cs-you-have-guiimagecontrol-cs-66809/

    This patch fixes broken attributes, and fixes a problem where creating and rendering a GUIMultiImage from code would not return anything. It also expands the possibility to change imagepath like you can on normal images.
     

    Attachments

    • Fix for GUIMultiImage (using SVN 23143).patch
      30.7 KB

    -Manfred-

    Retired Team Member
  • Premium Supporter
  • May 15, 2007
    728
    343
    Home Country
    Finland Finland
    Hi

    Thanks for your effort. Before trying this out can you please explain this as I can't understand the logic starting from line 209:

    if (m_keepAspectRatio)
    + {
    + view.Width = m_posx + m_width;
    + view.Height = m_posy + m_height;
    + }
    + else
    + {
    + view.Width = m_posx + m_width;
    + view.Height = m_posy + m_height;
    + }

    Also please re-check your logging lines as there are extra ones (r&d, danish) and consider using debug option if applicaple. Nowadays log is already full with info flagged log lines.

    Cheers,
    /m
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #3
    Seems like I used a previous version with my own notes in when i created the patch, I'll upload the right one in a minute. And no, there is absolutely no logic in the if/else statement which is a leftover from an old experiment :oops:
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #4
    Updated path attached. I have commented out the debugging part, don't know how to make the debug conditional, but now it doesn't fill the log.
     

    Attachments

    • (updated) Fix for GUIMultiImage (using SVN 23143).patch
      30.8 KB

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    15,046
    11,976
    Königstein (Taunus)
    Home Country
    Germany Germany
    And now something is broken!!!! Please see this post: https://forum.team-mediaportal.com/...ng-wrong-display-multiimage-68493/#post491861
    And PLEASE revert it or give some instructions on how to use the attributes now!:(
    OK, after experimenting a bit the error is the wrong interpretation of the <keepaspectratio> tag. If set to "no" for the image to size the image to the size given with <width> and <height> the error occurs.
    Please correct this ASAP!
     

    -Manfred-

    Retired Team Member
  • Premium Supporter
  • May 15, 2007
    728
    343
    Home Country
    Finland Finland
    Why so annoyed tone? Things doesn't always go right at first try when something is being developed. Should be fixed in SVN 23288
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    15,046
    11,976
    Königstein (Taunus)
    Home Country
    Germany Germany
    Why shouldn´t I NOT be annoyed? Changing a good working system to the benefit of ONE is absolutely bad. And implementing it in a wrong way is even worse. So, please let me be annoyed. ;-)
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #9
    I don't have access to the forum you link to, so cannot tell what the problem is (was). I would say that an attribute labeled "keepaspectratio" should do that, ie. if a multiimage is declared to have a canvas (height x width) of 800 x 600 but the actual image is 800 x 400, then the image should be centered vertically.

    If this is not the case, then my fix had true/false mixed up, easy to correct. If it is NOT the case, then the attribute should be renamed to something that does what it says.

    And I really hope that it was a joke about me being the only one that wanted MultiImage to work, it was pretty much useless before as it could not be created or changed from neither XML-side or plugin-side. I hope you don't talk to to many aspiring patchers, if this is the tone you use to them.
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    15,046
    11,976
    Königstein (Taunus)
    Home Country
    Germany Germany
    pilehave: I do a lot of jokes during a day, but this was NO one. The "keepaspectratio" worked since years like expected (same applies to the path), and I used this function in in ALL my skins (PureVision and LCARS) without ANY problem. So I don´t know ONE other skinner who had complaints about this label not working as expected. So the patch was 1.) useless and 2.) false implemented, so that I (and two other skinners) had a lot of work to resize the respective GFX until we found out the reason for it.
    And a last word: may be that my tone was not adequate, but in that moment after three days of evaluating the "bug" I was really annoyed.
     

    Users who are viewing this thread

    Top Bottom