RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    [Solved] Very short descriptions don't wrap.

    Scheduled Pinned Locked Moved Help and Support
    gamelistdescriptionwrap
    17 Posts 3 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LolonoisL
      Lolonois
      last edited by

      Turned out to be not theme related. Filed a PR #803 to fix this. That the effect also appeared in the carbon theme was a very useful extra information @sleve_mcdichael . Feel free to report back if the effect is still present in the snes-mini theme after test-driving the PR.

      Cheers

      S 1 Reply Last reply Reply Quote 0
      • S
        sleve_mcdichael @Lolonois
        last edited by

        @Lolonois said in Very short descriptions don't wrap.:

        Feel free to report back if the effect is still present in the snes-mini theme after test-driving the PR.

        Unfortunately I still see the issue in be99449:

        20220814_004424.png

        pi@retropie:/opt/retropie/supplementary/emulationstation-dev $ cat retropie.pkg 
        pkg_origin="source"
        pkg_date="2022-08-14T00:41:47-07:00"
        pkg_repo_type="git"
        pkg_repo_url="https://github.com/Gemba/EmulationStation"
        pkg_repo_branch="fix_short_desc_wordwrap"
        pkg_repo_commit="be9944921e47ebfa57acae8200d495f356774c2b"
        pkg_repo_date="2022-08-13T18:37:11+02:00"
        pkg_repo_extra=""
        
        LolonoisL 1 Reply Last reply Reply Quote 0
        • LolonoisL
          Lolonois @sleve_mcdichael
          last edited by

          @sleve_mcdichael seems this issue has multiple causes. Could you pls start this ES with the switch --debug, attach an keyboard and press Ctrl-t (this will highlight every textcomponent size/boundary) and create another screenshot?

          Additionally, as I have seen on a cursory look, this theme needs to be configured for the screen dimension. Could you post your config XML file too? (via pastebin, ix.io, ...).

          1 Reply Last reply Reply Quote 0
          • S
            sleve_mcdichael
            last edited by sleve_mcdichael

            @Lolonois Before and after highlighting:

            20220814_231552.png

            20220814_231558.png

            config.xml: https://pastebin.com/k7KAEGwS

            I also modded lines 11 and 12 in layouts/1280x720.xml: https://pastebin.com/hbGw65kJ

            Some of the changes I've made to these files are discussed in the last few pages of https://retropie.org.uk/forum/post/273774

            [Edit: it does seem to be fixed in Carbon theme, at least: Sonic Boom is a vertically scrolling shooter from Sega. Sonic Boom is a vertically scroll fits on one line, and if I add a letter so it ends on scrolli then that final word wraps properly to a second line instead.]

            1 Reply Last reply Reply Quote 0
            • LolonoisL
              Lolonois
              last edited by

              Thanks again for the feedback and update. @sleve_mcdichael

              I tried to get snes-mini-theme to run at my box but unfortunately my resolution is not supported (1600x1200).

              However, from you screenshot earlier (note the red highlight overruns the gray bezel on the right) and also from looking at the description_pos_5.xml here (which gets included by your layout a.xml) is missing a <size/> element.

              Seems adding a matching <size/> element for your resolution should fix the wrapping in that theme.

              1 Reply Last reply Reply Quote 0
              • S
                sleve_mcdichael
                last edited by sleve_mcdichael

                @Lolonois said in Very short descriptions don't wrap.:

                However, from you screenshot earlier (note the red highlight overruns the gray bezel on the right)

                You don't mean the release date field, right? Are you talking about this narrow strip here?:

                View recent photos.png

                and also from looking at the description_pos_5.xml here (which gets included by your layout a.xml) is missing a <size/> element.

                Seems adding a matching <size/> element for your resolution should fix the wrapping in that theme.

                The <text name="md_description"> field is assigned a <size> element in base.xml at line 113. I changed the horizontal component here to 0.24; now the red highlight fits entirely within the description bezel, and the text trails off one char sooner:

                20220815_141416.png

                LolonoisL 1 Reply Last reply Reply Quote 0
                • LolonoisL
                  Lolonois @sleve_mcdichael
                  last edited by

                  @sleve_mcdichael yes, you got my suggestions right. Thanks for testing. Seems there is no "quick win" with the <size/> element. Means in turn there is something else is still buggy in ES with the context of this theme (and maybe other themes).
                  To analyze it I will have to spin up a Rpi and attach to a monitor with supported resolution of the snes-mini-theme.

                  TTYL

                  LolonoisL 1 Reply Last reply Reply Quote 1
                  • LolonoisL
                    Lolonois @Lolonois
                    last edited by

                    I am confident to have this fixed. See updated PR.

                    Thanks @sleve_mcdichael for revealing an eight year old bug.

                    Seems the original author of ES never assumed that the linespacing can be less than 1.2 times the highest char in the font, respective assuming a linespacing set to less than this value.

                    Any theme with a linespacing less than anticipated value may show the effect as in the snes-mini-theme. snes-mini-theme theme uses 0.75 linespacing, carbon by default 1.5 (see Textcomponent.cpp constructor). Thus carbon showed not this effect.

                    However, the variable isMultiline (here) evaluated to false even if the text was wrapped internally on two lines (thus it should be true) and from there things derailed.

                    As I was on it, I refactored the onTextChanged() method of the Textcomponent.cpp to be ~25% faster (which is significant given the fact this method is very, very often called). On my system >6000 times only until ES shows its carousel. If you navigate a little the number increases quickly. But this will be a separate PR.

                    HTH

                    S 1 Reply Last reply Reply Quote 3
                    • S
                      sleve_mcdichael @Lolonois
                      last edited by

                      @Lolonois cheers:

                      20220817_092500.png

                      20220817_092651.png

                      Thank you for this!

                      LolonoisL 1 Reply Last reply Reply Quote 0
                      • LolonoisL
                        Lolonois @sleve_mcdichael
                        last edited by

                        @sleve_mcdichael cheers and thanks again for reporting back. :-) One more thing: As a courtesy for other other forum users (and robots from some search engines): Could you please edit the title of your first post and add [solved] somewhere? Thanks.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post

                        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.