Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using tooltip's font instead of editor's font #23

Closed
lppedd opened this issue Aug 7, 2024 · 6 comments
Closed

Allow using tooltip's font instead of editor's font #23

lppedd opened this issue Aug 7, 2024 · 6 comments
Assignees

Comments

@lppedd
Copy link

lppedd commented Aug 7, 2024

Sometimes using the monospaced editor's font means longer messages, up to being impossible to read.
Using the tooltip's font will result in more compact inlays.

@judison
Copy link

judison commented Aug 11, 2024

The monospaced font made it somewhat indistinguishable from the code.
I think user Ippedd means the visual like "usages" one in this screen:
image
I'm not sure, but..., a little bit smaller, maybe?

Another great thing would be make it clickable, opening the context actions on the error/warn message

@chylex
Copy link
Owner

chylex commented Aug 11, 2024

The problem I have is that the UI font ends up vertically misaligned, which is ugly and distracting, and it looks like too much work to fix just for Inspection Lens inlays. There is no way to customize just the inlay font either. I think I'd rather report this to JB to improve first.

@chylex
Copy link
Owner

chylex commented Aug 12, 2024

Another great thing would be make it clickable, opening the context actions on the error/warn message

I looked into this a while back with no luck, but I tried again and I have a prototype, but it needs access to private IntelliJ APIs.

@lppedd
Copy link
Author

lppedd commented Aug 12, 2024

@chylex if it can reassure you, I've been using internal APIs for some hacks in my plugins since 2019, with minor adjustments during the years.

Regarding the tooltip font, as far as I know the vertical alignment on the editor's line is done automatically in recent releases. Worth a try imo.

@chylex
Copy link
Owner

chylex commented Aug 12, 2024

The APIs I'm talking about are not internal, they are private.

The text baseline is aligned between the editor and inlay, but only because Inspection Lens already shifts it by one pixel. This is how it would look with UI font without any baseline adjustment:

image

Another issue is that the inlay font is always 1 size smaller. Depending on which fonts you use, that can range from ugly to unreadable; in Rider specifically, Code Vision inlays are so bad I opened an issue specifically for that.

@chylex
Copy link
Owner

chylex commented Aug 12, 2024

With the baseline adjustment, the UI font doesn't look half-bad, but that's just on one computer with Windows fonts. I've seen rendering get wonky on high DPI monitors, especially Mac OS with Retina screens, and needed ugly workarounds for that in another project.

@chylex chylex closed this as completed in 624254f Dec 23, 2024
@chylex chylex self-assigned this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants