After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 415415 - tree lines drawn in black
tree lines drawn in black
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.10.x
Other All
: Normal minor
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
: 440205 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-03-06 19:02 UTC by Tim Orford
Modified: 2014-08-30 06:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.39 KB, patch)
2013-11-15 15:29 UTC, Jonh Wendell
none Details | Review
proposed patch, v2 (2.13 KB, patch)
2013-11-18 15:22 UTC, Jonh Wendell
none Details | Review
proposed patch, v3 (1.88 KB, patch)
2013-11-18 19:17 UTC, Jonh Wendell
committed Details | Review

Description Tim Orford 2007-03-06 19:02:46 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.
Comment 1 Matthias Clasen 2007-03-07 19:53:56 UTC
Looks like the gcs for both tree lines and grid lines are currently copies of black_gc
Comment 2 Benjamin Berg 2007-05-21 15:38:04 UTC
*** Bug 440205 has been marked as a duplicate of this bug. ***
Comment 3 Amol 2008-10-07 06:34:54 UTC
should it be taken from base[SELECTED]?
Comment 4 Matthias Clasen 2011-01-04 03:34:01 UTC
Still relevant
Comment 5 Jonh Wendell 2013-11-15 15:29:04 UTC
Created attachment 259919 [details] [review]
proposed patch
Comment 6 Matthias Clasen 2013-11-16 01:47:38 UTC
I would not introduce new style properties for this, and just use the foreground color
Comment 7 Jonh Wendell 2013-11-16 01:53:15 UTC
hmm, which one? just 'color'?
Comment 8 Matthias Clasen 2013-11-18 10:53:42 UTC
yeah, just color
Comment 9 Jonh Wendell 2013-11-18 13:13:48 UTC
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 :)
Comment 10 Matthias Clasen 2013-11-18 13:16:28 UTC
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.
Comment 11 Benjamin Otte (Company) 2013-11-18 13:36:06 UTC
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.
Comment 12 Jonh Wendell 2013-11-18 14:06:05 UTC
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?
Comment 13 Benjamin Otte (Company) 2013-11-18 14:10:00 UTC
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.
Comment 14 Jonh Wendell 2013-11-18 15:22:47 UTC
Created attachment 260134 [details] [review]
proposed patch, v2

updated patch, use the property border-top-color to draw the grid lines.
Comment 15 Benjamin Otte (Company) 2013-11-18 18:48:04 UTC
(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.
Comment 16 Jonh Wendell 2013-11-18 19:17:24 UTC
Created attachment 260161 [details] [review]
proposed patch, v3

patch updated, only touch grid lines.
Comment 17 Benjamin Otte (Company) 2013-11-18 21:44:53 UTC
Comment on attachment 260161 [details] [review]
proposed patch, v3

Looks good.
Comment 18 Jonh Wendell 2013-11-19 12:26:34 UTC
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.