Changing the background color/image of a specific editor

Answered

I am building a plugin to help me do more engaging live presentations.

1) I want to set the background image of a specific editor. Is there any way to do that? I know about setting a background image for the entire IJ, but I am interested in only a single editor.

Also,

2): is there an easy way to set the global IJ background to an image contained in the plugin? I'm unable to do that, as the urlOrFile variable bellow is either tried to be parsed as a File (not my case, as my image is withing the jar of my plugin) or an URL expected to contain "://" - not my case as my URL would look like file:jar:/c:/workspace....

 

val prop = PropertiesComponent.getInstance()
prop.setValue(IdeBackgroundUtil.EDITOR_PROP, urlOrFile);

Thank you!

1 comment
Comment actions Permalink

(1) AFAIU this is not possible

(2) according to com.intellij.openapi.wm.impl.PaintersHelper.MyImagePainter#loadImageAsync, it might be possible to extract and copy the image resource bundled in your plugin to PathManager.getConfigDir() directory and specify relative path.

0

Please sign in to leave a comment.