Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345180

Summary: [preferences] Black background for icons in Annotations Preference Page
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: TextAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, deepakazad, markus.kell.r, nsand.dev, raksha.vasisht, ralf
Version: 3.6.2Flags: raksha.vasisht: review+
daniel_megert: review+
Target Milestone: 3.7 RC2   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Fix
none
Fix 2 daniel_megert: review+

Description Markus Keller CLA 2011-05-09 14:23:24 EDT
Created attachment 195121 [details]
Fix

Some icons on the Annotations preference page are shown with a black background on OS X, see bug 310387.

This patch doesn't solve the underlying SWT problem, but it solves the problem iff the icon size is 16x16 pixels.

Deepak, could you please review and test the fix on the Mac (Cocoa)?
Comment 1 Dani Megert CLA 2011-05-10 01:56:58 EDT
Looks good on Windows XP.
Comment 2 Deepak Azad CLA 2011-05-10 04:22:00 EDT
Looks good on Mac.
Comment 3 Markus Keller CLA 2011-05-10 05:45:23 EDT
Thanks to both reviewers, fixed in HEAD.
Comment 4 Markus Keller CLA 2011-05-10 05:47:31 EDT
.
Comment 5 Deepak Azad CLA 2011-05-16 02:40:14 EDT
Verified with I20110512-2000
Comment 6 Markus Keller CLA 2011-05-16 11:46:19 EDT
This fix caused bug 345910 on Windows 7. After consulting the testbed from
bug 310387 comment 9, I propose a better fix that
- avoids bug 310387 on Cocoa
- fixes bug 345972 on GTK for cases where no stretching is necessary (this was bad in 3.6 but fixed by the initial patch for this bug)
- fixes bug 345910 on Windows 7

Deepak and Dani, could you please review and test Fix 2?
Comment 7 Markus Keller CLA 2011-05-16 11:46:46 EDT
Created attachment 195746 [details]
Fix 2
Comment 8 Markus Keller CLA 2011-05-16 11:54:15 EDT
Code explanation for Fix 2:

The "Image image" must never be stored/disposed, since it comes from a global registry. fImageKeys collects newly created images, but since we don't need to create any image in this case, we don't have to store/register anything.
Comment 9 Dani Megert CLA 2011-05-17 04:24:21 EDT
+1 for RC2. Please replace the dots that your previous patch introduced with tabs.
Comment 10 Raksha Vasisht CLA 2011-05-17 05:45:34 EDT
+1 for RC2 (OK on win XP)
Comment 11 Markus Keller CLA 2011-05-17 05:54:36 EDT
Fixed in HEAD and removed the space characters (they probably appeared because I copied the proposed fix from Bugzilla).
Comment 12 Dani Megert CLA 2011-05-18 03:59:16 EDT
Verified with I20110517-0800 on Windows XP.
Comment 13 Dani Megert CLA 2011-05-18 04:34:28 EDT
Verified with I20110517-0800 on Windows 7.
Comment 14 Deepak Azad CLA 2011-05-19 01:52:29 EDT
Verified on Mac and Linux with I20110518-0800.