Open firelizzard18 opened 1 year ago
Here's the reproduction: https://gitlab.com/ethan.reesor/contrib/wails-scaling-issue. I installed Ant Design before I realized the unmodified template reproduced the issue.
I can reproduce the issue in Epiphany, so it looks to be an upstream WebKit GTK issue.
Thanks for opening this.
The webkit2gtk Issue Tracker can sometimes provide insights into upstream bugs. Perhaps we need to bump the version up
Since it renders fine in Falkon, which uses QtWebEngine which is Chromium based, it seems like the issue is specific to WebKit GTK, not WebKit itself. Or maybe it's specific to WebKit GTK 4 - I have no clue if that is tied to a specific WebKit version or not.
I had looked for WebKit GTK bug reports but apparently I hadn't looked hard enough. I think this is the culprit:
Other possibly relevant reports:
For reference, here's Falkon:
I attached my screenshots to the upstream bug and made a comment
This appears to be specific to X11. I'm using KDE and SDDM which lets me login using X11 or using Wayland. When start my session with Wayland the issue is no longer present.
Oh great... When I last tested on Wayland, you couldn't center a window because the Wayland gods had decided that applications should be told where they are placed. Just like the gnome gods decided that tray icons shouldn't exist so now everyone has to install a 3rd party library to make them work.
Sometimes I feel like the Linux desktop has a death wish! 😅
I was just curious if it might fix things, and Plasma makes it really easy to switch. And I wanted to take some screenshots for documentation so I wanted them to look nice. I switched back immediately because X11 works fine for me and I have everything configured the way I want it. The most noticeable difference was actually the cursor speed/acceleration.
Thanks for the info and sorry about the rant 😅 I just want it to be as easy as the other platforms 😭
Same issue. Maybe this information will be useful: OS: Manjaro Linux 23.0.2 KDE/Wayland HiDPI display Wails: v2.6.0 gtk3: 1:3.24.38-1 webkit2gtk: 2.40.5-2
UPD: and it got fixed by this:
export GDK_BACKEND=wayland
It seems not one size fits all for this so I propose we move it to config. Ideally we'd be able to automatically detect the best value but I'm not sure how that would be done
GDK_BACKEND=wayland
does not work for me. I use SDDM and there's a dropdown for the window server which I leave on X11, so I suspect Wayland simply isn't running. If I change that dropdown it works, but the GDK_BACKEND workaround is not viable for anyone who is not running with Wayland. Here's the error:
Gtk-Message: 21:14:24.638: Failed to load module "canberra-gtk-module"
(accumulate:188686): Gtk-WARNING **: 21:14:24.638: cannot open display: :0
Description
Wails and/or WebKit GTK does not handle display scaling correctly. I don't know if this is a Wails issue or an upstream WebKit GTK issue.
To Reproduce
I made no changes since the issue is evident in the unmodified template.
Expected behaviour
Display scaling behaves consistently. This issue is clearly related to HTML rendering since it is not present if I view the app with Firefox.
Screenshots
I removed the logo to make the issue clearer. This is how the app appears natively:
This is how it appears in Firefox:
Attempted Fixes
I've looked for and failed to find WebKit GTK issues relating to display scaling.
System Details
Additional context
I am looking for a WebKit GTK based browser (that isn't the monstrosity of Chrome/Chromium) to test with.
I'm not sure why
wails doctor
thinks I have missing dependencies. I can run apps so clearly I have what I need.