Bug 507694 - Respect changes of dialog font
Summary: Respect changes of dialog font
Status: ASSIGNED
Alias: None
Product: Eclemma
Classification: Technology
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 minor
Target Milestone: ---   Edit
Assignee: Evgeny Mandrikov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-17 11:35 EST by Andreas Sewe CLA
Modified: 2017-05-29 18:13 EDT (History)
3 users (show)

See Also:


Attachments
Java > Code Coverage preference page (104.64 KB, image/png)
2016-11-17 11:35 EST, Andreas Sewe CLA
no flags Details
Package Explorer > Properties > Javadoc Location page (28.64 KB, image/png)
2017-01-27 09:08 EST, Evgeny Mandrikov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sewe CLA 2016-11-17 11:35:41 EST
Created attachment 265417 [details]
Java > Code Coverage preference page

Said preference page does not react to changes in dialog font size. See the attached screenshot.

FYI, it's probably enough to add a single Dialog.applyDialogFont to the end of createContents.
Comment 1 Marc R. Hoffmann CLA 2016-11-17 18:26:52 EST
Needs to be checked for all EclEmma dialogs.
Comment 2 Andreas Sewe CLA 2016-11-18 03:19:48 EST
(In reply to Marc R. Hoffmann from comment #1)
> Needs to be checked for all EclEmma dialogs.

Yes, the preference page was just the one I noticed this on first.

FYI, if you check this for other dialogs as well you should set the Banner Font, Title Font, and Text Font to something distinctive as well.
Comment 3 Evgeny Mandrikov CLA 2016-11-19 09:37:54 EST
(In reply to Andreas Sewe from comment #2)
> Title Font

Can't find in Neon.1a Release (4.6.1) Build id: 20161007-1200
guess it is "Header Font".
Comment 4 Evgeny Mandrikov CLA 2016-11-19 09:43:35 EST
(In reply to Marc R. Hoffmann from comment #1)
> Needs to be checked for all EclEmma dialogs.

FWIW to me seems that only merge dialog properly reacts on changes.
Comment 5 Evgeny Mandrikov CLA 2017-01-26 15:44:49 EST
(In reply to Andreas Sewe from comment #0)
> FYI, it's probably enough to add a single Dialog.applyDialogFont to the end
> of createContents.

Addition of Dialog.applyDialogFont works like a charm on Linux, but not on OS X and  additional changes lead to a very strange results - see https://github.com/eclipse/eclemma/pull/13

Andreas, maybe you saw this in past? and can give me a hint?
Comment 6 Andreas Sewe CLA 2017-01-27 03:03:12 EST
(In reply to Evgeny Mandrikov from comment #5)
> (In reply to Andreas Sewe from comment #0)
> > FYI, it's probably enough to add a single Dialog.applyDialogFont to the end
> > of createContents.
> 
> Addition of Dialog.applyDialogFont works like a charm on Linux, but not on
> OS X and  additional changes lead to a very strange results - see
> https://github.com/eclipse/eclemma/pull/13
> 
> Andreas, maybe you saw this in past? and can give me a hint?

I work mostly on OS X and haven't seen this problem with Dialog.applyDialogFont before. Here's what we (Code Recommenders) do in FieldEditorPreferencePages [1] and "normal" preference pages [2].

From looking at your CoveragePreferencePage [3], it looks like you should call invoke applyDialogFont on getControl, but that's just based on pattern matching.

But maybe that helps.

Andreas

[1] <https://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/tree/plugins/org.eclipse.recommenders.completion.rcp/src/org/eclipse/recommenders/internal/completion/rcp/CompletionsPreferencePage.java#n79>
[2] <https://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/tree/plugins/org.eclipse.recommenders.utils.rcp/src/org/eclipse/recommenders/utils/rcp/preferences/AbstractLinkContributionPage.java#n38>
[3] <https://github.com/eclipse/eclemma/pull/13/files#diff-3dbf76ef53b7fd99207d22f6de2a77dcR67>
Comment 7 Evgeny Mandrikov CLA 2017-01-27 08:29:46 EST
(In reply to Andreas Sewe from comment #6)

I reduced problem down to

  protected Control createContents(Composite parent) {
    // apparently presence of intermediate composite prevents StringFieldEditor
    // from getting default font on OS X
    Composite result = new Composite(parent, SWT.NONE);
    StringFieldEditor editor = new StringFieldEditor(
        UIPreferences.PREF_DEFAULT_SCOPE_FILTER,
        UIMessages.CoveragePreferencesClasspathFilter_label, result);
    addField(editor);
    Dialog.applyDialogFont(result);
    return result;
  }

what looks like a bug (?), as a workaround:

    result.setFont(parent.getFont());
Comment 8 Evgeny Mandrikov CLA 2017-01-27 09:08:52 EST
Created attachment 266491 [details]
Package Explorer > Properties > Javadoc Location page

And BW I suppose that Package Explorer > Properties > Javadoc Location page faces the same issue.
Comment 9 Andreas Sewe CLA 2017-01-27 09:30:37 EST
(In reply to Evgeny Mandrikov from comment #8)
> Created attachment 266491 [details]
> Package Explorer > Properties > Javadoc Location page
> 
> And BW I suppose that Package Explorer > Properties > Javadoc Location page
> faces the same issue.

Please open bugs with the platform team both about this and the more general issue you outlined in comment 7 (and please put me in Cc, as I would like to see how this plays out). Thank you.
Comment 10 Evgeny Mandrikov CLA 2017-01-27 10:10:24 EST
(In reply to Andreas Sewe from comment #9)
> Please open bugs with the platform team both about this and the more general
> issue you outlined in comment 7 (and please put me in Cc, as I would like to
> see how this plays out). Thank you.

Done - bug 511203 and bug 511206