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

Code block font color is broken in the dark theme #830

Closed
z3ntu opened this Issue Jan 12, 2018 · 21 comments

Comments

Projects
None yet
2 participants
@z3ntu

z3ntu commented Jan 12, 2018

Expected behaviour

The text

``​`
some code
``​`

should display correctly.

Actual behaviour

image
when highlighted:
image

Steps to reproduce

Create a code block and check the note preview while using the Breeze Dark Qt theme.

Output from the debug section in the settings dialog

https://pastebin.com/SNJ1qyB4

Relevant log output (you have to enable enable the log widget)

Not applicable

Version

18.01.2

@pbek

This comment has been minimized.

Owner

pbek commented Jan 12, 2018

I can't reproduce that, can you please post the output from the debug section in the settings dialog.

@z3ntu

This comment has been minimized.

z3ntu commented Jan 12, 2018

@pbek pbek added the question label Jan 12, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Jan 12, 2018

darkMode: false
darkModeColors: false

Are you sure you have dark mode turned on?

@pbek

This comment has been minimized.

Owner

pbek commented Jan 12, 2018

Please take a closer look at the Interface settings ;)

@z3ntu

This comment has been minimized.

z3ntu commented Jan 12, 2018

image
Color schema is dark 😉 (yes, I saw the "Enable dark mode" checkbox)
And as my Qt theme already makes everything (except code blocks) dark, I never saw a need to explore the settings to find a toggle to activate a dark theme :)

@pbek

This comment has been minimized.

Owner

pbek commented Jan 12, 2018

Glad you found the checkbox. ;)

@pbek pbek closed this Jan 12, 2018

@z3ntu

This comment has been minimized.

z3ntu commented Jan 12, 2018

But it doesn't really make sense that the codeblocks are non-readable in this configuration. Shouldn't the color from the selected Color schema be used?

@pbek

This comment has been minimized.

Owner

pbek commented Jan 12, 2018

The schema you selected in above screenshot is for the editor, not the preview... QOwnNotes doesn't know how your operating system will colorize your other backgrounds unless you tell QOwnNotes to use "dark mode" colors...

@z3ntu

This comment has been minimized.

z3ntu commented Jan 12, 2018

Okay sorry but dark mode looks horrible with Breeze Dark whereas in "normal mode" the interface looks like normal Qt elements styled with Breeze Dark.
And if the font color of the codeblock is from my Qt theme, shouldn't it be possible that the background color also comes from the Qt theme instead of a predefined color?

@pbek

This comment has been minimized.

Owner

pbek commented Jan 12, 2018

There are no themes for the preview but you can create your own theme with the help of a script.
The simple way is to just enable the "preview dark mode" (2nd checkbox)...

@z3ntu

This comment has been minimized.

z3ntu commented Jan 12, 2018

I meant that the preview window takes the colors from the Qt theme as seen here:
image

but for some reason (apparently) qownnotes specifies a white background for the code blocks which shouldn't be the case as that color should be taken from the Qt theme.

@pbek

This comment has been minimized.

Owner

pbek commented Jan 13, 2018

Initially there was no dark mode support in QOwnNotes, but there was a background color for code-blocks (because there is none by default). I will just also set a foreground-color, then code-blocks will at least be visible in all circumstances... How would that sound to you?

@pbek

This comment has been minimized.

Owner

pbek commented Jan 13, 2018

18.01.3

  • there now also is set a foreground color for code-blocks and inline-code in the
    preview so the code will be visible if the user uses a dark desktop theme but
    doesn't use the dark-mode preview colors yet

@pbek pbek added this to the 18.01.3 milestone Jan 13, 2018

@z3ntu

This comment has been minimized.

z3ntu commented Jan 13, 2018

Thanks, that fixed it! :)
image

@pbek

This comment has been minimized.

Owner

pbek commented Jan 13, 2018

great, I'll make a release in the next hour ;)

@z3ntu

This comment has been minimized.

z3ntu commented Jan 13, 2018

No stress, I've patched it locally for now :)

@pbek

This comment has been minimized.

Owner

pbek commented Jan 13, 2018

I had to fix some other things too. ;)
There now is a new release, could you please test it and report if it works for you?

@z3ntu

This comment has been minimized.

z3ntu commented Jan 13, 2018

Yes, 18.01.3 works great. Thanks for fixing it!

@pbek

This comment has been minimized.

Owner

pbek commented Jan 13, 2018

👍

@z3ntu

This comment has been minimized.

z3ntu commented Jan 22, 2018

I found another small issue where in the Ctrl+F textbox (when text is in there) the background color is set to light green or light red but the font color is default white on Breeze Dark. 🙂 Other than that the application is pretty great.

@pbek

This comment has been minimized.

Owner

pbek commented Jan 22, 2018

I'm not sure if setting a specific background color will do more harm than good in this case because that would be the only input box with an other color... that's what the dark mode was for...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment