Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355341 - [10.7] TabFolder doesn't look native (selected item's text not inverted)
Summary: [10.7] TabFolder doesn't look native (selected item's text not inverted)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.8   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 3.8 M6   Edit
Assignee: Lakshmi P Shanmugam CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 362309 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-22 03:15 EDT by Markus Keller CLA
Modified: 2012-02-24 08:52 EST (History)
5 users (show)

See Also:


Attachments
Screenshot (61.01 KB, image/png)
2011-08-22 03:15 EDT, Markus Keller CLA
no flags Details
patch (2.46 KB, patch)
2012-01-31 15:47 EST, Lakshmi P Shanmugam CLA
no flags Details | Diff
new patch (5.43 KB, patch)
2012-02-01 16:19 EST, Silenio Quarti CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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