[Solved] Very short descriptions don't wrap.
-
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
-
@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:
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=""
-
@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, ...).
-
@Lolonois Before and after highlighting:
config.xml
: https://pastebin.com/k7KAEGwSI also modded lines 11 and 12 in
layouts/1280x720.xml
: https://pastebin.com/hbGw65kJSome 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 onscrolli
then that final word wraps properly to a second line instead.] -
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 layouta.xml
) is missing a<size/>
element.Seems adding a matching
<size/>
element for your resolution should fix the wrapping in that theme. -
@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?:
and also from looking at the
description_pos_5.xml
here (which gets included by your layouta.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 inbase.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: -
@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
-
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
-
@Lolonois cheers:
Thank you for this!
-
@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.
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.