Community
Participate
Working Groups
The Commit Message field in the Git Staging view is using the Text Font. When this font gets changed by the user, clients should update to the new font. This is an old problem that will become more apparent with bug 476037 in Neon M4, e.g. with these steps: - start up in a way that the Git Staging view is not visible - increase the font size (Ctrl++) - open Git Staging view - decrease the font size (Ctrl+-) => Git Staging view keeps the big font
New Gerrit change created: https://git.eclipse.org/r/100738
(In reply to Eclipse Genie from comment #1) > New Gerrit change created: https://git.eclipse.org/r/100738 This will work properly with those shortcuts only if: * EGit views use the default JFace TEXT_FONT, i.e., the theme-specific fonts for the commit message in the staging view and the commit message viewer in the history view are not overridden (they default to TEXT_FONT). * There is an active text editor, and it uses TEXT_FONT The zoom commands (on Mac with the shortcuts Cmd-= and Cmd--, and NumPad-Minus doesn't work whereas NumPad-= does and is actually for me the only way to trigger this, since Cmd-Shift-0 (on my keyboard, "=" is Shift-0) doesn't work) are available under <Global menu>->Window->Editor, but only when a text editor is active. If there is no active text editor, the implementation of https://git.eclipse.org/r/#/c/50042/31/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextZoomHandler.java won't do anything. If there is, it will only zoom the font (family) used by that editor. The shortcuts are not available when e.g. the staging view is active, and the command wouldn't do anything anyway. If the TEXT_FONT is changed via <Preferences>->General->Appearance->Colors & Fonts, "Basic->Text Font" or "Git->Commit Message Font" or "Git->Commit Message Editor Font", then the views will react properly. The Gerrit change also adds reacting to color preference changes (font & selection foreground/background).
The root issue is bug 483921. There is currently no way in Platform to know which FontDefinition (part of the Theme FontRegistry) a view or whatever StyledText is using to decide which font to modify on Ctrl+/-. The only known workaround is to have EGit providing a specific handler for the zoomIn/Out commands, that reuse or mimic the AbstractTextZoomHandler and provide the right font definition to modify, using EGit specific code.
(In reply to Mickael Istria from comment #3) > The root issue is bug 483921. There is currently no way in Platform to know Thanks for the pointer! > which FontDefinition (part of the Theme FontRegistry) a view or whatever > StyledText is using to decide which font to modify on Ctrl+/-. > The only known workaround is to have EGit providing a specific handler for > the zoomIn/Out commands, that reuse or mimic the AbstractTextZoomHandler and > provide the right font definition to modify, using EGit specific code. I don't think we'll do that. Too much work-around for too little benefit just to have those shortcuts. The original bug report asked for reacting on preference changes, which is what this Gerrit change implements, and in the default setting, zooming in in an editor will also zoom the EGit viewers (since everything is based by default on the JFace TEXT_FONT).
Gerrit change https://git.eclipse.org/r/100738 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=78a317337d5e35174255b9166ccab32f40e5b692