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

GUI does not scale when monitor is 4k #1946

Open
thereticle opened this issue Nov 27, 2024 · 5 comments
Open

GUI does not scale when monitor is 4k #1946

thereticle opened this issue Nov 27, 2024 · 5 comments
Assignees
Labels
Documentation Qt Qt bugs, code or features

Comments

@thereticle
Copy link

Having changed my monitor from Full HD to 4k, now the GUI is very small.
I have already changed all the system settings to adapt the Xfce4 environment but this GUI does not scale.
What can I do?

O.S.: Xubuntu 24.10

@buhtz
Copy link
Member

buhtz commented Nov 27, 2024

Hello thereticle,

Thank you for taking the time to report the bug and providing the details. I appreciate your feedback, will investigate the issue, and work on a solution to the best of my ability.

Your issue is the prefect opportunity to improve our documentation. We had similar issues in the past. But without a 4k monitor on my own I am not able to reproduce the issue and document the steps to solve it.

For me it was never clear what the problem is or how to solve it. I hope you can bring in some light.

Please provide the output of backintime --diagnotics.

Have a look at this comment about qt5ct, but use qt6ct please because BIT does use Qt6.

Please try to remember and document the steps you have done, so we can add this to our documentation.

If you have any more details to share, feel free to reach out.

Please see the projects background information to get an idea about our workflow and priorities:

Best regards,
Christian

@buhtz buhtz added this to the 1.6.0 (upcoming release) milestone Nov 27, 2024
@buhtz buhtz added Qt Qt bugs, code or features Feedback needs user response, may be closed after timeout without a response labels Nov 27, 2024
@thereticle
Copy link
Author

thereticle commented Nov 27, 2024

Hi buhtz,

Well, I’m not very experienced.
As I mentioned, I recently purchased a 4K monitor, and when I started Xubuntu 24.10, everything looked incredibly tiny.

I managed to enlarge the windows and the window fonts by doing the following:

  1. Settings → Appearance → Settings Tab → Window Scaling → 2x
  2. Settings → Window Manager → Theme → default-xhdpi

This fixed the whole Xfce4 environment, but not all programs resize their GUIs.

So, I looked for information on some of the programs I use.

For example, the developer of Shotcut, a video editing program I use, suggested launching the program by adding the parameter QT_SCALE_FACTOR 2 after the program’s name like this:

user@user-PC:~$ shotcut --QT_SCALE_FACTOR 2

and it worked.

Then I tried the same with Back in Time, but it didn’t work. So, I read this interesting article https://doc.qt.io/qt-5/highdpi.html and asked Bing Copilot how to start a program with that parameter set to 2.
Copilot suggested using the env command to set the environment before running the application.

So, I modified the command to:

user@user-PC:~$ env QT_SCALE_FACTOR=2 backintime-qt

and it worked!

So, for me, the problem is solved. Now it’s up to you to modify the program so that the adjustment happens automatically, perhaps by setting the variable QT_AUTO_SCREEN_SCALE_FACTOR to 1 as mentioned in the article.

I think I can mark this bug as solved.

I hope I’ve been helpful.
Cheers!

@thereticle thereticle changed the title Back In Time GUI does not scale when monitor is 4k [SOLVED] Back In Time GUI does not scale when monitor is 4k Nov 28, 2024
@buhtz
Copy link
Member

buhtz commented Nov 28, 2024

Do I understand it correct that BIT wasn't the only application on your system with scaling problems?

Note to myself: https://debianforum.de/forum/viewtopic.php?t=191045

@buhtz buhtz self-assigned this Nov 28, 2024
@buhtz buhtz changed the title [SOLVED] Back In Time GUI does not scale when monitor is 4k GUI does not scale when monitor is 4k Nov 28, 2024
@thereticle
Copy link
Author

thereticle commented Nov 28, 2024

Yes, I can confirm that Back In Time is not the only application whose GUI doesn’t scale properly on a 4K monitor.

At the moment, I’ve used the method described above with: Back In Time, Qbittorrent, Epson Scan 2, Audacity, HPLIP Toolbox, HPLIP Fax Utility, and HPLIP Address Book.

I also tried with GIMP, but it doesn’t work. From what I’ve read here and there, it seems it won’t work because the stable version of GIMP, 2.10.38, is based on GTK 2. However, version 3, which is still in beta, does work. I installed it by following the instructions on this page: https://www.gimp.org/downloads/devel/.

IMPORTANT
In any case, I just discovered that you can set this option globally by adding a line with QT_SCALE_FACTOR=2 at the end of the file /etc/environment.
I am not sure, however, that it works with ALL applications that do not scale the GUI.

@buhtz
Copy link
Member

buhtz commented Nov 28, 2024

I will add an entry about it in our FAQ.
But BIT itself won't handle that or ask for the resolution of the users monitor. This is IMHO out of the scope of a backup application.

@buhtz buhtz added Documentation and removed Feedback needs user response, may be closed after timeout without a response labels Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Qt Qt bugs, code or features
Projects
None yet
Development

No branches or pull requests

2 participants