GTK3: rulers render with solid black bg (GTK+ 3.6, default Adwaita theme)

Bug #1094511 reported by su_v
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Alex Valavanis

Bug Description

Depending on the current Gtk theme, both rulers render with a solid black background with GTK+ 3.6.x.

With Inkscape 0.48+devel r11997 on OS X 10.7.4 (GTK+/Quartz 3.6.2, gtkmm 3.6.0, glib 2.24.3, cairo 1.12.8):
- The issue occurs with the default Adwaita theme from gnome-themes-standard 3.6.2 as well as when using no specific theme at all.
- The issue does not occur e.g. with Ubuntu's light themes (Ambiance, Radiance) for Gnome 3.6 (both based on Unico theme engine), and with latest version of Zukitwo for Gnome 3.6 (based on Adwaita theme engine) [1].

With Inkscape 0.48+devel r11997 based on Gnome 3.4 (GTK+/X11 3.4.4, gtkmm 3.4.0, glib 2.32.4), the issue does not occur at all (independent of which gtk theme for Gnome 3.4 is used).

Screenshots attached.

Likely related: if the rulers have a solid black background, the background of previews of SVG files in the file chooser also renders with a black solid background (instead of white (GTK2), or at least a light theme background color (Ambiance, Zukitwo for Gnome 3.6).

---
[1] <http://gnome-look.org/content/show.php?content=140562>

Tags: gtk3
Revision history for this message
su_v (suv-lp) wrote :
description: updated
Revision history for this message
su_v (suv-lp) wrote :
description: updated
description: updated
Revision history for this message
su_v (suv-lp) wrote :
summary: - GTK3: ruler background renders with solid black bg (GTK3 3.6, default
+ GTK3: ruler background renders with solid black bg (GTK+ 3.6, default
Adwaita theme)
su_v (suv-lp)
summary: - GTK3: ruler background renders with solid black bg (GTK+ 3.6, default
- Adwaita theme)
+ GTK3: rulers render with solid black bg (GTK+ 3.6, default Adwaita
+ theme)
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP, Inkscape trunk revision 11998, default Windows theme.
gtk3 3.6.1+1.2, gtk3mm 3.4.0-1.23, glib 2.34.1-1.1, cairo 1.10.2-8.20, all cross-compiled libs from Opensuse.

Changed in inkscape:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Should be fixed in lp:inkscape r12004

Changed in inkscape:
assignee: nobody → Alex Valavanis (valavanisalex)
status: Triaged → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

Alex Valavanis wrote:
> Should be fixed in lp:inkscape r12004

Thnx :) - fix confirmed on OS X 10.7.4 with GTK+/Quartz 3.6.2, gtkmm 3.6.0, glib 2.24.3, cairo 1.12.8, using default Adwaita theme.

~suv wrote:
> Likely related: (…) the background of previews of SVG files
> in the file chooser (…)

I'll file a separate report about the file chooser (background, size of preview).

Revision history for this message
su_v (suv-lp) wrote :

Reopening - this problem has returned with GTK+ 3.8 and 3.10, again when using default Adwaita theme, or the built-in one.

Changed in inkscape:
status: Fix Released → New
Revision history for this message
jazzynico (jazzynico) wrote :

Revision 12004 sets a CSS background-color value, @bg_color, that is not defined in the Adwaita theme (tested with GTK+-3.8.1 on Windows XP).
Defining it (background-color: @bg_color;) in the gtk-main.css file fixes the issue in the devlibs-gtk3, but I feel it would be a good idea to fix it in the trunk (patch attached).
Alex, what's your take on it?

Revision history for this message
jazzynico (jazzynico) wrote :

Patch removed. Tests failed on Crunchbang.

Revision history for this message
jazzynico (jazzynico) wrote :

Crunchbang Waldorf (and all Debian stable based distros) uses GTK+-3.4.2, and thus works with the current trunk but not with the patch I added.
New patch in progress.

Revision history for this message
jazzynico (jazzynico) wrote :

This one should work with all GTK+-3 versions.

Revision history for this message
su_v (suv-lp) wrote :

Patch tested successfully on OS X 10.7.5 with r12834, with
- GTK+/X11 3.4.4, Glib 2.32.4
- GTK+/Quartz 3.6.4, Glib 2.34.3
- GTK+/X11 3.10.4, Glib 2.38.2
- GTK+/Quartz 3.10.4, Glib 2.38.2
using the Adwaita theme installed with the corresponding version of 'gnome-themes-standard'.

Revision history for this message
jazzynico (jazzynico) wrote :

Thanks for the test ~suv!

Fixed in the trunk, revision 12835.

Changed in inkscape:
status: New → Fix Released
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

@nico - Thanks for sorting this. The patch looks great, but I noticed that the GIMP theme files still only show the @bg_color setting. I wonder whether:

(a) this bug exists in GIMP (gtk3-port) with Gtk+ > 3.8.0
or
(b) they solved it in a different way (using some styling code elsewhere)

[1] https://git.gnome.org/browse/gimp/tree/themes/Default/gimp.css?h=gtk3-port

Revision history for this message
jazzynico (jazzynico) wrote :

@alex - I'll try to compile the Gimp (gtk3-port) to see how it works. But searching the code (with grep) doesn't show any local definition of bg_color or theme_bg_color, that would mean that Gimp relies entirely on the shared theme.

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.