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 93389 - GtkEventBox in an inactive GtkNotebook tab doesn't follow style
GtkEventBox in an inactive GtkNotebook tab doesn't follow style
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.0.x
Other other
: Normal trivial
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 64737
 
 
Reported: 2002-09-16 13:40 UTC by Tommi Komulainen
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testgtknotebook.c (1.88 KB, text/x-csrc)
2002-09-20 21:27 UTC, Tommi Komulainen
  Details
Patch (1.08 KB, patch)
2002-10-15 18:45 UTC, Soren Sandmann Pedersen
none Details | Review
New attempt (takes care of Owen's comments and gtk_notebookr_child_reordered()) (2.29 KB, patch)
2002-10-16 16:43 UTC, Soren Sandmann Pedersen
none Details | Review

Description Tommi Komulainen 2002-09-16 13:40:34 UTC
Inactive notebook tab with an eventbox in it doesn't follow the style.  It
looks like the eventbox remains using the default background color instead
of the slightly darker color in inactive tabs.
Comment 1 Owen Taylor 2002-09-20 20:58:53 UTC
Small standalone compileable test case would be useful here.
Comment 2 Tommi Komulainen 2002-09-20 21:27:50 UTC
Created attachment 11193 [details]
testgtknotebook.c
Comment 3 Soren Sandmann Pedersen 2002-10-15 18:45:55 UTC
Created attachment 11566 [details] [review]
Patch
Comment 4 Soren Sandmann Pedersen 2002-10-15 18:47:38 UTC
I think the problem is that the notebook doesn't set the widget state
for the tab widgets.
Comment 5 Owen Taylor 2002-10-15 19:38:50 UTC
Hmm, yeah. There is no precendent for widgets setting
the state of children rather than their own state, so I'm
not _exactly_ sure how it should work in detail. But
it seems plausible.

I think the code needs to also set the state in 
gtk_notebook_insert_page_menu() and gtk_notebook_set_tab_label
or added labels won't necessarily get the right state.

You probably also should set the state back to GTK_STATE_NORMAL in 
gtk_notebook_remove_tab_label()
Comment 6 Sven Neumann 2002-10-15 20:10:44 UTC
I just wanted to add that the patch applied to gtk-2-0 seems to fix
the problems we saw in GIMP-1.3 with labels of GimpDockBooks drawn in
a wrong state. However, as Owen said, the patch is probably incomplete.
Comment 7 Soren Sandmann Pedersen 2002-10-16 16:43:19 UTC
Created attachment 11597 [details] [review]
New attempt (takes care of Owen's comments and gtk_notebookr_child_reordered())
Comment 8 Tommi Komulainen 2002-10-16 17:07:18 UTC
I just tried the patch and it seems to work for the default theme. 
However, when using Crux it's still as broken as ever.  Is this only a
problem in the theme, or did you overlook something?
Comment 9 Soren Sandmann Pedersen 2002-10-17 14:23:16 UTC
I don't have Crux installed, so I don't know. Could you try putting an
eventbox inside a button and see if it changes color when the button
is pressed?

Please try both with the default theme and with crux, and make sure
you restart the test program after changing theme (instant apply
notwithstanding).
Comment 10 Tommi Komulainen 2002-10-17 16:09:27 UTC
With Crux the color of the eventbox remains flat light gray.  It is
clearly visible whether the button is pressed or not.  With the
default theme I don't notice the eventbox.
Comment 11 Soren Sandmann Pedersen 2002-10-17 16:17:13 UTC
In that case, it's probably a bug in Crux.

Wrt. the patch, I don't think the call to
gtk_notebook_update_tab_states() in gtk_notebook_child_reordered() is
necessary. Somehow I must have thought that the activeness of the tabs
could change when that function was called, but I don't think it can.
Comment 12 Owen Taylor 2002-12-17 15:54:21 UTC
See also bug 98207
Comment 13 Paolo Maggi 2003-01-12 19:04:19 UTC
*** Bug 103206 has been marked as a duplicate of this bug. ***
Comment 14 Owen Taylor 2003-01-30 21:55:54 UTC
Thu Jan 30 16:54:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtknotebook.c: Patch from Soeren Sandmann
        to update the states of the tab label child
        widgets to match the state of the tabs.
        (#93389, Reported by Tommi Komulainen)