Hi, this is not an issue isolated to anki, but i think more generally to Qt-Apps with Wayland and fractional scaling.
I have a somewhat unusual Display Resolution (2256x1504@13.5 inches) and therefore somewhat a HiDPI screen. This means for a useable interface i use a fractional scaling of 150%. Unfortunately this results in a blurry interface with qt-apps like KeePassXC or Anki. I guess this is because of Wayland and maybe XWayland. It would be really nice if the Anki developers could see if they can get a native Wayland support and if this would resolve the Issue. Programs like firefox, thunderbird or TLP-UI don’t have this issue.
Appended is a screenshot that should help explain the issue better.
System information:
Manjaro Gnome 41.5
Kernel 5.17
Wayland
Screen 2256x1504 with Scaling 150%
Graphics Mesa Intel
Anki 2.1.50 (26d40c3a) Python 3.10.4 Qt 6.2.3 PyQt 6.2.3
also tested with 2.1.49, makes no difference
Is this bug on the aggenda or is there some known workaround for this? Maybe turn of the scaling for this program specifically and use the anki internal upscaling?
You can force wayland mode with QT_QPA_PLATFORM=wayland ANKI_WAYLAND=1 in a terminal. If it does not help, it’s doubtful there is anything Anki can do about it.
It does indeed help with the sharpness of the interface, it looks very good. Unfortunately Anki is otherwise unusable, window title bar doesn’t render correctly and the full screen mode shows no window at all, but is transparent instead.
Hi! Sorry for reviving this thread. Are there any plans on better wayland support in the future? Launching anki with QT_QPA_PLATFORM=wayland ANKI_WAYLAND=1 works for fractional scaling, but as indicated in the manual, the application looses its borders (at least for me on Fedora). Are there any workarounds to fix this? Any input would be appreciated! Thanks.
I got my sights on creating client-side window decorations (i.e. custom window design specific to Anki) to support DEs that don’t allow server-side decorations. As a GNOME user I’m affected as well and I’d love to have that hi-dpi support at some point.
CSD would fix the missing border/drop shadow issue and open the door for more creative UI than just a menu bar. However, it would apply to all systems. There is no way to do it for Wayland Linux only.
To me a cross-platform consistent look is preferable anyway (provided it’s a good design), but @dae has expressed some reservations about custom designs (e.g. scrollbar in #1989). Anki’s current approach is to make the app look and feel native to the system it runs on.
TL;DR: it’s difficult and will take some time - but it’s the first project I’d take up once I’m finished with editor-, theme-, and main window updates - if I get the Go for that.
Thanks a lot for the transparent and quick response on this. It’s good to know that you are actively working on this and I can understand both views on CSD, but I’m sure you’ll come to an agreeable solution. Thanks for the work on the app, it’s very much appreciated.
This is particularly difficult for Wayland as Gnome is far from being the only DE / WM that runs on Wayland, and that there is a wide variety on how the borders are shown. Just to give you an example, this is what it looks like on mine (Sway)
Hi, just wanted to say thank you very much for your hard work yall! Anki is now working great on Wayland on Gnome, and it looks great. I’m really loving the recent design choices and the sharp look while scaling
If you don’t mind me asking: how do you have Anki set up on Gnome under Wayland? Environment variable? Have you found a way to force gnome window decorations?
I’m using Manjaro Gnome with Wayland and just installed Anki-bin from the AUR, no further setup required on my side. And no, i have not forced gnome specific theming for Anki, as this isn’t something of importance for me.