Using skin expressions to change control location and size based on skin width? (1 Viewer)

2BitSculptor

Super Moderator
  • Team MediaPortal
  • January 23, 2008
    1,839
    403
    South Central Wisconsin
    United States of America United States of America
    Country flag
    • Thread starter
    • Moderator
    • #1
    I'm making some mods to aMPed to expand the screen to 1920x1080 from 1280x720. I would like to use the current aMPed config without modification. Most of the width/posX related values in the controls are adjusted by styles in the reference.xml, while the height/posY related values are based on a 720 high screen.

    I would like to evaluate the skin width as a condition to use either a multiplier of 1 or a multiplier of 1.5 for the base height/posY related value, eg., if the screen width is 1920 then posY = x*1.5, else posY = x*1.

    I think this would be better than duplicating all relevant controls, in every effected xml, changing the values and adding visibility conditions. It should only take a find function in the xml editor to replace current values.Then all I would need would be to add a new \Font Sizes\HD\ folder for revised fonts.xml and revised references.xml.

    I'm having difficulty wrapping my head around the expression needed. I would appreciate any help (ie... example expression)

    Thanks!

    Chuck
     
    Last edited:

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    12,961
    9,307
    Lanzarote
    Germany Germany
    Country flag
    Then all I would need would be to add a new \fonts\HD\
    Hi Chuck, that´s one of the things not possible with MP - you can´t add a different font.xml in a theme (of course you can, but that will lead to severe problems up to a crash of MP, because the font cache is only written once during start of MP) ;)
    The only solution would be to add ALL the required fonts in the standard fonts.xml and then use skin expressions to display the correct font like
    <font>#(iif(eq(#skin.resolution,'1920'),'font14','font12'))</font> :)
    And now the bad news: AFAIK the <font> property does not allow skin expressions :cry:
     

    2BitSculptor

    Super Moderator
  • Team MediaPortal
  • January 23, 2008
    1,839
    403
    South Central Wisconsin
    United States of America United States of America
    Country flag
    • Thread starter
    • Moderator
    • #3
    Actually, it is not a theme. Dadeo uses the Font Sizes folder to load the fonts.xml and references.xml for each screen size based on the aMPed config values, .... 4x3, 16x9, True4x3 ... and HD if I add it... He also has a Layouts folder for different layouts of Basic Home, Lists, MyVideoShares, and TV Guide based on the pre- and user defined layouts selected in aMPed config ... pretty smart stuff ....

    He uses the Themes folder to select the different color schemes for the skin.
     
    Last edited:

    2BitSculptor

    Super Moderator
  • Team MediaPortal
  • January 23, 2008
    1,839
    403
    South Central Wisconsin
    United States of America United States of America
    Country flag
    • Thread starter
    • Moderator
    • #6
    ... so I may be looking at something like this if the aMPed screensize is HD (1920x1080) from the SkinSettings.xml then the posY=1500, if not then posY=1000

    <posY>#(iif(eq(#amped.screensize,"HD"),1500,1000))</posY>

    ... or the texture height of a control if HD then height=1500 else height=1000:

    <height>#(iif(eq(#amped.screensize,"HD"),1500,1000))</height>

    ... or in a zoom animation if HD then center=1882,1097 else center=1255,730:

    <center>#(iif(eq(#amped.screensize,"HD"),1882,1255)),#(iif(eq(#amped.screensize,"HD"),1097,730))</center>

    yes? no?
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    toricred Using TMM, How to Stop Importer From Going to The Movie Database for Data General 1
    morpheus_xx [WiP] OnlineVideos: New browser based playback support using WebDriver, new Amazon siteutil MediaPortal 2 14
    toricred [solved] Configuring TV Server to use NAS General 5
    vvulture Using Windows 10 MediaPortal 1 Talk 8
    atlantic How to use Spotify inside Mediaportal? Listen Music 18
    Megane Too much RAM used (over 2 GB). General Support 18
    doskabouter 1.23.0 MatroskaTagInfo uses the wrong casing for tags Bugreports 27
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    D I just installed MP 1.23. Which version of Schedules Direct should I use, where do I obtain it from Newcomers Forum 6
    M Can i use my Vu+ Zero 4k Tuner for Mediaportal? General 0
    benicehavefun Using MePo TV Server 1.23 via MPExtended/WebMediaPortal as a Backend for Plex MPExtended 4
    G MP1 TV Server "failed to upgrade the database" using MS Sql Server Installation, configuration support 3
    1gkar Use Alternative Sites to Scrape Series Info My TVSeries 5
    T Can Emprex 3009ARF III MCE Remote Control be used to toggle Fullscreen/Windowed mode?? Remotes 7
    S [solved] Live TV subtitle issue if not using 100% font General 31
    N [Proposal] Make text input using remote control easier MediaPortal 2 4
    T Issues with MediaPortal not starting correctly using versions after 1.20 Final General Support 6
    erika jandova Using SD and MediaPortal 1 Newcomers Forum 4
    D Large xml database in My Movies Management. I remain unclear on use My Films as bridge to MP2.2 General 9
    N [solved] When MP2-Client is trying to register credentials, it uses the wrong machine name MediaPortal 2 7
    high [Help Me!] Atlassian Fisheye/Crucible still used? Team Lounge 8
    D [solved] HID remote for mp2 and w10 64 bit? using all tools: sony, cisco, homeworkx ng General 2
    Symphy Still being used? ASIO music player 0
    P no signal when scanning for channels using antenna and dual hd General Support 2
    N Using mediaportal in lieu of hauppauge wintv Newcomers Forum 10
    Similar threads

























    Top Bottom