Open HighCommander4 opened 4 months ago
@postcoital-solitaire a clarifying question: when the client-side highlighting engine produces token styles other than a foreground color (for example, making lexical keywords bold), did you envision combining those styles with the foreground color (so the line will all be one color, but keywords will still be bold)? Or should the foreground color override all client-side token styles?
Did you envision combining those styles with the foreground color (so the line will all be one color, but keywords will still be bold)? Or should the foreground color override all client-side token styles?
Good question. Qt version looks fine for me, you can see that bold-ness and italic-ness is applied even in the inactive region. I don't really know how Qt Creator manages tokens, but it is able to understand some of them. I also don't know if clangd (which QTC uses) processes inactive regions at all, but if it does, it would also add some styles to the text (semantic tokens). The point is that QTC and VSC+clangd both allow some styles in the inactive region, so there's no difference in the presence of these styles itself.
In my opinion, the reason why QTC developers allowed these styles to still be visible is to provide at least some information about the inactive region, given that most of that information (which is usually color) is obscured. I tried unsetting the color of inactive region in QTC preferences and it's still one color, just the default one. Setting a bold style to inactive region doesn't change anything. So it must've been by design that they left the styles visible and not overridable.
So I think these styles should be left untouched. They are not distracting as the text is still one color, but they give some useful information about the inactive region code.
Also, will there be an option for foreground+background style? QTC allows that, and I myself like it, but I'm not sure if it's useful for a lot of people.
Also, will there be an option for foreground+background style? QTC allows that, and I myself like it, but I'm not sure if it's useful for a lot of people.
That can definitely be considered.
But now you're making me have second thoughts about whether a drop-down is the right setting type after all, vs. three independent checkboxes ("apply background color", "apply foreground color", "apply opacity").
Spinning this out from #643 where it was originally requested.
After making that change to use a dropdown to switch between using a background color for inactive regions and using opacity, we can then add a third option to use a foreground color. Based on the discussion in #643, this is an option that Qt Creator supports and it's what some users prefer.