The Hover feature uses a fixed font size that is not configurable, and doesn't scale with the editor font size.
Goals
Make the Hover display text which appears similar to the rest of the UI, such as completions and action menus.
Approach
I used the UiUtil class (already used here to get the dark/light mode) to instead get the label font and generate corresponding HTML styles. Below is a demonstration of Darcula and IntelliJ Light themes:
This is an example with .AppleSystemUIFont size 18. I can't figure out what the original font or size was prior to this change, as it wasn't configurable.
User stories
A user that needs to change their font or increase their font size for accessibility will see their font size reflected in the hover similar to how it appears in the rest of the IntelliJ UI.
Release note
Documentation hover now uses the global editor font style
Purpose
The Hover feature uses a fixed font size that is not configurable, and doesn't scale with the editor font size.
Goals
Make the Hover display text which appears similar to the rest of the UI, such as completions and action menus.
Approach
I used the
UiUtil
class (already used here to get the dark/light mode) to instead get the label font and generate corresponding HTML styles. Below is a demonstration of Darcula and IntelliJ Light themes:This is an example with
.AppleSystemUIFont
size 18. I can't figure out what the original font or size was prior to this change, as it wasn't configurable.User stories
A user that needs to change their font or increase their font size for accessibility will see their font size reflected in the hover similar to how it appears in the rest of the IntelliJ UI.
Release note
Documentation hover now uses the global editor font style
Automation tests
Security checks
Test environment
OpenJDK 17, arm64 mac Ventura