GNOME Bugzilla – Bug 761965
Nautilus content background is grey rather than white
Last modified: 2016-02-15 10:41:19 UTC
During the 3.19.x cycle, the background color in the nautilus content view (where files are displayed) went from white to grey. This doesn't work so well with the grey chrome and it would be better if the white background color could be restored.
This is not an adwaita bug, the notebook replicate the behaviour of the previous implementation. In the past the notebook uses to sport the .notebook styleclass and in case of a single page notebook with no header (which basically means, no notebook) that styleclass wasn't there, so the style (white bg in this case) wasn't applied. With the node conversion the notebook node is always there but we replicate in other ways that behaviour, so I suspect there was some hack in nautilus (.notebook styleclass not vanishing?) to be able to rely on the notebook background. The real issue here is nautilus iconview not drawing its own bg I think and otherwise this can be fixed by nautilus shipped css, hence moving to nautilus.
Created attachment 321227 [details] [review] desktop: convert css name to style class We expect any GtkWindow to actually have the window style. So instead of changing the css node, just apply a style class. This will be needed for upcoming patches.
Created attachment 321228 [details] [review] window: fix missing casting
Created attachment 321229 [details] [review] eel-canvas: remove background draw handling This seems no longer necessary. It looks like it was done to avoid flashing when redrawing, but probably this was fixed sometime in the past, so a transparent background in a widget doesn't flash anymore.
Created attachment 321230 [details] [review] css: draw a background for the notebook With recent gtk+ changes, the notebook style and drawing was changed somehow. Nautilus had a white background by "luck", and the canvas view needs to apply it's own background style in order to have a background at all. This commit follows what we were doing with the desktop window where we apply a style class to have a transparent background, but in this case a white one to fix this issue.
Created attachment 321231 [details] [review] application: give priority to user theme We want to provide priority to anything that was set on the user theme rather than in custom Adwaita theme, in case anyone wants to override some style. This fixes the desktop window getting the same background as the one defined for normal windows in the Nautilus Adwaita theme.
Attachment 321227 [details] pushed as 2a17859 - desktop: convert css name to style class Attachment 321228 [details] pushed as 16c4057 - window: fix missing casting Attachment 321229 [details] pushed as ab61aa4 - eel-canvas: remove background draw handling Attachment 321230 [details] pushed as b71b236 - css: draw a background for the notebook Attachment 321231 [details] pushed as 83e5371 - application: give priority to user theme