Bug 568407 - [Linux] Toolbar icons are double size on hi-res (200% scaling)
Summary: [Linux] Toolbar icons are double size on hi-res (200% scaling)
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.18   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 4.18 M3   Edit
Assignee: Soraphol (Paul) Damrongpiriyapong CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks: 566902
  Show dependency tree
 
Reported: 2020-10-31 10:07 EDT by Phil Beauvoir CLA
Modified: 2020-11-13 09:57 EST (History)
5 users (show)

See Also:


Attachments
Screenshot (438.04 KB, image/png)
2020-10-31 10:07 EDT, Phil Beauvoir CLA
no flags Details
Screenshot of I20200922-1800 (495.72 KB, image/png)
2020-11-03 07:10 EST, Phil Beauvoir CLA
no flags Details
Screenshot of I20200924-1800 (702.09 KB, image/png)
2020-11-03 07:11 EST, Phil Beauvoir CLA
no flags Details
Screenshot of toolbar (41.67 KB, image/png)
2020-11-11 10:39 EST, Phil Beauvoir CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Beauvoir CLA 2020-10-31 10:07:47 EDT
Created attachment 284618 [details]
Screenshot

Eclipse 4.18
Version: I20201030-1800
Ubuntu 20.04

I'm running the latest I-build of Eclipse 4.18 with Ubuntu 20.04 with display scaling at 200%.

All toolbar icons are now double-sized. This is not happening in Eclipse 4.17 so must be a regression.
Comment 1 Phil Beauvoir CLA 2020-10-31 10:33:21 EDT
I've tested the 4.18 I-builds and found when the regression occurred:

I20200921-1800 - OK, the icons are correct size

