After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640692 - GtkNotebook has wrong background colour when border and tabs are turned off when using GtkDrawingArea
GtkNotebook has wrong background colour when border and tabs are turned off w...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
2.22.x
Other Linux
: Normal minor
: ---
Assigned To: Carlos Garnacho
gtk-bugs
: 642112 644268 645043 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-01-27 05:02 UTC by Andrew Cowie
Modified: 2011-03-17 19:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Short C program demonstrating the glitch (1.69 KB, application/octet-stream)
2011-01-27 05:02 UTC, Andrew Cowie
  Details
notebook: Don't set notebook style with hidden tabs (1.58 KB, patch)
2011-03-17 18:02 UTC, Bastien Nocera
committed Details | Review

Description Andrew Cowie 2011-01-27 05:02:16 UTC
Created attachment 179410 [details]
Short C program demonstrating the glitch

For some strange reason, when you have a GtkNotebook with 'show-tabs' AND 'show-border' set to FALSE , the background of a GtkDrawingArea in the GtkNotebook has a *different* background colour to all the other widgets (labels, etc) about.

This would appear to be theme dependent (I've been using something old for a while and didn't notice) but definitely crops up with "Dust Sand" and "Elementary". But before we rush off and blame the theme engines :) is there anything about GtkNotebook that might be triggering this when these two properties are turned off? If you only turn off tabs or border, the glitch doesn't occur.

AfC
Comment 1 Bastien Nocera 2011-03-17 18:02:07 UTC
Created attachment 183661 [details] [review]
notebook: Don't set notebook style with hidden tabs

When tabs are not shown, and the notebook is used as a container,
we should not set the notebook style, otherwise the theme has no
way to know whether tabs are shown or not, and which colour to draw
the background.
Comment 2 Carlos Garnacho 2011-03-17 18:17:28 UTC
I think it makes sense, generally containers that don't render anything themselves don't set any style that could modify stuff downwards either
Comment 3 Bastien Nocera 2011-03-17 18:31:15 UTC
Pushed to gtk-3-0 and master

Attachment 183661 [details] pushed as 90a4f8d - notebook: Don't set notebook style with hidden tabs
Comment 4 Bastien Nocera 2011-03-17 18:31:50 UTC
*** Bug 644268 has been marked as a duplicate of this bug. ***
Comment 5 Bastien Nocera 2011-03-17 18:32:14 UTC
*** Bug 645043 has been marked as a duplicate of this bug. ***
Comment 6 Cosimo Cecchi 2011-03-17 19:48:44 UTC
*** Bug 642112 has been marked as a duplicate of this bug. ***