jamulussoftware / jamulus

Jamulus enables musicians to perform real-time jam sessions over the internet.
https://jamulus.io
Other
986 stars 221 forks source link

Buffer delay text cut off #1430

Open djfun opened 3 years ago

djfun commented 3 years ago

Describe the bug When choosing a buffer delay that is different from the predefined 64, 128 or 256, the text is cut off.

To Reproduce On linux: start Jack with buffer size 1024 jackd -d dummy -p 1024 Start jamulus and open the settings window Observe the cut off closing parenthesis.

Expected behavior Text should not get cut off

Screenshots Bildschirmfoto von 2021-04-02 18-00-30 Bildschirmfoto von 2021-04-02 18-00-52

Operating system Ubuntu 20.10

Version of Jamulus both 3.7.0 and latest master

Additional context Seems to happen independent from the selected UI language.

dcorson-ticino-com commented 3 years ago

I agree that it would be nice if it didn't cut off, but why would you want to work with such a big buffer? The latency will make it pretty useless.

djfun commented 3 years ago

The problem is not the longer number, it also gets cut off with just 3 digits: Bildschirmfoto von 2021-04-02 21-49-51

There are some sound cards which might require a non-standard buffer size. And: if you are just a listener, you might want to work with a larger buffer size for stability reasons.

djfun commented 3 years ago

if I simply add 2 spaces after the text, it works for some reason. But I'm not sure if that is a good workaround:

diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp
index 87638faa..0ac032d0 100755
--- a/src/clientsettingsdlg.cpp
+++ b/src/clientsettingsdlg.cpp
@@ -550,7 +550,7 @@ void CClientSettingsDlg::UpdateSoundCardFrame()
     {
         // special title text with buffer size information added
         grbSoundCrdBufDelay->setTitle ( tr ( "Buffer Delay: " ) +
-            GenSndCrdBufferDelayString ( iCurActualBufSize ) );
+            GenSndCrdBufferDelayString ( iCurActualBufSize ) + "  " );
     }
 }
ann0see commented 2 years ago

@djfun Couldd you please open a Pull Request if this issue wasn't resolved?

djfun commented 2 years ago

Problem seems to still exist on current master, I opened a pull request.

pljones commented 2 years ago

I don't like the idea of the fix. It sounds like the styling in the form is wrong: the field should accurately resize to the content.

hoffie commented 2 years ago

It sounds like the styling in the form is wrong: the field should accurately resize to the content.

I had another quick look but don't see anything wrong in our Qt widget/styling usage around grbSoundCrdBufDelay and its title (which is where this information is placed). I've found the following Qt bug which sounds relevant, but is still unresolved. I'd say it is unlikely to be solved in Qt5 (and therefore: on Ubuntu 20.10) at all: https://bugreports.qt.io/browse/QTBUG-31307

@djfun Can you confirm if you're still running Ubuntu 20.10 as noted in the initial report? 20.10 is no longer supported (by Ubuntu upstream), so if this is not any known issue on a supported platform I'd say we should not introduce workarounds which -- to me -- "only" sounds like a small UI glitch.

djfun commented 2 years ago

I am now using Ubuntu 21.10 (the newest version). Like I wrote in the pull request: maybe the problem only exists with the default font (Ubuntu Regular)..

ann0see commented 2 years ago

maybe the problem only exists with the default font (Ubuntu Regular)..

You can change that probably?

djfun commented 2 years ago

maybe the problem only exists with the default font (Ubuntu Regular)..

You can change that probably?

I can change the font for testing, yes. But I don't want to check 100+ fonts to see if there is another one with the same issue.

ann0see commented 2 years ago

Certainly not. It’s just to ensure that you’re right on the thought that it’s the font misbehaving.

hoffie commented 2 years ago

I spent some more time debugging this and was able to reproduce this issue on Ubuntu 21.10. Using GammaRay I was able to pin-point the exact circumstances:

Therefore, I suspect that this is a character width mis-calculation between Qt and the Ubuntu font (maybe rather on the Qt side as Qt6 seems unaffected). Although this is not a Jamulus bug, it does affect Jamulus Linux users, so I guess it would make sense to add a workaround. I think we should do that on the style-level though and guard it with a Linux/Qt5 #ifdef. I'll try to submit a PR in the coming days.

pljones commented 1 year ago

Hi,

There are three builds here https://github.com/jamulussoftware/jamulus/pull/2847#issuecomment-1251376746 Do any of them help?

Thanks,

-- Peter

pljones commented 2 months ago

I've tagged this "tooling" because it's fixed by updating the Qt version. We should be building for Qt LTS-1 across all supported platforms.