Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 210095 - [Forms] Forms API and font settings
Summary: [Forms] Forms API and font settings
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows 2000
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-16 08:45 EST by Remo Loetscher CLA
Modified: 2008-06-16 15:32 EDT (History)
4 users (show)

See Also:


Attachments
Dialog font support (28.60 KB, text/plain)
2007-12-19 07:12 EST, Remo Loetscher CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Remo Loetscher CLA 2007-11-16 08:45:54 EST
Using custom theme in eclipse which overwrites all fonts defined in JFaceResources has different effect on forms and formdialogs.
Creating a form using FormToolkit the font used for form elements (FormText, Section…) is not changed (only title gets the overwritten font settings).
Creating a similar form as a FormDialog, the overwritten font type for org.eclipse.jface.resource.JFaceResources.DIALOG_FONT is applied to most elements in the formdialog (except Section Header and ExpandableComposite title).
Is there a way to get the UI-Elements in _normal_ forms working with JFaceResources fonts (like formheader text does already)?
Comment 1 Dejan Glozic CLA 2007-11-16 09:30:59 EST
Fonts are not applied to Eclipse parts automatically. If you look at all the dialog implementation, you will see a line 'applyDialogFonts' or similar that uses JFaceResources to apply fonts to the dialog and override SWT defaults. You need to do the same in forms (except forms pick up JFaceResources header font for the title).
Comment 2 Remo Loetscher CLA 2007-11-20 02:19:43 EST
(In reply to comment #1)
FormDialog extends Dialog and uses _applyDialogFont_ from Dialog class where dialog font type from JFaceResources ist set to every composite child within the dialog. But Section and Expandable Header fonts are still SWT defaults. IMHO the different behaviour of Forms and FormDialog is confusing. A solution could be implementing an _applyDialogFont_ method in Form and ScrolledForm class.

Comment 3 Remo Loetscher CLA 2007-12-19 07:12:25 EST
Created attachment 85550 [details]
Dialog font support

Patched FormToolkit class for support of the dialog font from JFaceResources
Comment 4 Adam Archer CLA 2008-06-16 15:32:19 EDT
applyDialogFont comes from org.eclipse.jface.dialogs.Dialog, not from FormDialog. It does not make sense to have a method like this on Form or ScrolledForm as they are not dialogs and should not be using a dialog font.

We cannot change the default behaviour of the toolkit as it would change every clients default fonts and would likely break many existing layouts.

It should be very simple for you to make a set of methods to call toolkit.createBlah and then apply a JFace font and return the result. This cannot be addressed at the forms level.

Closing as WONTFIX.