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

Bug 322964

Summary: Wrong font used for buttons
Product: [Eclipse Project] Platform Reporter: Scott Kovatch <skovatch>
Component: SWTAssignee: Scott Kovatch <skovatch>
Status: RESOLVED FIXED QA Contact: Silenio Quarti <Silenio_Quarti>
Severity: normal    
Priority: P3    
Version: 3.7   
Target Milestone: 3.7 M2   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Fix
none
reworked patch none

Description Scott Kovatch CLA 2010-08-17 18:43:27 EDT
Buttons are not picking up the correct default font. This can be seen by comparing the font of a normal sized button in ControlExample against a button with the same text in another Cocoa application. Specifically, it looks like it's about 1 pixel too small.

To reproduce:

1. Launch Safari
2. Choose Preferences, then select the Appearance tab. Note the appearance of the Select... button.
3. Launch ControlExample
4. Use the 'Set/Get API" button to change the text of the buttons to "Select...".
5. Compare the buttons in Control Example to the button Safari. The text in SWT buttons is one pixel smaller than standard buttons. It's just enough of a difference that you notice something isn't quite right.
Comment 1 Scott Kovatch CLA 2010-08-17 18:58:28 EDT
Created attachment 176850 [details]
Fix

Use systemFontSizeForControlSize with the current control size instead of the default button font, which isn't right.
Comment 2 Scott Kovatch CLA 2010-08-17 20:01:26 EDT
Created attachment 176853 [details]
reworked patch

Better patch.
Comment 3 Scott Kovatch CLA 2010-08-17 20:03:02 EDT
(In reply to comment #2)
> Better patch.

Actually, it's the same patch. I thought I saw a regression but did not.
Comment 4 Scott Kovatch CLA 2010-08-30 18:58:11 EDT
Fixed > 20100830.