[PATCH] JMC-6180: Changing the Java source editor font changes the size of some values in the JMC tables
ebaron at redhat.com
Tue Dec 4 00:24:05 UTC 2018
This patch fixes an issue where font sizes vary between columns of
certain trees and tables, when the user changes the editor font size.
This happens for columns that use the JFace text font, which is also
used for text editors in Eclipse. The text font is used as a visual hint
for columns that may contain editable values. Other columns use the
JFace default font, which derives from the native system default.
This simple fix creates a separate font, derived from the JFace text
font, that sets its height to that of the default font. This ensures
tree/table columns have consistent font sizes, while also retaining the
text font face as an indicator for modifiable fields. The font is added
to the shared JFace FontRegistry, and is disposed of along with the Display.
I have included a new UI test case to verify that our modified font is
used for the LabelProvider that was previously using the JFace text font.
While I made progress towards some of the other goals mentioned in the
bug, such as allowing all text in JMC to have its size adjusted using
keyboard shortcuts, we decided to defer such a far-reaching change to a
later date . Perhaps we could create another bug for such a feature.
How does the attached patch look?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10355 bytes
Desc: not available
More information about the jmc-dev