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

Precedence of background colors in Scintilla styles #448

Open
ProgerXP opened this issue Nov 9, 2022 · 0 comments
Open

Precedence of background colors in Scintilla styles #448

ProgerXP opened this issue Nov 9, 2022 · 0 comments

Comments

@ProgerXP
Copy link
Owner

ProgerXP commented Nov 9, 2022

From what I know, Scintilla 3.x has two kinds of background colors: non-transparent solid color under text and semi-transparent color fill above text. Notepad2 is using the second approach but it leads to poor contrast - for example, gray fill over selected text (black) so that not only selection's background becomes non-white but the text itself becomes non-black.

Luckily, Notepad2 allows using the first approach (non-transparent color under text) by simply removing alpha:N from the style's settings. However, if you remove it from Selected Text or Current Line Background and put selection or caret over a region like /regexp/ (that has its own non-alpha background in JS scheme) you will see that selection's/line's background entirely replaces the regexp's.

Is there a way to specify precedence for styles? So that Current Line Background can't overlay more specific styles (like that of regexp). Notepad++ handles this well even though it doesn't even permit transparency in style colors but is using background a lot:

<script>
var x
var [y]
  • lines 2-3 have slightly bluish background ("JavaScript embedded")
  • line 3 (with the caret and selection) has more bluish background ("Current line background")
  • y has further different background ("Selected text color")

Can we do the same?


On a related note, why removing alpha from Current Line Background causes Matching Braces to be drawn on white background whilst that style has no back setting?

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

1 participant