Bug 173695 - level-0 background color for codefolding marks column is strange/bad
Summary: level-0 background color for codefolding marks column is strange/bad
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-27 19:44 UTC by Jean-Philippe Fleury
Modified: 2009-01-09 23:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Background colors in Kate (33.57 KB, image/png)
2008-10-27 19:50 UTC, Jean-Philippe Fleury
Details
Background colors in Kate (26.51 KB, image/png)
2008-10-28 01:57 UTC, Jean-Philippe Fleury
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Philippe Fleury 2008-10-27 19:44:50 UTC
Version:            (using KDE 4.1.2)
Installed from:    Ubuntu Packages

When we activate codefolding marks, a "column" is inserted between left border and text area.

This codefolding marks column has the same background color as the text area background, so it's a bit confusing because it creates a tab-like between left border and text area.

It would be great if we could choose the color of codefolding marks column. For example, it would be the same as left border background.

I will attach image to illustre it.
Comment 1 Jean-Philippe Fleury 2008-10-27 19:50:32 UTC
Created attachment 28185 [details]
Background colors in Kate

In this example code, we see that lines 1-9, 17, 18 and 22 have blank background color for their codefolding marks column. It's confusing with tabs.
Comment 2 Matthew Woehlke 2008-10-28 01:26:23 UTC
Strange, the actual background color is clearly using the same as the line numbers (which is configurable), but the 0th-level color seems to be the same as the text background (and IMO it should be the same as the line number background, not tinted for level 0).

I haven't looked at the relevant code, so I'm not sure if it's actually getting tinted to that, or if the tint is relative to the text area. However, I suspect the former, since with my color scheme I get something that is quite clearly along the fold-tint path and very distinct from my base text background.

At any rate, I don't think configuration is needed, just tweaking of whatever the tint algorithm is getting wrong (if it's not already fixed in trunk)...
Comment 3 Jean-Philippe Fleury 2008-10-28 01:57:18 UTC
Created attachment 28196 [details]
Background colors in Kate

I've changed background color for the text area (in orange) and the left border (in green). We see that the codefolding marks "column" is still in blank (#FFFFFF). I don't have any option to set this color.
Comment 4 Matthew Woehlke 2008-10-30 22:58:13 UTC
Okay, two problems here. First, the color seems to not use kate colors at all, but is using system colorscheme colors, which in this case is clearly wrong. Offhand, I'm not sure how to fix it (as I don't know how to get the kate colors in KateIconBar::initializeFoldingColors), but it should be using the icon bar background as the first color at least. For the "middle" and "deep" colors it should probably be using tints of some foreground colors from kate, but picking which ones is possibly a bit tricky. Therefore, I'm starting to reconsider if it should be configurable.

(Oh, and can we please use KColorUtils::tint here?)
Comment 5 Matthew Woehlke 2009-01-09 22:48:27 UTC
SVN commit 908542 by mwoehlke:

Don't use hard-coded (and potentially wrong) colors for the folding markers. For 4.2 this loses the rainbow colors, they'll come back in 4.3 where I can make the UI changes (which I can't in 4.2 due to string freeze) to make them configurable. Fixes bug 173695 (which I am not closing until it is fixed with configurable colors in trunk).

CCBUG: 173695


 M  +29 -87    kateviewhelpers.cpp  
 M  +2 -3      kateviewhelpers.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=908542
Comment 6 Matthew Woehlke 2009-01-09 23:30:28 UTC
SVN commit 908568 by mwoehlke:

Code folding marker improvements: fix initial color, fix arrow luma, eliminate unneeded second color set.

This also removes the HSL blending code in favor of KCU::tint, which seems to work well. If not, we should add an HCY blend along the lines of ::tint (specifically, in how it handles the HC components for low-chroma colors, i.e. it should be ::tint but with linear Y response) to KCU.

TODO: make configurable!

BUG: 173695


 M  +37 -85    kateviewhelpers.cpp  
 M  +2 -3      kateviewhelpers.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=908568