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

Bug 355341

Summary: [10.7] TabFolder doesn't look native (selected item's text not inverted)
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: SWTAssignee: Lakshmi P Shanmugam <lshanmug>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, fabian.zeindl, justin, lshanmug, Silenio_Quarti
Version: 3.8   
Target Milestone: 3.8 M6   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Screenshot
none
patch
none
new patch none

Description Markus Keller CLA 2011-08-22 03:15:18 EDT
Created attachment 201891 [details]
Screenshot

I20110816-0800

On 10.7, TabFolder doesn't look native: Selected tab item's text is not inverted.
Comment 1 Lakshmi P Shanmugam CLA 2011-10-31 04:08:59 EDT
*** Bug 362309 has been marked as a duplicate of this bug. ***
Comment 2 Lakshmi P Shanmugam CLA 2012-01-31 15:47:33 EST
Created attachment 210334 [details]
patch

The selected tab's text color doesn't change because we are drawing the TabItem's text. The patch tries to set the color of the selected tab's text as and when required.
Silenio, can you please review the patch?
Comment 3 Silenio Quarti CLA 2012-02-01 16:19:25 EST
Created attachment 210404 [details]
new patch

I do not think we need to be concerned about recreating the whole NSAttributedString when the selected item changes. The performance degradation will not be noticeable because of that.

Please try this patch. It does not require the instance var flag and it also does not need to create a mutable copy of the attributed string.
Comment 4 Silenio Quarti CLA 2012-02-23 11:04:33 EST
Lakshmi, did you have a change to try the patch?
Comment 5 Lakshmi P Shanmugam CLA 2012-02-24 08:52:54 EST
I tested the patch and it works well. Thanks Silenio!
Fixed in master --> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=ffbb45ebcfe4cf4170e71894082281c96df7160f