Skip to content

Adjust vertical positioning of header and body text in dialog panels#9886

Open
onurcanyasar wants to merge 1 commit intoihhub:masterfrom
onurcanyasar:fix/vertical-position-of-text-on-dialog-panels
Open

Adjust vertical positioning of header and body text in dialog panels#9886
onurcanyasar wants to merge 1 commit intoihhub:masterfrom
onurcanyasar:fix/vertical-position-of-text-on-dialog-panels

Conversation

@onurcanyasar
Copy link

Fix #1260

This PR introduces a new constant headerBodySpacing and adjusts the Y positions of the header and body text elements in dialog panels. The changes improve vertical alignment and better reflect the original game’s layout, where the space below the text is slightly larger than the space above.

These updates aim to resolve the visual imbalance noted in issue #1260, where the body text appeared too close to the header and the top of the text was too far from the window’s upper edge.

…panel

Added `headerBodySpacing` constant and adjusted the Y position of the body text.
Also slightly modified the header Y position for better vertical alignment.
@zenseii zenseii added improvement New feature, request or improvement ui UI/GUI related stuff labels Jun 8, 2025
@zenseii zenseii added this to the 1.1.10 milestone Jun 8, 2025
@onurcanyasar
Copy link
Author

Would you mind reviewing this PR when you have a chance? Thanks! @ihhub

@ihhub
Copy link
Owner

ihhub commented Jun 16, 2025

Hi @LeHerosInconnu, can you check the changes for windows with and without text?

@LeHerosInconnu
Copy link

Hello @ihhub and @onurcanyasar,

Hi @LeHerosInconnu, can you check the changes for windows with and without text?

The vertical position of the yellow title text in relation to the top of the window is fine.
In some windows, the space between the bottom of the last line of text and the bottom of the window is not greater than the space between the top of the text (including the yellow title) and the top of the window.
For the space at the bottom of the window, the bottom of letters with jambs (“y”, “p”, “q”, ‘g’, “j”, etc.) should be taken into account for the minimum space retained.
Note: I've only tested windows of the Home screen.

In this PR: (click to expand)

Title text position 001
Title text position 002
Title text position 003
Title text position 004
Title text position 005
Title text position 006
Title text position 007
Title text position 008

For the space between the bottom of the text and the bottom of the window, it is also necessary to take into account any graphic defects in the window decorations that may appear when the vertical size of the window is increased.
This should be increased using the vertical dimension of the repeating pattern of the decoration.
I'm not sure which problem should be solved first, so as not to require unnecessary extra work.
See here: #5086.

Also, the space between the yellow title and the white text should correspond to the space of an empty line of text (as if a line had been passed between the yellow title and the white text), i.e. 34 pixels between the baseline of the letters of three lines of text.
There should already be an issue opened for this, but I haven't managed to find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement New feature, request or improvement ui UI/GUI related stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vertical position of text in windows

4 participants