| Summary: | [WIN32/GTK] Provide auto-scaling functionality for Icons as per DPI, similar to Mac OS X | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Sravan Kumar Lakkimsetti <sravankumarl> | ||||
| Component: | SWT | Assignee: | Sravan Kumar Lakkimsetti <sravankumarl> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | arunkumar.thondapu, carsten.pfeiffer, christian.albrecht, clint.eastwool, daniel_megert, eclipse, gautier.desaintmartinlacaze, hubert+eclipseorg, johannes, lshanmug, maggu2810, markus.kell.r, mober.at+eclipse, niraj.modi, peter, sascha.appel, sravankumarl, stanio, sven.koehler | ||||
| Version: | 4.5 | Flags: | markus.kell.r:
review+
|
||||
| Target Milestone: | 4.6 M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| See Also: | https://git.eclipse.org/r/56932 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 399786, 488913 | ||||||
| Bug Blocks: | 479614 | ||||||
| Attachments: |
|
||||||
|
Description
Sravan Kumar Lakkimsetti
The basic idea is while rendering the image in GC swt resize the image if the high dpi image is not available. Need to explore a method to identify whether the high dpi image is available and resize the image accordingly before rendering. See bug 399786 comment 8 for a summary of the compatibility issues. I'm not sure the automatic scaling should really be restricted to the new Image constructors. Code that uses the old constructors is already not portable as of today. I think we first need to decide on a strategy for how to make the high-resolution image contents available to SWT clients. Currently, this is not available on the Mac (and available at the cost of too-small images on Win32/GTK). The proposed code changes here are - Request the high resolution image - If not available. Get the image for 100% scaling level - Resize the image to required zoom level. and use it. - Restricted to new constructors for now. New Gerrit change created: https://git.eclipse.org/r/56932 (In reply to Sravan Kumar Lakkimsetti from comment #0) > This logic should be implemented only to the images created using the > new api introduced in bug 421383 I don't understand that part. IMO, any image provided through the old API should be treated the same as a "100% only" image provided through the new API. Rationale: There's always going to be some old plugins around. Unless images of those plugins are auto-scaled, there would be a mixture of "large" and "small" toolbar icons for example, causing a huge backward compatibility issue. At least on Windows (looks like on Mac, the OS would do the autoscaling that I request). CQ:WIND00-WB4-6074 Hi Sravan, I believe, you have a patch for autoscaling Images created with old constructors too. Can you please create a gerrit patch for that? It'll be good if you can post some screenshots on how the images look after autoscaling. Thanks! We will also need an API to turn on/off the autoscaling, need to discuss/decide: - what the API should look like - - what should be the default - turned on or off Created attachment 257351 [details]
snippet367 in linux after auto-scaling applied
Hi Markus, This is independent of other hiDPI work. this can be committed independently. Is it possible to complete the review and deliver in M4 Thanks Sravan I don't think this is independent of the other work, and I wouldn't rush this in now. Such low-level changes in SWT have a high adoption cost, and we should try to minimize the number of breakages for clients. The goal should be to release the whole HiDPI work in the first week of M5. Then we have enough time to polish it and find problems before the milestone. this has been fixed with the following commits https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=b3efb7b3d07204f1ad90e07dcce33a12b890973a https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=ed3a3c115e4d1eb1ad5358851b0182b0695557a2 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=abc992a81e036a57034e7ac9cc2f665be2cba0fa https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=3a567ddfe053c5ec0239ac121a05e12cc88768b4 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=14734beab7b7b915783fb9d21c16ed3bd253062b https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=e02d49aefe42ac4c77b81048299ab069ddb5c2ba verified in I20160317-0200 |