pop-os / cosmic-text

Pure Rust multi-line text handling
https://pop-os.github.io/cosmic-text/cosmic_text/
Apache License 2.0
1.57k stars 100 forks source link

example editor-libcosmic light mode is black on almost-black #112

Closed WhyNotHugo closed 1 year ago

WhyNotHugo commented 1 year ago

Running the editor-libcosmic example, I get this:

image

I think it's rendering black on almost-black. Dark mode is fine though:

image

Aargonian commented 1 year ago

Can confirm that I get the same issue, running on macOS Ventura 13.3.1.

Edit: Removed unrelated code example

I can reproduce the above Issue with the editor-libcosmic example. Interestingly, I can comment out all the following lines in the text_box.rs file, except for creating the pixel_buffer, and everything renders perfectly fine (minus text of course).

https://github.com/pop-os/cosmic-text/blob/bfb5eefbfa869915e47824877af68a5307cf301c/examples/editor-libcosmic/src/text_box.rs#L240-L253

0HyperCube commented 1 year ago

The background is determined by syntect::highlighting::ThemeSet @Aargonian. We could update the theme to something like "base16-ocean.light" for light mode and keep the existing "base16-eighties.dark" for dark mode.