supertuxkart / stk-code

The code base of supertuxkart
Other
4.47k stars 1.05k forks source link

Add word-wrap to the GP editor #3474

Open Alayan-stk-2 opened 6 years ago

Alayan-stk-2 commented 6 years ago

See picture of the issue

gp_editor_bug

Alayan-stk-2 commented 5 years ago

@rye761 After testing, the fix still has some issues of its own : the track pictures have become tiny, and some track name takes 3 lines and don't fit.

There are a few approach possibles. Finding another way to display the GP name could offer some much needed vertical space, maybe displaying one or two track less at once, and making sure that if it takes 3 lines, it will fit (or having the font smaller so that it fits in 2 lines, whatever look best or is easier to do).

gp_word_wrap

The screenshot above is at 1280x720, 1360x768 present similar issues.

At 1024x768 ; there is only 6 tracks displayed at once, but the track icons are bigger and the text is smaller, fitting in 2 lines.

rye761 commented 5 years ago

Ugh, that's frustrating. Thanks for finding the issue though. I'll continue working on this. What this most likely boils down to though is increasing the child_width for that ribbon, and failing that, making some sort of a change to the way DynamicRibbonWidget computes its cols to better account for long labels.

deveee commented 5 years ago

Pause dialog is now far from perfect too: zrzut ekranu z 2018-10-18 20-35-35

I know that 854x480 is rather small resolution and we don't support it, but it's noticeable on 1280x720 too and may happen in other places.

rye761 commented 5 years ago

Do you have a screenshot of how the pause dialog looked previously?

Alayan-stk-2 commented 5 years ago

The icons in the second line previously had the same size as the back icon on the first line. The expected result is the icons still having that size. There is more than enough space in the dialog for it.

I noticed the pause dialog issue too by testing in 21:9, but I thought it an artifact of that resolution (the number of elements in the GP editor is the same in 21:9 than in 16:9 and it doesn't fit worse than in 16:9)

auriamg commented 5 years ago

Considering the current issues, for the moment I have reversed the commit. A better fix is still welcome though!

qwertychouskie commented 5 years ago

Although the text sizing bug is now fixed, the it would still be good to add proper word wrap IMO. This should probably be re-opened until word wrap is implemented.

Alayan-stk-2 commented 5 years ago

It was closed automatically by github because "fixes" was followed by the #issuenumber in the PR description.