Community
Participate
Working Groups
Created attachment 198864 [details] Scaling problem of the TrayItem on Mac 10.6.x On my cross-platform SWT Java application, I'm using TrayItem's setImages() function to set the dock and status bar icon. The icon is a 128x128 transparent PNG. The status and tray icons are appropriately clipped on both Windows and Linux distributions, but on the Mac I have problems that make the status bar icon appear with strange padding on both sides like attachment 1 [details]. It's strange to me that this is working on all other platforms but the Mac. For instance, on my Linux and Windows 7 boxes, this does not occur. I believe the issue lies in widgets/TrayIcon.java in the setImage function. There the code calls item.setLength to the width of the image + the border. I believe this is what is causing the extra padding to show up. This only happens on the Mac because (I think) Windows and Linux automatically crop to a square icon which Mac does not.
Created attachment 199412 [details] patch The trayitem is created as a square and the image is scaled accordingly. Silenio, can you please review?
Is there any way I could get an ETA for QA on the proposed patch? Thank you!
Patch is good. Please remove BORDER static var before releasing.
Thank you very much for taking care of this so promptly! Is there any chance to resolve the same problem in carbon?
(In reply to comment #4) > Is there any chance to > resolve the same problem in carbon? No, sorry! Carbon is not a supported platform in Eclipse now (since 3.7).
(In reply to comment #5) > (In reply to comment #4) > > Is there any chance to > > resolve the same problem in carbon? > No, sorry! Carbon is not a supported platform in Eclipse now (since 3.7). No problem, I figured it was a long shot. Thanks again for being so responsive to this issue!
Thanks Silenio! Fixed in 3.8 HEAD. http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=5e8d594fe029072e912e0bfb886e42a17cb362bc
Verified in I20110912-2126
*** Bug 350332 has been marked as a duplicate of this bug. ***