Re: background color for GtkTreeView

2018-03-10 Thread Yuri Khan
On Sat, Mar 10, 2018 at 10:40 PM,   wrote:

> that does seem to do the trick. Seems rather unfortunate though to set
> it by manually. I was hoping there's at least a predefined theme color
> variable anywhere to put in here.

You might try using the :not CSS selector. The documentation mentions
it so it is probably supported:

https://developer.gnome.org/gtk3/stable/chap-css-overview.html

treeview:not(:selected) { background-color: #fffae1; }
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: background color for GtkTreeView

2018-03-10 Thread codemusings
Hi Stefan,

that does seem to do the trick. Seems rather unfortunate though to set
it by manually. I was hoping there's at least a predefined theme color
variable anywhere to put in here.

Thank you.

Am Samstag, den 10.03.2018, 15:38 +0100 schrieb Stefan Salewski:
> On Sat, 2018-03-10 at 14:26 +0100, codemusi...@gmail.com wrote:
> > Hi there,
> > 
> > I'm trying to change the background-color of a GtkTreeView by
> > adding
> > a
> > css provider with the following style set:
> > 
> > treeview { background-color: #fffae1; }
> > 
> > Unfortunately this has the effect that the row selection color
> > changes
> > from the default blue to this particular background color as well.
> > 
> > Note that I'm aware that I can change the background color of
> > individual rows. However, I want to change the color of the entire
> > widget including the whitespace.
> > 
> > I can't figure out how to prevent the row selection color from
> > changing
> > as well.
> > 
> > Any help would be greatly appreciated.
> > 
> > 
> 
> GTK3?
> 
> grep -C3 "treeview.view.selected" .config/gtk-3.0/gtk-default.css
> -GtkTreeView-tree-line-width: 1;
> -GtkTreeView-tree-line-pattern: '';
> -GtkTreeView-expander-size: 16; }
>   treeview.view:selected:focus, treeview.view:selected {
> border-radius: 0; }
>   treeview.view:selected:backdrop, treeview.view:selected {
> border-left-color: #a5c8ec;
> border-top-color: rgba(46, 52, 54, 0.1); }
>   treeview.view:disabled {
> --
> textview text selection:focus,
> textview text selection, flowbox flowboxchild:selected,
> spinbutton:not(.vertical) selection,
> entry selection, modelbutton.flat:selected,
> .menuitem.button.flat:selected, treeview.view:selected:focus,
> treeview.view:selected, row:selected, calendar:selected {
>   background-color: #4a90d9; }
>   row:selected label, label:selected, .selection-mode
> button.titlebutton, .view:selected:focus, iconview:selected:focus,
> .view:selected, iconview:selected,
>   .view text:selected:focus,
> --
> 
> I assume that after changing complete background, you have to set
> background for selected again. Above #4a90d9 looks like that color.
> You
> have to find out how to do it exactly yourself.
> 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: background color for GtkTreeView

2018-03-10 Thread Stefan Salewski
On Sat, 2018-03-10 at 14:26 +0100, codemusi...@gmail.com wrote:
> Hi there,
> 
> I'm trying to change the background-color of a GtkTreeView by adding
> a
> css provider with the following style set:
> 
> treeview { background-color: #fffae1; }
> 
> Unfortunately this has the effect that the row selection color
> changes
> from the default blue to this particular background color as well.
> 
> Note that I'm aware that I can change the background color of
> individual rows. However, I want to change the color of the entire
> widget including the whitespace.
> 
> I can't figure out how to prevent the row selection color from
> changing
> as well.
> 
> Any help would be greatly appreciated.
> 
> 

GTK3?

grep -C3 "treeview.view.selected" .config/gtk-3.0/gtk-default.css
-GtkTreeView-tree-line-width: 1;
-GtkTreeView-tree-line-pattern: '';
-GtkTreeView-expander-size: 16; }
  treeview.view:selected:focus, treeview.view:selected {
border-radius: 0; }
  treeview.view:selected:backdrop, treeview.view:selected {
border-left-color: #a5c8ec;
border-top-color: rgba(46, 52, 54, 0.1); }
  treeview.view:disabled {
--
textview text selection:focus,
textview text selection, flowbox flowboxchild:selected,
spinbutton:not(.vertical) selection,
entry selection, modelbutton.flat:selected,
.menuitem.button.flat:selected, treeview.view:selected:focus,
treeview.view:selected, row:selected, calendar:selected {
  background-color: #4a90d9; }
  row:selected label, label:selected, .selection-mode
button.titlebutton, .view:selected:focus, iconview:selected:focus,
.view:selected, iconview:selected,
  .view text:selected:focus,
--

I assume that after changing complete background, you have to set
background for selected again. Above #4a90d9 looks like that color. You
have to find out how to do it exactly yourself.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: background color for GtkTreeView

2018-03-10 Thread Luca Bacci
try with

treeview:selected {
  background-color: white;
}

Luca

2018-03-10 14:26 GMT+01:00 <codemusi...@gmail.com>:

> Hi there,
>
> I'm trying to change the background-color of a GtkTreeView by adding a
> css provider with the following style set:
>
> treeview { background-color: #fffae1; }
>
> Unfortunately this has the effect that the row selection color changes
> from the default blue to this particular background color as well.
>
> Note that I'm aware that I can change the background color of
> individual rows. However, I want to change the color of the entire
> widget including the whitespace.
>
> I can't figure out how to prevent the row selection color from changing
> as well.
>
> Any help would be greatly appreciated.
>
> Tilo
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


background color for GtkTreeView

2018-03-10 Thread codemusings
Hi there,

I'm trying to change the background-color of a GtkTreeView by adding a
css provider with the following style set:

treeview { background-color: #fffae1; }

Unfortunately this has the effect that the row selection color changes
from the default blue to this particular background color as well.

Note that I'm aware that I can change the background color of
individual rows. However, I want to change the color of the entire
widget including the whitespace.

I can't figure out how to prevent the row selection color from changing
as well.

Any help would be greatly appreciated.

Tilo
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Change background color in GtkTreeView

2012-11-29 Thread Tomasz Jankowski
Hello,

I'm working on UI for embedded system using GTK+ 2.24. I want to
change GtkTreeView background (area behind rows, which is by default white)
to match default color of window area (grey by default).
I retrieved GtkStyle associated with GtkWindow and looked for this
particular tint of gray color in GdkColor arrays in GtkStyle instance
(gb, fg, base arrays). Then I assigned these colors to GtkTreeView
using gtk_wdget_modify_base(), but I was unable to find the same color. Any
idea?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Change background color in GtkTreeView

2012-11-29 Thread Michael Cronenworth
Tomasz Jankowski wrote:
 I'm working on UI for embedded system using GTK+ 2.24. I want to
 change GtkTreeView background (area behind rows, which is by default white)
 to match default color of window area (grey by default).
 I retrieved GtkStyle associated with GtkWindow and looked for this
 particular tint of gray color in GdkColor arrays in GtkStyle instance
 (gb, fg, base arrays). Then I assigned these colors to GtkTreeView
 using gtk_wdget_modify_base(), but I was unable to find the same color. Any
 idea?

The first array value of bg contained the background color of my window.

Worst case:
If you can get a screenshot of the window you can take a image app, such
as Gimp, and use the color picker tool.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list