How can I be notified when a user has changed the font size?
Answered
Hi I'm developing a jetbrains plugin. How can I be notified when a user has changed the font size? Which listener should I use? Thanks for any help!
Please sign in to leave a comment.
What font are you referring to? Editor Font? UI Font?
Thank you for fast reply!
Yes,the Edior Font
I asked gpt4 it says there is no listener to use, and it suggests to use a timertask check the font size every second…
Not sure what problem you want to solve here.
You can attach listener to each
Editor
instancecom.intellij.openapi.editor.ex.EditorEx#addPropertyChangeListener(java.beans.PropertyChangeListener, com.intellij.openapi.Disposable)
and react to property change for
com.intellij.openapi.editor.ex.EditorEx#PROP_FONT_SIZE