evilsocket / opensnitch

OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch.
GNU General Public License v3.0
10.79k stars 503 forks source link

Scaling-Errors #775

Closed slynobody closed 1 year ago

slynobody commented 1 year ago

Describe the bug Using KDE and 200% ui-scaling (hidpi) the icons are not rendered correctly. (error does not occur when using themes)

Steps to reproduce

  1. Use kde / plasma on debian
  2. install opensnitch through .deb
  3. use hidpi-screen, use 200% scaling
  4. icons are to big, rendering the ui (all related windows) bogus (workaround: use the xml-themes)
gustavo-iniguez-goya commented 1 year ago

Thank you @slynobody .

Could you post a screenshot of the GUI and another screenshot of another app? just to be sure it's the same problem when I'l try to reproduce it.

Meanwhile, see if this temporal solution solves it: https://github.com/evilsocket/opensnitch/wiki/Known-problems#gui-size-problems-on-4k-monitors

slynobody commented 1 year ago

thank you for your hint to your temporal solution, that does not solve the isssue.

with my slightly customized 'peri'-theme 2022-12-14_21-03 with the 'system'-theme 2022-12-14_21-04 btw: either if themes are used or not at least some of the fonts used are predefined in your ui-choices (not defaults to lets say kde or openbox-user choices), right?

gustavo-iniguez-goya commented 1 year ago

btw: either if themes are used or not at least some of the fonts used are predefined in your ui-choices (not defaults to lets say kde or openbox-user choices), right?

No. The fonts used are the ones predefined by QtCreator, we don't configure them. We only configure Style and Alignment of some columns of the Lists, but the tabs and Rules Tab left panel is using Qt's default text style .

On the other hand, those icons are also the ones predefined by your theme. By default it tries to use theme's icons, if they're not available it defaults to Qt's ones: https://github.com/evilsocket/opensnitch/blob/9e630d009d0fc1ce19cbefe896813415cbeac28c/ui/opensnitch/utils.py#L421

What theme are you using? Does it work with the KDE's default theme?

slynobody commented 1 year ago

Thank you for your hints!

same with adwaita as well as breeze (breeze below) 2022-12-20_22-24

gustavo-iniguez-goya commented 1 year ago

I've tried to reproduce this issue with all the options I've seen in KDE's System Settings to change the appearance, but I've been unable to reproduce this problem :(

There're a couple of environment variables that affect the GUI: QT_AUTO_SCREEN_SCALE_FACTOR and QT_SCREEN_SCALE_FACTORS

By default we set QT_AUTO_SCREEN_SCALE_FACTOR to 1 which is the same than setting QtCore.Qt.AA_EnableHighDpiScaling to True. See if playing with these vars and launching the GUI from the cli configures the icons properly: https://github.com/evilsocket/opensnitch/wiki/Known-problems#gui-size-problems-on-4k-monitors

gustavo-iniguez-goya commented 1 year ago

I'll postpone this issue for the future. I have no idea why you have those icons, but it's nothing that we customize or change, it's using system's default icons and sizes.

slynobody commented 1 year ago

thank you for your help! seems to be a debian-specific issue. After some python-updates works now as expected.