Skip to content

Fix extra height appearing in the input line#2725

Closed
vadi2 wants to merge 3 commits intoMudlet:developmentfrom
vadi2:fix-extra-height-inputline
Closed

Fix extra height appearing in the input line#2725
vadi2 wants to merge 3 commits intoMudlet:developmentfrom
vadi2:fix-extra-height-inputline

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Jul 6, 2019

Brief overview of PR changes/additions

Fix extra height appearing in the command line at font size 12 and above.

Selection_138

Motivation for adding to Mudlet

Small aesthetic details like this matter.

Other info (issues closed, discussion etc)

@vadi2 vadi2 requested a review from a team as a code owner July 6, 2019 04:52
@vadi2 vadi2 requested a review from a team July 6, 2019 04:52
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Jul 6, 2019

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@Eraene
Copy link
Copy Markdown
Contributor

Eraene commented Jul 6, 2019

I am noting here that adjusting the input line height becomes necessary after font size changes for many monospace fonts, as the bottom of the input bar cuts off the tails of letters, as seen here, using Courier New as an example:
image

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jul 6, 2019

And how do you adjust?

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jul 6, 2019

I don't see the same:

Selection_140

@Eraene
Copy link
Copy Markdown
Contributor

Eraene commented Jul 6, 2019

I assume you aren't seeing the same result because your input line height is not set lower than your font height.

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jul 6, 2019

Sorry, what do you mean?

@Eraene
Copy link
Copy Markdown
Contributor

Eraene commented Jul 6, 2019

image
Line height? This thing?
I'm keeping it set low to test the font visibility and with it set anywhere under twice the size of the font (so for a 12pt font - 24) it will start cutting off letter tails.

Additionally, there is still a good 8 pixels of dead space over the top of the line input... any way you can shave that down just a tiny bit?

image

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jul 6, 2019

Ah - it's not cut off, there is literally 0 padding. If you have a very close look, that y is rendered fully.

So perhaps we should add some padding on the bottom, because the initial impressions were that it was broken.

@Eraene
Copy link
Copy Markdown
Contributor

Eraene commented Jul 6, 2019

I believe we are miscommunicating. No, the tails are being cut off, my previous screenshot was simply to display the top padding, not the bottom. Let me try to be more clear. Here is a screenshot with LINE HEIGHT set to 24, with 12px Courier New font:
image

Here it is with LINE HEIGHT set to 23, with just enough room to display the full tails of letters:
image

Going any lower than this starts to cut off the tails because there is simply no room to display them, as seen here at 1 LINE HEIGHT:
image

Originally I assumed this to simply be intended behavior, as I would just need to adjust the line height after changing the font size, but it was suggested I post the issue here because I suppose the intended behavior is still to internally size the input line to fit the font first and adjust it through preferences second.

I hope this issue and my understanding of it is more clear.

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jul 6, 2019

Aha! Yes, definitely. Thanks for taking the time to write up the explanation.

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jul 10, 2019

I've spent close to 15 hours on this which is way too much. That option we have makes things super difficult because there is not enough information available - that's why current code just did lines+1 and why you saw the extra space.

So the next question is to ask - is the option useful? Does anyone actually want to display 2,3,4 lines at a time always?

Or should we have it automatically grow as needed and allow the person to cap it at a certain maximum instead?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants