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

Bug 329576

Summary: Toolbar buttons highlight background on Cocoa
Product: [Eclipse Project] Platform Reporter: Bogdan Gheorghe <gheorghe>
Component: SWTAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Mike_Wilson, skovatch
Version: 3.7   
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
patch none

Description Bogdan Gheorghe CLA 2010-11-05 14:18:23 EDT
In 3.x and 4.1, pressing a toolbar button on Cocoa will cause the button image to darken and the entire button to highlight which is rather jarring. This should be changed to only have the image on the button darken.
Comment 1 Scott Kovatch CLA 2010-11-05 14:23:18 EDT
I had fixed this in the NSToolbar case. We just need cell.setHighlightsBy(OS.NSContentsCellMask) to always be set, not just when we are using the unified toolbar.
Comment 2 Silenio Quarti CLA 2010-11-05 14:33:59 EDT
yes, I am about to make this change, but I want to check what happens when the there is no image.
Comment 3 Silenio Quarti CLA 2010-11-05 14:48:31 EDT
If we turn off the background highlight all the time, toolitems that only have text (no image) will have no indication that they are pushed in.
Comment 4 Scott Kovatch CLA 2010-11-05 15:06:07 EDT
Carbon does the same thing right now.

If you remove the "parent.nsToolbar != null" check in drawTitleWithFrameInView the text will highlight when you click on it.
Comment 5 Silenio Quarti CLA 2010-11-05 15:37:16 EDT
Created attachment 182519 [details]
patch

I am releasing this patch which makes the background not highlight anymore (only the image gets darken). When there is no image the text gets highlighted the same way it is done for the window toolbar. I am not sure this is how other apps handle this case, but I could not find any example.
Comment 6 Silenio Quarti CLA 2010-11-05 15:40:56 EDT
Fixed > 20101105
Comment 7 Scott Kovatch CLA 2010-12-07 17:29:21 EST
*** Bug 258182 has been marked as a duplicate of this bug. ***