jim-easterbrook / Photini

An easy to use digital photograph metadata (Exif, IPTC, XMP) editing application.
https://photini.readthedocs.io/
GNU General Public License v3.0
162 stars 24 forks source link

Ability to change UI scale #62

Closed Mohammad-Asiri closed 2 years ago

Mohammad-Asiri commented 2 years ago

Hi,

Is there a way to increase the UI scale for higher resolution monitors?

At the moment when I run Photini the current UI is hard on the eyes, as the screenshot shows.

Thank

Screenshot from 2021-10-19 15-26-07 s.

jim-easterbrook commented 2 years ago

That's a very good question. I don't have a high DPI monitor so I can't easily test any solution to your problem. I've found this article https://doc.qt.io/qt-5/highdpi.html which suggests several ways to make a program compatible with high DPI screens.

What operating system are you using and what version of Qt? The output of photini --version should tell you.

Can you try setting the QT_AUTO_SCREEN_SCALE_FACTOR environment variable to 1 before running Photini? That might be a quick fix until I implement the necessary changes.

jim-easterbrook commented 2 years ago

After some experimentation I've found that I can fake a high DPI monitor by setting the dpi with xrandr --dpi 178 (my normal dpi is 89). Then when I start Photini it runs with all text doubled in size, which should make it look right on a hi DPI monitor. I need to sort out a few other problems, such as the size of the image thumbnails, but I'm not sure what else needs to change.

This might be a system dependent problem.

jim-easterbrook commented 2 years ago

I'm not sure this xrandr setting is relevant. I think it's more a way to allow users to scale applications to their preference. I have made some modifications to Photini so it looks better when scaled, in particular the image thumbnails.

I still need more information about @Mohammad-Asiri 's system to try and reproduce the problem, probably in a virtual machine.

Mohammad-Asiri commented 2 years ago

I'm not sure this xrandr setting is relevant. I think it's more a way to allow users to scale applications to their preference. I have made some modifications to Photini so it looks better when scaled, in particular the image thumbnails.

I still need more information about @Mohammad-Asiri 's system to try and reproduce the problem, probably in a virtual machine.

Hi Jim,

I ran the command photini --version and this the output:

qt5ct: using qt5ct plugin
Photini 2021.9.0, build 1830 (dcfd398)
  Python 3.8.10 (default, Sep 28 2021, 16:10:42)
[GCC 9.3.0]
  python-exiv2 0.5.1, exiv2 0.27.4
  PyQt 5.14.1, Qt 5.12.8, using QtWebEngine
  PyEnchant 2.0.0
  ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  available styles: cleanlooks, gtk2, cde, motif, plastique, qt5ct-style, Windows, Fusion
  using style: qt5ct-style

And my system specs are as follows:

OS: Linux Mint 20.2 x86_64 
Host: OptiPlex 7060 
Kernel: 5.11.0-38-generic 
Shell: bash 5.0.17 
Resolution: 1920x1600, 1920x1600 
DE: Cinnamon 
WM: Mutter (Muffin) 
WM Theme: Mint-Y-Dark (Crux-Left) 
Theme: Mint-Y [GTK2/3] 
Icons: Mint-Y [GTK2/3] 
Terminal: gnome-terminal 
CPU: Intel i7-8700 (12) @ 4.600GHz 
GPU: Intel UHD Graphics 630 
GPU: NVIDIA GeForce GT 710 
Memory: 7710MiB / 39920MiB 
jim-easterbrook commented 2 years ago

Thanks, that doesn't look very different from the Ubuntu virtual machine I tried some experiments with. I'm not sure what system parameters Qt looks at to determine the screen resolution, but it's clearly not getting it right on your system. The xdpyinfo | grep dots command shows 96 dpi on my machine. If yours is a similar number then it would explain why Qt doesn't realise your screen is hi res.

The next release of Photini will have an item in the config file to set the Qt scale factor. In the meantime you can set it manually by starting Photini like this: QT_SCALE_FACTOR=2 python3 -m photini.editor. You can use a non-integer scale factor, but it might cause scaling artefacts.

jim-easterbrook commented 2 years ago

New release 2021.11.0 has a qt_scale_factor option in the Photini config file.

Mohammad-Asiri commented 2 years ago

New release 2021.11.0 has a qt_scale_factor option in the Photini config file.

Hi Jim,

I just installed the new version, and it is now really clear and viewable.

Thanks a lot for your hard work.

jim-easterbrook commented 2 years ago

Do let me know if you find anything that's still the wrong size.