mumble icon indicating copy to clipboard operation
mumble copied to clipboard

Gap appears above each line of text

Open StrangePeanut opened this issue 2 years ago • 3 comments

Description

1.4.287 addresses the text scaling issue but introduces a gap above each line of text

Relevant: https://github.com/mumble-voip/mumble/pull/5866

Steps to reproduce

  1. Look at the text pane

Mumble version

1.4.287

Mumble component

Client

OS

Windows

Reproducible?

Yes

Additional information

No response

Relevant log output

No response

Screenshots

20220914

StrangePeanut avatar Sep 14 '22 20:09 StrangePeanut

Quoting from https://github.com/mumble-voip/mumble/pull/5820#issuecomment-1248150822

I suspect the problem is with setting font sizes on windows. Qt docs say anything > 0 is valid, but I'm thinking that the windows implementation is more picky.

doc.qt.io/qt-5/qtextedit.html#setFontPointSize

Given that the function accepts a real number (instead of only integers) and Qt docs state

Note that if s is zero or negative, the behavior of this function is not defined.

I think we should first attempt to pass std::numeric_limits<qreal>::min() - aka: the smallest possible value > 0 :thinking:

Krzmbrzl avatar Sep 15 '22 18:09 Krzmbrzl

@Krzmbrzl This is in no way authoritative, but I'm not sure this will work. I assume that std::numeric_limits<qreal>::min() is going to be less than the current argument, 0.01. My intuition is that the windows implementation has a greater lower bound on the accepted values than what's documented by Qt. Consequently the call here fails which causes the "gap" to appear (since the newline doesn't get shrunk properly).

Unfortunately, I don't have a windows build environment set up right now so the above is just conjecture.

dexgs avatar Sep 15 '22 19:09 dexgs

Ah okay. Then I misunderstood. I was under the impression that we're currently passing 0 into the function. As it stands, my suggestion is of course nonsense.

Krzmbrzl avatar Sep 16 '22 08:09 Krzmbrzl

@Krzmbrzl just to be sure, is this already fixed by #5820 or another PR on master? Otherwise I'd give it a shot (although I can only start working on it next Monday).

bkaestner avatar Oct 04 '22 17:10 bkaestner

No this is not yet fixed. We had other issues with the chat log that we have addressed in the latest release, which created the regression that is tracked in this issue. So we'd happily take any attempt at fixing this :+1:

Krzmbrzl avatar Oct 04 '22 17:10 Krzmbrzl

Short update: I'm having some trouble with the vcpkg dependencies, apparently something about paths (e.g. ctype.h not found), at least when I run scripts\vcpkg\get_mumble_dependencies.ps1. I'll have to check tomorrow whether that still happens after a complete reinstall of the VS Build Tools and either file an issue here (or on vcpkg) or continue with this issue :)

bkaestner avatar Oct 10 '22 19:10 bkaestner

See also https://stackoverflow.com/q/42258311

Krzmbrzl avatar Oct 11 '22 05:10 Krzmbrzl

@Krzmbrzl Thank you for the link, I hit exactly that problem. I think I found a solution that does not require the fontPointSize() trick, I'll prepare a PR.

bkaestner avatar Oct 13 '22 19:10 bkaestner