Created attachment 86303 [details] The expected output with GtkLayout; this shows up with all other controls and layouts. I first asked this question on Stack Overflow thinking it was a bug in GtkLayout itself: http://stackoverflow.com/questions/22940588/how-do-i-really-make-a-gtk-3-gtklayout-transparent-draw-theme-background — now I am reporting it here. When running the simple program at the bottom of my Stack Overflow question, I get the output in the first attachment (imgur: http://imgur.com/oo5zaJe) with the standard layouts and with GtkDrawingArea. This is sthe standard Oyxgen window background. However, with GtkLayout, I get the output in the seocnd attchment (imgur: http://imgur.com/5EG64vY), which shows a plain solid background, instead of the Oyxgen window background, which I expected. The CSS GtkLayout { background-color: transparent; } alone will fix GtkLayout to show the standard Oxygen window background (I don't know if having one on GtkViewpoirt as well will be useful). I do not know if this happens with GTK+ 2, or how to fix it if it does. Thanks.
Created attachment 86304 [details] The background that GtkLayout shows instead; note that it is a solid color.
Forgot to say that the CSS there was what the person who answered my quesiton suggested, rather than my own; it just happens to be the one that works.
Hi, Thanks for reporting. So to make sure I understand right, if you explicitly set gtklayout as transparent in your CSS, you get the background you expect. Correct ? If so, I believe I am just missing this line in the oxygen-gtk3 defaults :) Will add, hoping for no regressions in other applications. PS: can you report the gtk3 version you are using ? these things tend to change a lot (sadly) from one gtk version to the other ... Thanks for reporting, Hugo
Patch: diff --git a/src/oxygenqtsettings.cpp b/src/oxygenqtsettings.cpp index e02aa28..bd79d36 100644 --- a/src/oxygenqtsettings.cpp +++ b/src/oxygenqtsettings.cpp @@ -725,6 +725,7 @@ namespace Oxygen "GtkImage, " "GtkInfoBar, " "GtkLabel, " + "GtkLayout, " "GtkMenuItem, " "GtkOverlay, " "GtkRevealer, " Can you try apply it ? Confirm that it fixes the issue ? if yes I'll commit and close the report.
Very sorry for the delay; had issues figuring out how to apply package patches. Yes, this fixes the bug. Thanks!
Git commit 76ff7ce3a5cd97b7fb43cb1ee5288c0cde725c53 by Hugo Pereira Da Costa. Committed on 28/04/2014 at 16:09. Pushed by hpereiradacosta into branch 'gtk3'. Added GtkLayout to the list of transparent widgets. M +1 -0 src/oxygenqtsettings.cpp http://commits.kde.org/oxygen-gtk/76ff7ce3a5cd97b7fb43cb1ee5288c0cde725c53
this has been pushed to gtk3 branch, will land into some release soon, so closing.