NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.09k stars 14.08k forks source link

Krita GUI too small and glitchy #338504

Open Cal-Nine opened 2 months ago

Cal-Nine commented 2 months ago

Describe the bug

Krita GUI interface too small in KDE Plasma and has glitches where elements are cropped.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Open Krita while using KDE Plasma
  2. Observe interface size – too small, with glitches
  3. Open Krita using env QT_AUTO_SCREEN_SCALE_FACTOR=1 krita or alter the exec line in the .desktop to Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=1 krita %F
  4. Observe interface size

Expected behavior

Krita interface appears normal without needing to adjust auto scale factor.

Screenshots

All screenshots use a 4K monitor with 120% global scaling in KDE Plasma. Default Install: (note cut off text in splash screen) Default Install 2 Default Install With Fix: With Fix With Fix 2

Additional context

I haven't tested Krita on any other distributions so I'm not sure if this is an issue unique to NixOS (or KDE Plasma) but it is also a problem for a Flatpak so it seems like a broader issue. But I don't know what the policy is on making these kinds of fixes with NixOS, so I thought I'd post here as well as open a bug report with KDE here.

Notify maintainers

@abbradar @sifmelcara @nek0

eclairevoyant commented 2 months ago

Do you have something else in your config setting QT_AUTO_SCREEN_SCALE_FACTOR? What's the output of printenv QT_AUTO_SCREEN_SCALE_FACTOR normally?

Cal-Nine commented 2 months ago

I don't think I have anything else. This is the case at 100% global scaling in Plasma, and printenv QT_AUTO_SCREEN_SCALE_FACTOR returns 0

Cal-Nine commented 2 months ago

I checked in a new user to see if it was a Plasma config issue, Krita behaved exactly the same

sifmelcara commented 2 months ago

Some relevant info here: High DPI Displays | Qt 5.15.

It looks like expected that QT_AUTO_SCREEN_SCALE_FACTOR need to be set to get scaling on HiDPI screens?

Note that personally I just set QT_SCALE_FACTOR=2 globally to get proper scaling for QT programs. I think many people do something similar

Cal-Nine commented 2 months ago

QT_SCALE_FACTOR=2 doubles the UI size, multiplying with Plasma Global Scaling.

I did realise, however, that the issue only occurs when my monitors are both set to a DIFFERENT global scaling.

foldfree commented 1 month ago

it could be an issue with xwayland and KDE? Krita cannot be wayland native until the protocol gets color management. i am using Krita on hyprland with a high dpi laptop, to fix the scaling i run echo "Xft.dpi: 192" | xrdb -merge in the terminal.

Cal-Nine commented 1 month ago

oops I did not realise it was still X11. That would definitely be why, I get similar issues with all X11 apps.