| Summary: | Provide means to specify double-sized graphics for HiDPI mode on OS X | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Thomas Singer <eclipse> | ||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | arunkumar.thondapu, bjoern.pollex, bsd, busta03200, christoph.wulf, derekbixler, elreydetodo, gunnar, justin, kaloyan, lorenzo.bettini, lshanmug, markus.kell.r, martin.platter, ntsarb, peter, srscode, theronni, tomiak.marcin | ||||
| Version: | 4.3 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 479614 | ||||||
| Attachments: |
|
||||||
|
Description
Thomas Singer
Created attachment 235665 [details]
Screenshot of Eclipse in 192 DPI mode under Windows 7
I'd like to point out that this isn't OS X specific problem. I use my MacBook Pro Retina with Windows 7 and I run Eclipse on this platform in HiDPI mode i.e. I use native 2560x1600 resolution with 192 DPI (200% of standard). Visual experience is gorgeous. The text is extremely sharp and eyes are less trobuled by work. However there is a problem with icons under Eclipse. As you can see on the attached to this comment screenshot, every icon is 2x smaller than it should be and thus everything looks funny. If only icons were with proper size... I think there's a couple of ways Eclipse could provide support for this. One approach would be to extend SWT to support loading images from PDF and/or SVG. SWT would generate an appropriately detailed image given the device resolution. This doesn't seem to fit well in with the current Image/ImageData split though, since ImageData is not actually tied to a particular device. A different approach would be to instead add support to JFace's ImageDescriptor for checking for a high-resolution image based on the display device support. The ImageDescriptor could transparently look for a FILE@2x.EXT if the display is > 92dpi or something. The implementation's not so clean as there are many different ImageDescriptor implementations and they don't all pass through the device in their loading. Handling multiple resolutions is problematic though (what should happen with a 600DPI device?). I suppose we could make the media mapping pluggable. I suppose we could also look at something like the CSS image-set specifications too. http://dev.w3.org/csswg/css-images/#image-set-notation We could extend the Eclipse CSS support to allow overriding icons for particular commands, combined with media queries to select the appropriate icon. Unfortunately Apache Batik, the underlying CSS engine, only supports to CSS 2.1, and Batik seems to be dormant/dead. IIRC, the problem on OS X is that the graphics are scaled at double-size automatically, so the ratio of text to image is preserved. It would be sufficient to tell SWT not to scale, so our code could just provide quad-size images and they would be draw as-is. Yes you're right. On Mac icons are just awfuly blurry but in correct ratio. It is far better than what I'm observing on Windows with 192 DPI. Should there be separate bug for the issue which I presented? I don't agree with you. I'd prefer to have it look on OS X as on Windows, because then I could solve it myself by using larger icons. It is correct that in case which I presented you can do it yourself by using 2x larger icons. The problem is that I often plug in my MacBook to external monitor. If I used 2x larger icons I wouldn't be able to use the same Eclipse both on laptop and external monitor. This is obviously a huge drawback, because when you need to install a new plugin you have to do it on both eclipses (with regular icons and 2x icons). I think Marcin is right, Eclipse would benefit from a mechanism that allows it to adapt to different screen DPIs. In theory, for existing plugins icons could be upscaled automatically by Eclipse to fit the current screen's DPI; for future proofing the platform, it would make sense allowing for the developers to choose between vector graphics (hence automatically upscalable without loss of clarity) or multiple icons at different resolutions. I recently purchased a rMBP, installed Windows 8.1 Pro and can't work with such small icons. I had the impression that Windows APIs were already taking care of these issues... and I found this is not the case. (In reply to Nikos Tsarmpopoulos from comment #8) > I think Marcin is right, Eclipse would benefit from a mechanism that allows > it to adapt to different screen DPIs. I think, there are two layers involved, SWT and the using application, e.g. Eclipse. IMHO, for OS X SWT needs a way to NOT scale the images itself. > I recently purchased a rMBP, installed Windows 8.1 Pro and can't work with > such small icons. I had the impression that Windows APIs were already taking > care of these issues... and I found this is not the case. This can be handled by the SWT using application if and only if SWT provides a way to NOT scale images. Of course, it would be more elegant, if SWT could handle different-sized images or vector graphics automatically, but a) this would require SWT to NOT automatically scale and b) would be much more effort. SWT should not try to implement resolution-independent images itself, but it should reuse / offer APIs for what's already offered by the operating systems. Added dependency on bug 382972, but IMO, this bug should just be marked as a dup of that one. SWT apps looks really bad on retina. Any progress on the icon scaling issue? (In reply to open source from comment #11) > SWT apps looks really bad on retina. Any progress on the icon scaling issue? Well, Eclipse itself looks bad on OS X even without retina display. But this is at least caused by not using the shell's toolbar. Any progress made on this? It's been a while now and those icons are just painful to look at and I'm tired of using JetBrains products. This issue is being addressed for the 4.5 release via bugs 382972 and 421383. *** This bug has been marked as a duplicate of bug 382972 *** I reckon, when the user changes the resolution (e.g. from Full-HD to 960x540HiDPI) on OS X, images created with an appropriate ImageDataProvider will automatically use the zoom=200 level images. But is there a listener available that is triggered for such events, so other stuff like distances between controls are adapted correctly, too? |