No background defined for GtkToolbar

Bug #1318821 reported by Egmont Koblinger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-themes (Ubuntu)
Invalid
Undecided
Lars Karlitski

Bug Description

Choose Ambiance or Radiance Gtk+ theme. Start an app that sets app_paintable and contains a toolbar. Notice that the toolbar is randomly displayed either with its proper color, or with transparency.

A sample application is VTE at current master:
git clone git://git.gnome.org/vte
cd vte
git checkout 4431fd9
./autogen.sh
make
./src/vte-2.91 -T 50

In about half the cases, the top bar is transparent.

Placing this in {Ambiance,Radiance}/gtk-3.0/gtk-widgets.css:
GtkToolbar {
    background-color: @bg_color;
}
makes the problem go away.

Originally found/reported here: https://bugzilla.gnome.org/show_bug.cgi?id=730016, check here for more information.

There might be other GTK+ widgets suffering from the same problem, I don't know, please double check.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: light-themes 14.04+14.04.20140410-0ubuntu1 [modified: usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css usr/share/themes/Radiance/gtk-3.0/gtk-widgets.css]
ProcVersionSignature: Ubuntu 3.13.0-24.47-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Mon May 12 22:59:46 2014
InstallationDate: Installed on 2012-05-30 (712 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
PackageArchitecture: all
SourcePackage: ubuntu-themes
UpgradeStatus: Upgraded to trusty on 2014-03-25 (48 days ago)

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :
Revision history for this message
Lars Karlitski (larsu) wrote :

Thanks for reporting this. I've attached a branch that fixes the issue.

Changed in ubuntu-themes (Ubuntu):
assignee: nobody → Lars Uebernickel (larsu)
status: New → Incomplete
status: Incomplete → In Progress
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Hi Lars,

Thanks for the quick fix. Please note that you created a new ".toolbar" section while there's already one, you might move the background definition there.

Another similar issue arose: The background of inactive notebook tabs is also defined to transparent. Unfortunately "transparent" either doesn't mean to show what's underneath in the same application, or there's nothing underneath – I'm not sure – so you'll end up with actual transparency, seeing another window or the desktop background there.

The fix is easy: under ".notebook tab" could you please change background-color to be "@bg_color"?

https://bugzilla.gnome.org/show_bug.cgi?id=730016#c22 contains a demo for this bug. Unfortunately it's a bit inconvenient to reproduce: you need to get unstable vte, compile, install; then get unstable gnome-terminal, apply that patch, compile, install.

The fix I recommend fixes the majority of the issue, making transparent gnome-terminal usable. However there are still some transparent bits: the upper 2 rows of inactive tabs, the rounded corners of tabs, and the rounded corners of the scrollbar's slots. I'm not sure how to fix all of these. Maybe these pixels don't belong to areas described by the theme's CSS files, once transparency kicks in?? My knowledge ends here at this moment.

Revision history for this message
Lars Karlitski (larsu) wrote :

Setting backgrounds on all of those widgets turns out to be a bad idea. Instead, the window containing the transparent widget should set itself as app-paintable. I've done Ubuntu's transparency patch for gnome-terminal in lp:~larsu/gnome-terminal/update-restore-transparency-patch.

I'm closing this bug for the theme.

Changed in ubuntu-themes (Ubuntu):
status: In Progress → Invalid
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Hi Lars,

Thanks so much for your work!

I had something similar to Debarshi Ray's patch, we both set app_paintable. However, as it turns out, it's not enough (the result is transparent bits all over the window, not just where it's desired). Apparently the "draw" signal has to be also hijacked, as in your code.

I'll get in touch with Debarshi to figure this out and get your work backported.

Revision history for this message
Lars Karlitski (larsu) wrote :

> I'll get in touch with Debarshi to figure this out and get your work backported.

Thanks, but I've already send him the patch for review, as it is based on his original patch. We want to maintain the same version between Fedora and Ubuntu.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Super cool, thanks!

I've filed https://bugzilla.gnome.org/show_bug.cgi?id=730817, I really think the patch should live upstream rather than distros syncing between each other.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.