GNOME Bugzilla – Bug 415415
tree lines drawn in black
Last modified: 2014-08-30 06:14:20 UTC
Please describe the problem: The colour of the tree lines shown when enable-tree-lines is set appear to be hardcoded to black in gtk_tree_view_set_enable_tree_lines(). This doesnt look too good on a black background. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information: I am trying to implement a theme engine that duplicates the look of a gtkCTree, which i have done successfully apart from the colour of the lines. Although I suspect it is not possible, it isnt really clear to me whether or not a theme engine can override the default drawing. Thanks.
Looks like the gcs for both tree lines and grid lines are currently copies of black_gc
*** Bug 440205 has been marked as a duplicate of this bug. ***
should it be taken from base[SELECTED]?
Still relevant
Created attachment 259919 [details] [review] proposed patch
I would not introduce new style properties for this, and just use the foreground color
hmm, which one? just 'color'?
yeah, just color
I'm afraid this property is not clearly associated with the grid/line color; obviously a proper solution would be to support every border - including style, color, etc. via css, but that is too much work, perhaps work for 4.0 :)
I don't think we should support rainbow-colored grid lines, if that is what you're after here... all I want is to make it so that grid lines turn white in a dark theme.
I would use a border color. The grid lines are clearly a border and not a foreground. And because we don't want to do full CSS borders, I'd use the top color for the horizontal and the right color for the vertical lines. And as the border color defaults to the foreground color it should do what Matthias wants in the dark theme. I don't think introducing new style properties is a good idea here. We want to get rid of them after all.
Since we don't want a "rainbow-colored grid" :) , does it make sense to use the same color (in this case, the same property, say 'border-top-color') to horizontal and vertical lines?
I wouldn't accept the "rainbow-colored grid" excuse, but I'd be fine with the "too much work, someone else can do that" excuse. CSS is all about rainbow-colored anything. See http://people.freedesktop.org/~company/stuff/animations.gif for an example of what must be possible. TL;DR: I'm fine with border-top-color for both.
Created attachment 260134 [details] [review] proposed patch, v2 updated patch, use the property border-top-color to draw the grid lines.
(In reply to comment #14) > Created an attachment (id=260134) [details] [review] > proposed patch, v2 > (1) _gtk_css_rgba_value_get_rgba() never returns NULL, so the check is unnecessary (2) You're also patching tree lines, which are not a border. They should be using GTK_CSS_PROPERTY_COLOR.
Created attachment 260161 [details] [review] proposed patch, v3 patch updated, only touch grid lines.
Comment on attachment 260161 [details] [review] proposed patch, v3 Looks good.
Comment on attachment 260161 [details] [review] proposed patch, v3 thanks, pushed to master. however this bug description talks about tree lines, not grid lines, so, I'm not closing it.