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

Running ReText with Adwaita Dark Theme #492

Closed
Lonerider2010 opened this issue Feb 9, 2020 · 9 comments
Closed

Running ReText with Adwaita Dark Theme #492

Lonerider2010 opened this issue Feb 9, 2020 · 9 comments

Comments

@Lonerider2010
Copy link

When running ReText with adwaita dark theme, the current line has a yellow background, where the text is shown in white, so it is not readable. My environment: Raspbian Buster with XFCE, adwaita-qt and qt5ct installed.

@mitya57
Copy link
Member

mitya57 commented Mar 8, 2020

Sorry for the late reply.

In the configuration file, we have a section that allows you to tweak colors as you want. I suggest you to set currentLineHighlight to something dark.

Please see https://github.com/retext-project/retext/blob/master/configuration.md#color-scheme-setting for the documentation.

I am keeping this bug open because having a default dark configuration is a valid feature request. If you manage to write one, please share it :)

@Moini
Copy link

Moini commented Feb 24, 2021

I find the white-on-white text in the preview pane even more problematic. Worked around by using the web renderer.

@mitya57
Copy link
Member

mitya57 commented Feb 28, 2021

@Moini Are you using reStructuredText? I am asking because with Markdown Adwaita-Dark seems to work perfectly:

Screenshot

Anyway, for reStructuredText using WebKit or WebEngine renderer is a good idea. Glad to hear that it fixed the issue. If there are remaining issues please let me know.

@Moini
Copy link

Moini commented Feb 28, 2021

Yes, I was using reST.

Well, 'fixed' is maybe the wrong word for it... I'd call it a workaround, unless you intend to scrap the default mode and replace it by the web renderer - in that case, it's of course not necessary that it works in default mode, too.

mitya57 added a commit to retext-project/pymarkups that referenced this issue Mar 2, 2021
plain.css hardcodes background color which causes bad contrast when
using ReText with dark UI themes.

See retext-project/retext#492.
@mitya57
Copy link
Member

mitya57 commented Mar 2, 2021

@Moini The linked commit in pymarkups should make reStructuredText rendering better for both WebKit and non-WebKit renderers.

Maybe you can test pymarkups from master before I make a new release?

mitya57 added a commit that referenced this issue Mar 2, 2021
- Enable it for Qt WebEngine too.
- Include style for background color and links.
- Disable it for export to HTML (webenv == True).

See #255 and #492 for discussion related to dark themes.
@Moini
Copy link

Moini commented Mar 2, 2021

Mmh - I just downloaded the zip file from here: https://github.com/retext-project/retext/archive/master.zip, unpacked it into my /tmp folder, ran python3 retext.py, and removed the check mark from the web renderer box.

Using the example text from here: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html

it looks like this:

2021-03-02_20-57

Edit: Theme is Mint-Y-Dark .

@mitya57
Copy link
Member

mitya57 commented Mar 3, 2021

@Moini Please try this command:

pip3 install --user --upgrade https://github.com/retext-project/pymarkups/archive/master.tar.gz

The fix I applied was not in ReText itself, but in pymarkups — the helper library used by ReText. You updated ReText itself, so you did not get the fix.

But if you try master versions of both ReText and pymarkups, you should get an even better experience: ReText commit 5343c00 improves the color of links in dark themes.

I am going to make new releases of both pymarkups and ReText soon, and any feedback is welcome: if there are remaining bugs related to dark theme, I may fix them too.

@mitya57
Copy link
Member

mitya57 commented Mar 6, 2021

I have released new versions of both pymarkups and ReText now. You can upgrade e.g. by using this command:

pip3 install --user --upgrade Markups ReText

These releases should solve most issues related to dark themes. As a bonus, synchronized support will now work for reStructuredText.

@mitya57 mitya57 closed this as completed Mar 6, 2021
@Moini
Copy link

Moini commented Mar 9, 2021

Yes! Thank you, this looks correct (legible) now:

2021-03-09_14-04

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