vsch / idea-multimarkdown

Markdown language support for IntelliJ IDEA.
https://plugins.jetbrains.com/plugin/7896-markdown-navigator
Apache License 2.0
812 stars 129 forks source link

Changing preview background color (Bad readability with Darcula scheme) #875

Open tiagonuneslx opened 4 years ago

tiagonuneslx commented 4 years ago

The readability of the preview with the Darcula Scheme is bananas.

There should be a way to change the background color of the preview.

Or at least set it to white, that would solve my problem as well.

imagem

Thanks :+1:

polaire801 commented 4 years ago

Can I upvote? I use the Dracula theme (as opposed to Darcula) and it's even wilder.

Installed: 3.0.197.72

IntelliJ IDEA 2020.2 (Ultimate Edition) Build #IU-202.6397.94, built on July 27, 2020

draculaWithPreview

xtex404 commented 3 years ago

This is a big problem. I've found myself switching back to the markdown built into PyCharm just so I can see the preview properly. I'll probably end up unsubscribing to the pro version soon because this makes the plugin almost unusable. :(

vsch commented 3 years ago

The preview background can be forced to white or dark independent of the IDE setting by going to Stylesheet and selecting a fixed scheme. "Application UI" will follow the IDE UI selection. The default is light, Darcula is the dark scheme.

image

As for the white background of fenced code it appears to be a bug in the dark css. Can you let me know what preview browser are you using: JavaFX or Swing?

vsch commented 3 years ago

I tried both Swing and JavaFx with darcula and both seem to be working on 2020.2 with latest release 3.0.xxx.108.

Swing:

image

JavaFX or JCEF:

image

Q1: What version of the IDE and plugin are you using?

Q2: Do you have custom CSS text added in Stylesheet settings?

NoahAndrews commented 3 years ago

Thank you so much for looking into this.

In Android Studio 4.1 RC 2, with the just-updated plugin version (3.0.201.108), I get black text on a dark background regardless of whether I choose the Darcula stylesheet or the Default one. The only preview browser I have to choose from is Swing. I don't have any custom CSS specified.

vsch commented 3 years ago

What OS are you using?

I cannot duplicate this on OS X. Installed AS 4.1 RC 2 and tried it on a sample project with Darcula UI:

image

Can you please show me your Stylesheet settings just to confirm there is no customization.

vsch commented 3 years ago

If there is a way to change the runtime JRE for Android Studio then it may be possible to use a JRE with JavaFX which will allow JavaFX preview. The bundled JRE in AS does not have JavaFX.

JetBrains JRE and JDK for various versions are available for download: https://bintray.com/jetbrains/intellij-jbr

I use these regularly with other JetBrains IDEs but AS either ignores the studio.jdk file (Intellij has idea.jdk, PhpStorm has phpstorm.jdk, etc.). The file should contain a single to the full path of the JRE/JDK installation directory to use. Otherwise, bundled version is used.

I could have the config file name wrong if Google customized this option.

vsch commented 3 years ago

BTW, the above files are found in the same directory as the vmoptions and custom properties. On OS X they are under ~/Library/Application Support/Google/AndroidStudioPreview4.1 but trying to use an alternate JDK with JavaFX seems to be ignored.

NoahAndrews commented 3 years ago

I'm using Windows 10.

Stylesheet settings

image

Trying Jetbrains Runtime

Using the Choose Runtime plugin, I told Android Studio (installed with the Jetbrains Toolbox app) to use Jetbrains Runtime. As a side note, Android Studio has a much uglier title bar when using Jetbrains Runtime for some reason. It also keeps auto-closing after being open for only a couple of minutes, so this is very much not an actually useful workaround, at least for me.

When using Jetbrains Runtime, the Swing renderer looks the same as it did under the default JRE. However, it presented me with an option to use JavaFX. When I select that, it renders correctly (albeit with an ugly scrollbar).

So I had accidentally selected a preview version of Jetbrains Runtime. When I picked the latest version (11.0.8+10-b1094.1), the crashing, title bar, and Swing preview were fixed. The JavaFX scrollbar is still ugly though. I wonder why Android Studio doesn't use Jetbrains Runtime.

JavaFX with ugly scrollbar

image

NoahAndrews commented 3 years ago

Sadly, when I have multiple projects open, even the up-to-date Jetbrains Runtime is prone to crashing :(

Back to the default it is...

NoahAndrews commented 3 years ago

Well, now the Swing preview works with the default JRE. Huh.