eclemma icon indicating copy to clipboard operation
eclemma copied to clipboard

Respect changes of dialog font

Open Godin opened this issue 8 years ago • 11 comments

Godin avatar Jan 22 '17 17:01 Godin

@marchof could you please review?

Godin avatar Jan 24 '17 08:01 Godin

@Godin Looks like not all labels in the settings dialog adopt the dialog font:

settings

marchof avatar Jan 25 '17 17:01 marchof

@Godin I remember that I had similar problems to capture all font occurrences.

Same issue for the select buttons in the coverage dialog:

coverage

marchof avatar Jan 25 '17 21:01 marchof

@Godin The session name on our properties page:

properties

marchof avatar Jan 25 '17 21:01 marchof

@Godin The other dialogs (import, export, merge, select) look good to me though!

marchof avatar Jan 25 '17 21:01 marchof

@marchof that's strange - I not just added automated tests, but also tested manually by changing font size significantly, however only on Linux, not on Mac.

But never mind - I'll retest/rework. Good catches, thanks!

Godin avatar Jan 25 '17 21:01 Godin

@marchof this starts to be interesting :laughing:

Manual test on Linux using Eclipse Platform (Version: Oxygen (4.7) Build id: I20160915-0230):

preferencepage

launchingtab

propertypage

Will try Mac later...

Godin avatar Jan 26 '17 00:01 Godin

Even simply execution of automated UI test confirms problem on Mac.

Godin avatar Jan 26 '17 18:01 Godin

According to JavaDoc of Dialog.applyDialogFont

Applies the dialog font to all controls that currently have the default font. Font will also be applied to its children.

so the call is placed correctly at the end.

What driving me crazy - removal of

@@ -138,7 +138,6 @@ public class CoveragePreferencePage extends FieldEditorPreferencePage
   private Group createGroup(final Composite parent, final String text) {
     final Group group = new Group(parent, SWT.NONE);
     group.setText(text);
-    group.setFont(parent.getFont());
     GridDataFactory.fillDefaults().applyTo(group);
     group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
     return group;

assuming that this is the place that changes value from default, leads to a really strange result:

before_png__423x564__and_after_png__419x532_

Godin avatar Jan 26 '17 20:01 Godin

@Godin How should we proceed here? Do we apply a "best effort" fix and hope the platform will fix the problem for Mac?

marchof avatar Feb 02 '17 14:02 marchof

@marchof I still plan to make it work properly on OS X.

Godin avatar Feb 02 '17 15:02 Godin