Community
Participate
Working Groups
When using Eclipse on a HiDPI display the Browser widget is not scaled. For example if the display's scale factor is x2, the browser remains scaled at x1 and so its contents is twice as small than should be. This can be reproducing by opening the Welcome page using Help > Welcome. The issue occurs both with GTK2 and GTK3.
Thank you for the bug report. Hmm, it's possible that HiDPI hasn't yet been implemented for Browser widget yet. But technically it seems that webkitgtk itself has hidpi support. Would you be able to add a screenshot? It would give me a better idea of things.
Created attachment 270965 [details] Welcome page on HiDPI display
Created attachment 270966 [details] Infocenter on HiDPI display
Created attachment 270967 [details] Javadoc on HiDPI display
Leo, I've attached several examples of HiDPI issues with the Browser widget. There are other issues with HiDPI displays that can be seen in Infocenter screenshot. Generally I am under the impression that HiDPI support is being barely tested. I don't know if you are aware of that, but HiDPI support (at least for Linux and Windows) can be easily tested under VirtualBox even if you don't have a HiDPI monitor. If you are interested, I can take some time and create a detailed step by step guide for how to do that.
(In reply to Peter Severin from comment #5) > Leo, I've attached several examples of HiDPI issues with the Browser widget. > > There are other issues with HiDPI displays that can be seen in Infocenter > screenshot. > > Generally I am under the impression that HiDPI support is being barely > tested. I don't know if you are aware of that, but HiDPI support (at least > for Linux and Windows) can be easily tested under VirtualBox even if you > don't have a HiDPI monitor. If you are interested, I can take some time and > create a detailed step by step guide for how to do that. Hello Peter, Thank you for your screen shots. Interesting. Do you know, does it look any better on Windows/Cocoa, or is the content strange also? There's been a fair bit of effort to port SWT to HiDPI, it's not fully complete thou. Thank you for bug report, it is helpful. I'm currently working on porting SWT webkit1 to webkit2, but afterwards I may look into adding hi-dpi support to browser also. A detailed step-by-step setup is probably overkill, but maybe a few bullet points with general hints on how to setup such a VM would be useful.
Leo, Yes, as I am developing an RCP application, so I am testing HiDPI on all platforms. Both Windows and Cocoa have good support for HiDPI. On Cocoa it works best and I have no problems to report there. There are some issues on Windows, but those a relatively minor. The Browser widget works correctly on both Windows and Cocoa. HiDPI support on Linux however is far from being acceptable. The most blatant issues are this one and Bug 494724. Here's how to setup a Debian system in Virtual Box for HiDPI testing. I imagine the same can be done with Fedora, however I believe you need to use an xorg session instead of Wayland. Here are the steps: You need to add a 3200x1800 resolution option first: # Generate modeline using gtf 3200 1800 60 # Create and add new mode using xrandr xrandr --newmode "3200x1800_60.00" 492.00 3200 3456 3800 4400 1800 1803 1808 1865 -hsync +vsync # Find out display name by simply running xrandr xrandr # Then add more to the display xrandr --addmode "VBOX-0" 3200x1800_60.00 Now you should have a new resolution available in the Gnome display settings. Switch to it. # Enable 2 factor scaling using: gsettings set org.gnome.desktop.interface scaling-factor 2 At this point you can scale the guest window down using Host+C shortcut to make it fit your monitor. Hit Host+C to restore the original size. I find this useful for inspecting HiDPI issues by viewing them closely. The same can be done for Windows guest, but with fewer steps: VBoxManage setextradata "Windows Guest" CustomVideoMode1 "3200x1800x16" VBoxManage setextradata global GUI/MaxGuestResolution any Then start the Windows guest and choose the custom resolution. One issue that I've encountered with this is that you need to uninstall Guest Additions on Windows for custom video mode to work. I hope this helps.
(In reply to Peter Severin from comment #7) > Leo, > > Yes, as I am developing an RCP application, so I am testing HiDPI on all > platforms. Both Windows and Cocoa have good support for HiDPI. On Cocoa it > works best and I have no problems to report there. There are some issues on > Windows, but those a relatively minor. The Browser widget works correctly on > both Windows and Cocoa. > > HiDPI support on Linux however is far from being acceptable. The most > blatant issues are this one and Bug 494724. > .... > I hope this helps. Hey ya, Thanks for outlining this. We're having a team meeting next week to look what we'd work on next year. I've added the HiDPi business to the meeting agenda. Perhaps it's a project that we can investigate for upcoming eclipse releases. I don't have a set timeline for this, but it's on the radar. Also thanks for VM config steps. They'll come in handy during development.
Maybe we can discuss some workarounds since the browser is unusable on gtk HiDPI monitors. If you have access to the HTML, the following can be done to fix the Browser widget: private String getScaling() { if (Platform.getWS().startsWith("gtk")) { int zoom= DPIUtil.getDeviceZoom(); return "<style>" + "body {" + " zoom: " + zoom + "%;" + "}</style> "; } return ""; }
Hi, At the moment we are prioritizing bugs that prevent people from moving from Gtk2 to Gtk3 and Wayland. HiDpi comes after. But I'd be happy to review patches.
(In reply to Leo Ufimtsev from comment #10) > But I'd be happy to review patches. Can you point me in the right direction?
(In reply to Wim Jongman from comment #11) > (In reply to Leo Ufimtsev from comment #10) > > But I'd be happy to review patches. > > Can you point me in the right direction? Hmmm, I don't know much about the HiDpi movement to be honest. But the way it works is that there is a common widget: org.eclipse.swt.browser.Browser Which is implemented differently on each platform. On Gtk it's here: org.eclipse.swt.browser.WebKit (in Webkit/Gtk folder). Note, the javadoc hover is read from a CSS file. Maybe the font size needs to be set properly if hidpi is enabled. Look around here for hover: https://github.com/eclipse/eclipse.jdt.ui/blob/master/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java There is also JavadocView.java for the view in eclipse. They share some common ancestor I think.
Fixed as part of bug 530932
verified Eclipse SDK Version: Photon (4.8) Build id: I20180508-2000 OS: Linux, v.4.16.6-302.fc28.x86_64, x86_64 / gtk 3.22.30, WebKit 2.20.1
I'm testing the latest I20180515-2000 build on HiDPI display with x2 scaling. I see a regression when running with GTK2 as web browser is not scaled. There is also an issue with recently fixed getDPI method in Bug 518717 which might be related to this.
Created attachment 274060 [details] Welcome screen on GTK2 Here is the screenshot I see on GTK2. I don't have webkit for GTK2 installed so this screen is expected.
Created attachment 274062 [details] Unscaled browser GTK2 This is what I see running Debian stable. GTK version is 2.24.31. org.eclipse.swt.internal.deviceZoom=200 org.eclipse.swt.internal.gdk.backend=x11 org.eclipse.swt.internal.gtk.theme=Adwaita org.eclipse.swt.internal.gtk.version=2.24.31
(In reply to Peter Severin from comment #17) > Created attachment 274062 [details] > Unscaled browser GTK2 > > This is what I see running Debian stable. GTK version is 2.24.31. > > org.eclipse.swt.internal.deviceZoom=200 > org.eclipse.swt.internal.gdk.backend=x11 > org.eclipse.swt.internal.gtk.theme=Adwaita > org.eclipse.swt.internal.gtk.version=2.24.31 Ping. Is this solved or not solved? Peter what Debian version are you running?
I am reproducing this issue with Ubuntu 16.04 too, so it's not related to Debian. My understanding is that GTK2 is not maintained anymore, which is unfortunate as at this stage GTK3 still has various issues related to HiDPI, so there is no stable GTK option at this moment.
(In reply to Peter Severin from comment #19) > I am reproducing this issue with Ubuntu 16.04 too, so it's not related to > Debian. My understanding is that GTK2 is not maintained anymore, which is > unfortunate as at this stage GTK3 still has various issues related to HiDPI, > so there is no stable GTK option at this moment. I do not see this bug on Ubuntu 18.04 V4.15-0-20-generic X86-64 / gtk 3.22.30 / webkit 2.20.2
I am not sure we are testing the same thing. For example the screenshot attached by Sravan shows SWT-based Welcome screen and not the browser-based Welcome screen. It's a fallback method used when not correct webkit package is intalled. To test webkit correctly with GTK2 you need to have libwebkitgtk-1.0-0 package installed. Then start eclipse with SWT_GTK3=0. I'm attaching the screenshot of what welcome screen looks like in this case.
Created attachment 274233 [details] Welcome screen with Eclipse 4.8 and GTK2
And just to make it clear, it's not the Welcome screen that I need to work, but the embedded browser. I'm just using Welcome screen to test webkit support. In WireframeSketcher app that I develop the embedded browser is being used for other things, and for that I ensure that the correct webkit package is installed on user system.
Created attachment 274234 [details] Unscaled javadoc on GTK2 Here's another example, that of Javadoc view.
The problem here is we don't use native scaling in GTK2. Eclipse uses its own scaling algorithm. This the reason why a lot of native widgets doesn't scale. GTK3 have native scaling support so we made use of native scaling here. Till we get native scaling it is going to be difficult to achieve this on GTK2.