Re: background color for GtkTreeView
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
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
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
try with treeview:selected { background-color: white; } Luca 2018-03-10 14:26 GMT+01:00 : > 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