Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer delay text cut off #1430

Open
djfun opened this issue Apr 2, 2021 · 14 comments
Open

Buffer delay text cut off #1430

djfun opened this issue Apr 2, 2021 · 14 comments
Labels
bug Something isn't working tooling Changes to the automated build system

Comments

@djfun
Copy link
Contributor

djfun commented Apr 2, 2021

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.

@djfun djfun added the bug Something isn't working label Apr 2, 2021
@dcorson-ticino-com
Copy link
Contributor

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
Copy link
Contributor Author

djfun commented Apr 2, 2021

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
Copy link
Contributor Author

djfun commented Apr 3, 2021

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
Copy link
Member

ann0see commented Jan 26, 2022

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

djfun added a commit to djfun/jamulus that referenced this issue Jan 26, 2022
When choosing a non-predefined buffer delay, the text is cut off. Appending
2 space characters seems to fix the problem.

Fixes jamulussoftware#1430

Signed-off-by: Martin Kaistra <[email protected]>
@djfun
Copy link
Contributor Author

djfun commented Jan 26, 2022

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

@pljones
Copy link
Collaborator

pljones commented Jan 27, 2022

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.

djfun added a commit to djfun/jamulus that referenced this issue Feb 8, 2022
When choosing a non-predefined buffer delay, the text is cut off. Appending
2 space characters seems to fix the problem.

Fixes jamulussoftware#1430

Signed-off-by: Martin Kaistra <[email protected]>
@hoffie
Copy link
Member

hoffie commented Feb 26, 2022

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
Copy link
Contributor Author

djfun commented Feb 26, 2022

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
Copy link
Member

ann0see commented Feb 28, 2022

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

You can change that probably?

@djfun
Copy link
Contributor Author

djfun commented Feb 28, 2022

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
Copy link
Member

ann0see commented Feb 28, 2022

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

@hoffie
Copy link
Member

hoffie commented Apr 13, 2022

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:

  • It happens when using the Ubuntu font (which is obviously the default on Ubuntu), even on non-Ubuntu systems.
  • Smaller font sizes (<11) make this problem less severe.
  • It happens on any QGroupBox label which uses at least 7 digits. It becomes more visible as more digits are used.
  • Applying a custom stylesheet to QGroupBox::title fixes the issue (the stylesheet content does not matter)
  • Qt6 does not show this issue.

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
Copy link
Collaborator

pljones commented Oct 5, 2022

Hi,

There are three builds here
#2847 (comment)
Do any of them help?

Thanks,

-- Peter

@ann0see ann0see added this to Tracking Jul 1, 2023
@github-project-automation github-project-automation bot moved this to Triage in Tracking Jul 1, 2023
@pljones pljones added the tooling Changes to the automated build system label Jun 29, 2024
@pljones
Copy link
Collaborator

pljones commented Jun 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tooling Changes to the automated build system
Projects
Status: Triage
Development

Successfully merging a pull request may close this issue.

5 participants