Bug 564099 - AbstractTextZoomHandler inconsistently updates fonts based on user overrides
Summary: AbstractTextZoomHandler inconsistently updates fonts based on user overrides
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.17   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.17 M1   Edit
Assignee: John Taylor CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 532359
  Show dependency tree
 
Reported: 2020-06-08 15:45 EDT by John Taylor CLA
Modified: 2020-06-09 15:20 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Taylor CLA 2020-06-08 15:45:20 EDT
The behavior of AbstractTextZoomHandler is a bit odd. As an example:

Zooming a Java editor by default results in the Git commit message and the console (along with 14 other items in my current Eclipse instance) also zooming in, even though these things are tangentially related at best. Additionally, if one overrides the Java editor font setting, and then zooms, only the Java editor and the Java compare view will update, and one might be surprised, having observed the previous behavior, to find that nothing else has updated.

I realize that there is no way to use the font registry as it exists today to truly define what should and should not be modified, so, as it is, I propose that the behavior described above without overriding any fonts should be the behavior all the time. In other words, if one zooms a window somehow related to "Text Font", then all other fonts related to "Text Font" should zoom, regardless of any user overrides.
Comment 1 Mickael Istria CLA 2020-06-08 15:59:02 EDT
So do I get it right that with your proposal, zooming on the Java Editor would change the font size of all the editors using "textfont" as ancestor, and set it to the same value of what's set for the Java Editor independently of whether it was overriden or not? So if user has set Git commit font to 15, Java Editor is at 11, and user hits Ctrl+, then both Git Commit and Java font will be 13?
(I need a confirmation that I understand things correctly, it's not really meant to emphasize a problem, or at least not a problem that's worse than the current possible ones)
Comment 2 Eclipse Genie CLA 2020-06-08 16:16:53 EDT
New Gerrit change created: https://git.eclipse.org/r/164472
Comment 3 John Taylor CLA 2020-06-08 16:22:20 EDT
The proposed code adds the same offset to the size of each font, rather than overwriting the entire definition. In particular, in the context of Bug 532359, I chose to have Java Editor Text as Consolas 10 and Code Minings Text as Segoe UI Italic 9. After pressing CTRL++, Java Editor Text becomes Consolas 12 and Code Minings Text becomes Segoe UI Italic 11. Repeat for all "Text Font" defaulted fonts as well.
Comment 4 Mickael Istria CLA 2020-06-08 16:36:53 EDT
(In reply to John Taylor from comment #3)
> The proposed code adds the same offset to the size of each font, rather than
> overwriting the entire definition. In particular, in the context of Bug
> 532359, I chose to have Java Editor Text as Consolas 10 and Code Minings
> Text as Segoe UI Italic 9. After pressing CTRL++, Java Editor Text becomes
> Consolas 12 and Code Minings Text becomes Segoe UI Italic 11. Repeat for all
> "Text Font" defaulted fonts as well.

OK, that sounds even better.
Comment 6 Mickael Istria CLA 2020-06-09 15:20:13 EDT
Thanks John!