I20200928-1800 - Not OK, the icons are double-sized
Comment 2 Phil Beauvoir CLA 2020-11-03 03:54:16 EST
Not sure if this is an SWT issue, can anyone advise?
Comment 3 Andrey Loskutov CLA 2020-11-03 04:37:11 EST
(In reply to Phil Beauvoir from comment #1)
> I've tested the 4.18 I-builds and found when the regression occurred:
> 
> I20200921-1800 - OK, the icons are correct size
> 
> I20200928-1800 - Not OK, the icons are double-sized

Could you narrow down to the first build where the regression happens, we had many changes in the week? I do not see anything special in SWT, but I see changes in HiDPI imagedescriptior code via bug 567898 (would be I20201023-1800) and in ActionContributionItem via bug 567905 (would be I20201024-1800). Both could be related.
Comment 4 Phil Beauvoir CLA 2020-11-03 04:41:16 EST
(In reply to Andrey Loskutov from comment #3)
> (In reply to Phil Beauvoir from comment #1)
> > I've tested the 4.18 I-builds and found when the regression occurred:
> > 
> > I20200921-1800 - OK, the icons are correct size
> > 
> > I20200928-1800 - Not OK, the icons are double-sized
> 
> Could you narrow down to the first build where the regression happens, we
> had many changes in the week? I do not see anything special in SWT, but I
> see changes in HiDPI imagedescriptior code via bug 567898 (would be
> I20201023-1800) and in ActionContributionItem via bug 567905 (would be
> I20201024-1800). Both could be related.

I can't find links to those builds:

https://download.eclipse.org/eclipse/downloads/

Do you have links?

Could the committers also test this? Setting the scaling to 200% on Ubuntu or a similar Linux distro and launching a 4.18 Eclipse build will show the problem straight away.
Comment 5 Andrey Loskutov CLA 2020-11-03 04:58:29 EST
(In reply to Phil Beauvoir from comment #4)
> Do you have links?

I've uploaded two builds I still had locally:

eclipse-SDK-I20201023-0250-linux-gtk-x86_64.tar.gz:

https://drive.google.com/file/d/1GmQea4qyL3f1cl0AEgI3FnJT_vNfwZ33/view?usp=sharing

eclipse-SDK-I20201025-1800-linux-gtk-x86_64.tar.gz:

https://drive.google.com/file/d/1vOwesW-3Ia6tfZZkHyuOC-tt7YcpzL5H/view?usp=sharing

> Could the committers also test this? Setting the scaling to 200% on Ubuntu
> or a similar Linux distro and launching a 4.18 Eclipse build will show the
> problem straight away.

:-) Nice try. I have RHEL 7.4 with KDE and no HI DPI monitor, so I have no idea how to change scaling (I can't find nothing related in KDE settings).
Comment 6 Christoph Laeubrich CLA 2020-11-03 05:11:11 EST
(In reply to Phil Beauvoir from comment #0)
> All toolbar icons are now double-sized. 

Not sure if I understand right, but I always though it was the intention of High DPI support that Icons are larger...
Comment 7 Sravan Kumar Lakkimsetti CLA 2020-11-03 05:21:31 EST
I can see this problem with X11 backend. needs further investigation 

@paul can you try this on wayland backend?
Comment 8 Sravan Kumar Lakkimsetti CLA 2020-11-03 05:22:00 EST
(In reply to Christoph Laeubrich from comment #6)
> (In reply to Phil Beauvoir from comment #0)
> > All toolbar icons are now double-sized. 
> 
> Not sure if I understand right, but I always though it was the intention of
> High DPI support that Icons are larger...

They are scaled 4 times instead of twice.
Comment 9 Phil Beauvoir CLA 2020-11-03 05:22:34 EST
The double sized icons are in both builds so this means this problem started in I20201023-0250.

> :-) Nice try. I have RHEL 7.4 with KDE and no HI DPI monitor, so I have no idea how to change scaling (I can't find nothing related in KDE settings).

I use Linux Mint and Ubuntu in VMWare Fusion on a MacBook which has a high DPI screen.

It is possible to set the Display Scale to 150% on Ubuntu 20.04 and on Linux Mint to set the Display scaling to "Double (Hi-DPI)" even without a Hi DPI monitor. Both of these settings will let one do a test and see the problem.
Comment 10 Phil Beauvoir CLA 2020-11-03 05:28:59 EST
(In reply to Christoph Laeubrich from comment #6)
> (In reply to Phil Beauvoir from comment #0)
> > All toolbar icons are now double-sized. 
> 
> Not sure if I understand right, but I always though it was the intention of
> High DPI support that Icons are larger...

If you look at the screenshot you can see they are double the double size. Compare the icons in the toolbar with those in the View tabs.

https://bugs.eclipse.org/bugs/attachment.cgi?id=284618
Comment 11 Andrey Loskutov CLA 2020-11-03 05:45:17 EST
(In reply to Phil Beauvoir from comment #9)
> The double sized icons are in both builds so this means this problem started
> in I20201023-0250.

Great, so it is most likely bug 567898. Christoph, could you please check that?
 
> It is possible to set the Display Scale to 150% on Ubuntu 20.04 and on Linux
> Mint to set the Display scaling to "Double (Hi-DPI)" even without a Hi DPI
> monitor.

Nice for Mint, but as said, I see no way to change any display property with KDE on RHEL 7.4.
Comment 12 Phil Beauvoir CLA 2020-11-03 05:55:25 EST
Hold on, we've got the build dates mixed up.

I said:

> I20200921-1800 - OK, the icons are correct size
> I20200928-1800 - Not OK, the icons are double-sized

Those are September I builds.
Comment 13 Andrey Loskutov CLA 2020-11-03 06:00:15 EST
(In reply to Phil Beauvoir from comment #12)
> Hold on, we've got the build dates mixed up.
> 
> I said:
> 
> > I20200921-1800 - OK, the icons are correct size
> > I20200928-1800 - Not OK, the icons are double-sized
> 
> Those are September I builds.

Arrgh, I've seen your first comment about October version and somehow missed that.

Here are three related builds from September I have: https://drive.google.com/drive/folders/0B7vALkuico9heWlDMlhfRGlRbm8?usp=sharing
Comment 14 Andrey Loskutov CLA 2020-11-03 06:01:57 EST
(In reply to Andrey Loskutov from comment #11)
> (In reply to Phil Beauvoir from comment #9)
> > The double sized icons are in both builds so this means this problem started
> > in I20201023-0250.
> 
> Great, so it is most likely bug 567898. Christoph, could you please check
> that?

Sorry for noise, wrong I Build month.
Comment 15 Phil Beauvoir CLA 2020-11-03 06:06:02 EST
(In reply to Andrey Loskutov from comment #13)
> (In reply to Phil Beauvoir from comment #12)
> > Hold on, we've got the build dates mixed up.
> > 
> > I said:
> > 
> > > I20200921-1800 - OK, the icons are correct size
> > > I20200928-1800 - Not OK, the icons are double-sized
> > 
> > Those are September I builds.
> 
> Arrgh, I've seen your first comment about October version and somehow missed
> that.
> 
> Here are three related builds from September I have:
> https://drive.google.com/drive/folders/
> 0B7vALkuico9heWlDMlhfRGlRbm8?usp=sharing

The problem occurs in I20200924-1800.
Comment 16 Phil Beauvoir CLA 2020-11-03 06:13:52 EST
I looked through the SWT commits for around that date and found this:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=567138

Could it be related?
Comment 17 Andrey Loskutov CLA 2020-11-03 06:59:23 EST
(In reply to Phil Beauvoir from comment #15)
> > Here are three related builds from September I have:
> > https://drive.google.com/drive/folders/
> > 0B7vALkuico9heWlDMlhfRGlRbm8?usp=sharing
> 
> The problem occurs in I20200924-1800.

I've uploaded build I20200922-1800 and I20200924-1800. So the problem does not appear in I20200922-1800, right?

(In reply to Phil Beauvoir from comment #16)
> I looked through the SWT commits for around that date and found this:
> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=567138
> 
> Could it be related?

Bug 567138 changes went into I20200924-1800 build, so could be related, yes.

If, then likely this one: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/169846

Can someone who can reproduce the problem revert this commit and check if that fixes the problem?
Comment 18 Phil Beauvoir CLA 2020-11-03 07:05:15 EST
(In reply to Andrey Loskutov from comment #17)
> (In reply to Phil Beauvoir from comment #15)
> > > Here are three related builds from September I have:
> > > https://drive.google.com/drive/folders/
> > > 0B7vALkuico9heWlDMlhfRGlRbm8?usp=sharing
> > 
> > The problem occurs in I20200924-1800.
> 
> I've uploaded build I20200922-1800 and I20200924-1800. So the problem does
> not appear in I20200922-1800, right?

Correct. The problem does not appear in I20200922-1800.
Comment 19 Phil Beauvoir CLA 2020-11-03 07:10:14 EST
Created attachment 284645 [details]
Screenshot of I20200922-1800

Screenshot of I20200922-1800
Comment 20 Phil Beauvoir CLA 2020-11-03 07:11:23 EST
Created attachment 284647 [details]
Screenshot of I20200924-1800

Screenshot of I20200924-1800 where we can see the issue.
Comment 21 Phil Beauvoir CLA 2020-11-05 04:59:39 EST
Should I change the component setting to "SWT" if this is not "UI"?
Comment 22 Soraphol (Paul) Damrongpiriyapong CLA 2020-11-05 13:12:27 EST
Sorry for the late reply, I missed the email when going through my Bugzilla list. 

Anyways, on Fedora (Wayland) the icons are not doubled sized, but incorrectly scaled and are blurry. I assume that is the Wayland equivalent of this bug. I can confirm the regression does occur between the two builds 0922, and 0928. 

I went ahead and reverted the changes of https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/169846, however the bug still exists. I'm continuing to look into this.
Comment 23 Phil Beauvoir CLA 2020-11-05 13:14:19 EST
(In reply to Soraphol (Paul) Damrongpiriyapong from comment #22)
> I can confirm the regression does occur between the two builds
> 0922, and 0928. 
> 
> 

Actually, occurs in I20200924-1800.
Comment 24 Phil Beauvoir CLA 2020-11-05 13:20:38 EST
Images are also extra large not just in toolbars and tool items but also in the images used at the top of wizard dialogs.
Comment 25 Soraphol (Paul) Damrongpiriyapong CLA 2020-11-05 14:01:01 EST
So the Toolbar bug is not the reason for the regression. The patch that is causing the regression is 566902. I'm working on a patch right now to resolve this.
Comment 26 Eclipse Genie CLA 2020-11-05 15:24:13 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/171861
Comment 27 Soraphol (Paul) Damrongpiriyapong CLA 2020-11-05 15:26:03 EST
@Phil, thank you for all the testing by the way. I have submitted a patch that should fix the issue. If you could either check it out and test it or wait till we get an I-build for it, that would be great!
Comment 28 Phil Beauvoir CLA 2020-11-05 15:27:36 EST
@Paul thank-you for the fast fix and a big thank-you for your contributions to SWT. :-)

As soon as this gets into the I build I will test it!
Comment 30 Phil Beauvoir CLA 2020-11-06 08:37:29 EST
Tested I20201105-1800 and it looks good. All images and icons are back to normal size.

Thanks, Paul!
Comment 31 Andrey Loskutov CLA 2020-11-06 08:56:31 EST
Thanks Paul & Phil!
Comment 32 Phil Beauvoir CLA 2020-11-11 10:39:15 EST
Created attachment 284733 [details]
Screenshot of toolbar

There's another problem with this issue.

When you hover the mouse on the "Debug" and "Run" drop-down toolbar items in Eclipse, the icons change to double-size.

See screenshot.

Should I re-open this issue?
Comment 33 Andrey Loskutov CLA 2020-11-11 10:51:57 EST
(In reply to Phil Beauvoir from comment #32)
> Created attachment 284733 [details]
> Screenshot of toolbar
> 
> There's another problem with this issue.
> 
> When you hover the mouse on the "Debug" and "Run" drop-down toolbar items in
> Eclipse, the icons change to double-size.
> 
> See screenshot.
> 
> Should I re-open this issue?

Thanks, I will do this for you :-)

Paul, could you please check if you could make it for M3 (Monday next week)?
Comment 34 Soraphol (Paul) Damrongpiriyapong CLA 2020-11-12 09:44:53 EST
Sorry for the late reply, yesterday was a day off in Canada. I will take a look, I'll try my best to get it by Monday.
Comment 35 Eclipse Genie CLA 2020-11-12 10:53:18 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/172158
Comment 37 Soraphol (Paul) Damrongpiriyapong CLA 2020-11-13 09:56:41 EST
Verified fixed on latest I-build: I20201112-1800.