Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322964 - Wrong font used for buttons
Summary: Wrong font used for buttons
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-17 18:43 EDT by Scott Kovatch CLA
Modified: 2010-08-30 18:58 EDT (History)
0 users

See Also:


Attachments
Fix (5.59 KB, patch)
2010-08-17 18:58 EDT, Scott Kovatch CLA
no flags Details | Diff
reworked patch (6.02 KB, patch)
2010-08-17 20:01 EDT, Scott Kovatch CLA
no flags Details | Diff

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