Re: Changing the GtkTreeView Bar Color....



At this moment, I reach to build

treeview.view :selected {color: rgba (...) ; background-color: rgba (...);}

The problem now is to make GtkCellRendererToggle icons visible. Seems that takes the same color as the "color" defined above, inside the brackets... and while the color is white, icon is not visible... and for me, should remain always in black.

Adwaita has the solution, because even if the selection bar is in "blue", toggle widgets can show their own "check" icons... but at the moment, I don't reach the solution...

Glus


2016-07-04 20:04 GMT+02:00 Emmanuele Bassi <ebassi gmail com>:
Hi;

On 4 July 2016 at 18:43, Glus Xof <gtglus gmail com> wrote:
> Hi again,
>
>
> This
>
> treeview row:selected {background-color: #cc0000;}
>
> doesn't work for me; but this
>
> treeview *:selected {background-color: #cc0000;}
>
> works... but I guess that this should not be the same as before...
>
> Then, this
>
> treeview row:nth-child(odd) {background-color: #ffffff;}
> treeview row:nth-child(even) {background-color: #f0f0f0;}
>
> seems not to work either...
>
> So... what happens about the "row" in Adwaita ???

The "row" region exposed by older versions of GTK+ is gone, like the
rest of the CSS regions.

The documentation for GtkTreeView styling is available at:

  https://developer.gnome.org/gtk3/stable/GtkTreeView.html#id-1.3.12.6.11.10

Anything related to the internals of the CSS styling of widgets was
undocumented and unstable before 3.20.

I strongly encourage you to use the GTK inspector to experiment with styling:

  https://wiki.gnome.org/Projects/GTK+/Inspector
  https://blog.gtk.org/2016/06/22/adwaita/

Ciao,
 Emmanuele.

> 2016-07-04 16:48 GMT+02:00 Glus Xof <gtglus gmail com>:
>>
>>
>>
>> 2016-07-04 10:25 GMT+02:00 Emmanuele Bassi <ebassi gmail com>:
>>>
>>> Hi;
>>>
>>> On 2 July 2016 at 10:23, Glus Xof <gtglus gmail com> wrote:
>>>
>>> > After, I changed the contents of my ~/.config/gtk-3.0/gtk.css, with
>>> >
>>> > ----
>>> > treeview row:selected {
>>> >         background-color: #000;
>>> > }
>>> >
>>> > treeview row:nth-child(even) {
>>> >         background-color: #bd0814;
>>> > }
>>> > -----
>>> >
>>> > And then copied this gtk.css to /usr/share/themes/Adwaita/gtk-3.0/
>>>
>>> Why did you do this?
>>>
>>> What is it that you're trying to achieve?
>>>
>>> If you want to override parts of Adwaita, just use the gtk.css file
>>> inside your home directory. Do not replace system-level files (which
>>> will get blown away the next time you update your system).
>>
>>
>> Using as theme Adwaita and having the following config file
>>
>> $ cat ~/.config/gtk-3.0/gtk.css...
>> treeview row:selected {background-color: #cc0000;}
>>
>> I don't experience any change of TreeView Bar color...
>>
>> What's wrong ?
>>
>> Glus
>>
>>>
>>> Also, Adwaita is included in the GTK shared library, it's not really a
>>> CSS file on the file system.
>>>
>>> Ciao,
>>>  Emmanuele.
>>>
>>> --
>>> https://www.bassi.io
>>> [@] ebassi [@gmail.com]
>>
>>
>



--
https://www.bassi.io
[@] ebassi [@gmail.com]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]