Bug 469398 - nodoka active menu background color bad in f9-upgraded rawhide
nodoka active menu background color bad in f9-upgraded rawhide
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: gtk-nodoka-engine (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Martin Sourada
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-31 12:38 EDT by Yao Ziyuan
Modified: 2008-12-06 07:51 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-06 07:51:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yao Ziyuan 2008-10-31 12:38:26 EDT
Description of problem:

I upgraded a freshly installed Fedora 9 to Rawhide (Fedora 9.92) and then applied all updates. Then, my default Nodoka looks like this screenshot:

http://i34.tinypic.com/212ziuf.png
(Notice the background color of gedit's main menu entry "File". This color looks inconsistent with window titlebar color and active popup menu item background color.)

Someone in Freenode/#fedora-qa says his freshly installed Rawhide and f9-upgraded Rawhide all look like:

http://wwoods.fedorapeople.org/screenshots/f10-nodoka.png
(Notice the background color of gedit's main menu entry "Help". This color looks a lot more reasonable and better.)

I and he had verified that our nodoka-related packages are of exactly the same versions, so the difference must be caused by something else.

I also found that if I "gedit /usr/share/themes/Nodoka/gtk-2.0/gtkrc" and find the following line

		roundness		= 3 # 0 = squared, 1 = old default, more will increase roundness

and change the value "3" to "1" then I will get a better main menu entry color in newly started gtk2 applications (e.g. gedit), although now main menu entries look 100% squared and other UI elements (e.g. pushbuttons) look just slightly rounded (i.e. squares with only the four pixels at each corner withdrawn):



Version-Release number of selected component (if applicable):

gtk-nodoka-engine-0.7.1-2.fc10.i386, nodoka-theme-gnome-0.3.90-2.fc10.noarch

How reproducible:

See above.

Actual results:

http://i34.tinypic.com/212ziuf.png

Expected results:

http://wwoods.fedorapeople.org/screenshots/f10-nodoka.png

Additional info:
Comment 1 Martin Sourada 2008-10-31 18:55:45 EDT
Hm... I don't know what might be causing this. Perhaps some mismatch in loaded theme/libraries... Have you restarted since your last update? If the answer is positive, could you try installing gtk-nodoka-engine-extras and trying the different "Controls" themes that would install and reporting back if the issue stays the same for all of them or not.

Thanks.
Comment 2 Will Woods 2008-10-31 19:02:55 EDT
We talked about this on IRC - apparently using the Nodoka "squared" theme, the colors look fine:
  http://i37.tinypic.com/358t7hy.png
But the default "rounded" one has the colors shown above.
Comment 3 Yao Ziyuan 2008-10-31 19:33:49 EDT
Yes, I have been restarted the computer.

Yes, I have installed gtk-nodoka-engine-extras as well. All extra Nodoka styles
have the same issue except Nodoka-Squared, which uses this line in its gtkrc
file:

roundness  = 0 # 0 = squared, 1 = old default, more will increase roundness

Note that the correct menu background color will only appear when "roundness"
is set to 0 (fully squared) or 1 (fully squared menus and almost fully squared
controls).

What other things could affect the drawing of menus except the nodoka packages
listed below?

gtk-nodoka-engine.i386 : The Nodoka GTK Theme Engine
gtk-nodoka-engine-extras.i386 : Extra themes for Nodoka gtk2 theme engine
nodoka-filesystem.noarch : The directory infrastructure for Nodoka
nodoka-metacity-theme.noarch : The Nodoka theme for Metacity
nodoka-theme-gnome.noarch : The Nodoka Theme Pack for Gnome
notification-daemon-engine-nodoka.i386 : The Nodoka theme engine for the
                                       : notification daemon
xfwm4-theme-nodoka.noarch : Nodoka theme for xfwm4


Also, my original Nodoka gtkrc file is:

# Fedora Nodoka gtkrc, based on Aqualooks
#
# Authors:
# Daniel Geiger <dgeiger_343@yahoo.com>
# Martin Sourada <martin.sourada@seznam.cz>
#
# Uses the Nodoka theme engine, forked from Murrine theme engine

gtk_color_scheme =
"fg_color:#000000\nbg_color:#ECE9E9\nbase_color:#ffffff\ntext_color:#000000\nselected_bg_color:#008DD7\nselected_fg_color:#ffffff\ntooltip_bg_color:#F5F5B5\ntooltip_fg_color:#000"

style "fedora-default"
{

 GtkButton::default_border = { 0, 0, 0, 0 }
 GtkButton::child-displacement-x = 0
 GtkButton::child-displacement-y = 1

 GtkRange::trough_border  = 0
 GtkRange::slider_width  = 14
 GtkRange::stepper_size  = 14
   GtkRange::stepper_spacing = 0

 GtkScale::slider-length  = 28

 GtkPaned::handle_size  = 6

 GtkScrollbar::min_slider_length = 40
 GtkCheckButton::indicator_size = 13
   GtkRadioButton::indicator_size = 13
 GtkMenuBar::internal-padding = 0
 GtkTreeView::expander_size = 14
 GtkExpander::expander_size = 16

 xthickness   = 1
 ythickness   = 1

 fg[NORMAL]   = @fg_color
 fg[PRELIGHT]   = @fg_color
 fg[ACTIVE]   = @fg_color
 fg[SELECTED]   = @selected_fg_color
 fg[INSENSITIVE]   = shade (0.7019, @selected_fg_color)

 bg[NORMAL]   = @bg_color
 bg[PRELIGHT]   = shade (1.0346, @bg_color)
 bg[ACTIVE]   = shade (0.9437, @bg_color)
 bg[SELECTED]   = @selected_bg_color
 bg[INSENSITIVE]   = shade (0.9437, @bg_color)

 base[NORMAL]   = @base_color
 base[PRELIGHT]   = shade (0.3967, @base_color)
 base[ACTIVE]   = shade (0.52, @selected_fg_color)
 base[SELECTED]   = @selected_bg_color
 base[INSENSITIVE]  = shade (0.9437, @bg_color)

 text[NORMAL]   = @text_color
 text[PRELIGHT]   = @text_color
 text[ACTIVE]   = @selected_fg_color
 text[SELECTED]   = @selected_fg_color
 text[INSENSITIVE]  = darker (@selected_fg_color)

 engine "nodoka"
 {
#  scrollbar_color  = shade (1.040897799, "#008DD7")
  animation  = TRUE # FALSE = disabled, TRUE = enabled
#  contrast  = 1.0
#  gradients  = FALSE
#  hilight_ratio  = 0.909090909
  listviewheaderstyle = 1 # 0 = flat, 1 = gradient, 2 = raised
  listviewstyle  = 1 # 0 = nothing, 1 = dotted
  menubarstyle  = 3 # 0 = flat, 1 = normal raised gradient, 2 = normal lowered
gradient, 3 = menubar gradient
  toolbarstyle  = 2 # 0 = flat, 1 = normal raised gradient, 2 = normal lowered
gradient, 3 = menubar gradient
  roundness  = 3 # 0 = squared, 1 = old default, more will increase roundness
  scrollbarstyle  = 1 # 0 = nothing, 1 = circles, 2 = bars
  stripes   = TRUE # enable or disable stripes in progressbars
  bullet_color  = "#005DC2"
  focus_fill  = TRUE # enable or disable focus overlay fill
  focus_inner  = FALSE # TRUE = secondary focus ring inside, FALSE = secondary
focus ring outside widgets
 }

}

# Evolution (and some deprecated widgets) use bg and fg for its listview
instead of 
# base and text like they should, so we override it.
style "evolution-hack" = "fedora-default"
{ 
 bg[ACTIVE] = @bg_color
}

style "evolution-hack-tree" = "fedora-default"
{ 
 bg[ACTIVE] = shade (0.8, @bg_color)
 bg[SELECTED] = shade (1.040897799, @selected_bg_color)
 fg[ACTIVE] = @text_color
 fg[SELECTED] = @selected_fg_color
}

style "fedora-bright" = "fedora-default"
{
 bg[SELECTED] = shade (1.040897799, @selected_bg_color)
}


style "fedora-wide" = "fedora-default"
{
 xthickness = 2
 ythickness = 2
}

style "fedora-wide-bright" = "fedora-wide"
{
 bg[SELECTED] = shade (1.040897799, @selected_bg_color)
}

style "fedora-wider" = "fedora-default"
{
 xthickness = 3
 ythickness = 3
}

style "fedora-wider-bright" = "fedora-wider"
{
 bg[SELECTED] = shade (1.040897799, @selected_bg_color)
}

style "fedora-button" = "fedora-wider"
{
 bg[NORMAL]   =  shade (1.02,@bg_color)
  bg[ACTIVE]   =  shade (0.85,@bg_color)
 bg[PRELIGHT] =  mix(0.90, shade (1.05,@bg_color), @selected_bg_color)
}

style "fedora-notebook" = "fedora-wide-bright"
{
 bg[ACTIVE]    = shade (0.80, @bg_color)
   bg[INSENSITIVE] = shade (0.9221, @bg_color)
   bg[NORMAL]      = shade (1.0346, @bg_color)
 bg[PRELIGHT]  = lighter (@bg_color)
}

style "fedora-menubar" = "fedora-default"
{
# bg[NORMAL] = mix (0.8, lighter(@bg_color), shade(1.040897799,
@selected_bg_color))
# bg[NORMAL] = shade (1.02, @bg_color)
}

style "fedora-panel-menubar" = "fedora-menubar"
{
 fg[PRELIGHT] = @selected_fg_color
 text[PRELIGHT] = @selected_fg_color
}


style "fedora-menu" = "fedora-default"
{
 xthickness = 2

 bg[NORMAL] = @base_color
}

style "fedora-menu-item" = "fedora-default"
{
 xthickness = 3
 ythickness = 3

 bg[PRELIGHT] = @bg_color
 bg[SELECTED] = shade (0.9, @selected_bg_color)
 fg[PRELIGHT] = @selected_fg_color
 text[PRELIGHT] = @selected_fg_color
}

style "fedora-tree" = "fedora-wide"
{
 bg[ACTIVE] = shade (0.9, @bg_color)
}

style "fedora-frame-title" = "fedora-default"
{
 fg[NORMAL] = lighter (@fg_color)
}

style "fedora-tooltips"
{
 xthickness = 4
 ythickness = 4

 bg[NORMAL] = @tooltip_bg_color
 fg[NORMAL] = @tooltip_fg_color
}

style "fedora-progressbar" = "fedora-wide-bright"
{
   bg[NORMAL]      = shade (0.80, @bg_color)
   bg[SELECTED]    = @selected_bg_color
 fg[PRELIGHT] = shade(1.1946, @selected_fg_color)
}

style "fedora-combo" = "fedora-button"
{
}

style "fedora-status" = "fedora-wide"
{
 GtkStatusbar ::shadow-type = GTK_SHADOW_IN
}

style "fedora-entry" = "fedora-button"
{
}

style "fedora-scrollbar" = "fedora-button"
{
 text[NORMAL]  = shade (0.2, @bg_color)
 text[PRELIGHT]  = shade (0.2, @bg_color)
 text[ACTIVE]  = @text_color
}

style "fedora-scale" = "fedora-button"
{

 GtkRange ::trough-side-details = 0
 GtkRange ::slider_width  = 16

 bg[SELECTED]    = shade (1.1, @selected_bg_color)
 fg[PRELIGHT] = shade(1.1946, @selected_fg_color)
}

style "fedora-checkbutton" = "fedora-button"
{
 bg[PRELIGHT] = @bg_color
}

style "fedora-spin-button" = "fedora-entry"
{
}

# widget styles
class "GtkWidget" style "fedora-default"
class "GtkButton" style "fedora-button"
class "GtkCombo" style "fedora-combo"
class "GtkRange" style "fedora-wide-bright"
class "GtkFrame" style "fedora-wide"
class "GtkMenu"  style "fedora-menu"
class "GtkEntry" style "fedora-entry"
class "GtkMenuItem" style "fedora-menu-item"
class "GtkNotebook" style "fedora-notebook"
class "GtkProgressBar" style "fedora-progressbar"
class "GtkMenuBar" style "fedora-menubar"
class "GtkStatusbar" style "fedora-status"
class "GtkScrollbar" style "fedora-scrollbar"
class "GtkHBox"  style "fedora-wider"
class "GtkScale" style "fedora-scale"
class "GtkCheckButton" style "fedora-checkbutton"
class "GtkSpinButton" style "fedora-spin-button"

widget_class "*MenuItem.*"  style "fedora-menu-item"

# combobox stuff
widget_class "*.GtkComboBox.GtkButton" style "fedora-combo"
widget_class "*.GtkCombo.GtkButton" style "fedora-combo"
widget_class "*.GtkComboBox.GtkFrame" style "fedora-wider"

# tooltips stuff
widget "gtk-tooltip*"   style "fedora-tooltips"

# treeview stuff
widget_class "*.GtkTreeView.GtkButton" style "fedora-tree"
widget_class "*.GtkCTree.GtkButton" style "fedora-tree"
widget_class "*.GtkList.GtkButton" style "fedora-tree"
widget_class "*.GtkCList.GtkButton" style "fedora-tree"
widget_class "*.GtkFrame.GtkLabel" style "fedora-frame-title"

# notebook stuff
widget_class "*.GtkNotebook.*.GtkEventBox" style "fedora-notebook"
widget_class "*.GtkNotebook.*.GtkViewport" style "fedora-notebook"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"  style "fedora-notebook"
widget_class "*<GtkNotebook>*<GtkLayout>"       style "fedora-notebook"

# these should really use base and text colors instead
widget_class "*GtkCTree*" style "evolution-hack-tree"
widget_class "*GtkList*" style "evolution-hack-tree"
widget_class "*GtkCList*" style "evolution-hack-tree"
widget_class "*.ETree.*" style "evolution-hack-tree"
widget_class "*EInfoLabel*" style "evolution-hack"

#panel bg hack
widget "*Panel*Menu*"  style "fedora-panel-menubar"

#evolution new button workaround (should be fixed in Evo 2.24)
style "fedora-evo-new-button-workaround"
{
 engine "nodoka"
 {
  toolbarstyle = 0
 }
}

widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*"
style "fedora-evo-new-button-workaround"

widget_class "*.<GtkProgress>"    style "fedora-progressbar"
Comment 4 Martin Sourada 2008-11-01 06:57:35 EDT
That's really odd, furthermore I don't see the problem on my rawhide install and cannot find any piece of code that might cause this. So I added some messages, that outputs to terminal, to see if the parameters sent to the drawing function are sent correctly. Could you please install these packages [1][2] and run some gtk application from terminal and post here the output on terminal when you open its menu? Thanks.

[1] http://mso.fedorapeople.org/packages/RPMS/i386/gtk-nodoka-engine-0.7.1.80-0.1.fc10.i386.rpm
[2] http://mso.fedorapeople.org/packages/RPMS/i386/gtk-nodoka-engine-extras-0.7.1.80-0.1.fc10.i386.rpm
Comment 5 Yao Ziyuan 2008-11-01 07:45:53 EDT
I installed (rpm -Uvh) these 2 rpms and then started gedit from console.

When clicking the main menu "File", it outputs:

Detail: menuitem
Menu bar.
params:
	active
	prelight
	focus
	ltr
	state: selected
	roundness: 3
	gradients

Then the mouse moves to File|New:

Detail: menuitem
Not menu bar.
params:
	prelight
	ltr
	state: selected
	roundness: 3
	gradients

Then the mouse moves back to File:

Detail: menuitem
Menu bar.
params:
	active
	prelight
	focus
	ltr
	state: selected
	roundness: 3
	gradients
Comment 6 Martin Sourada 2008-11-01 09:21:35 EDT
Hm... the output looks as it should... I added more messages, this time directly to the drawing function. Please try again with [1][2].

[1] http://mso.fedorapeople.org/packages/RPMS/i386/gtk-nodoka-engine-0.7.1.80-0.2.fc10.i386.rpm
[2] http://mso.fedorapeople.org/packages/RPMS/i386/gtk-nodoka-engine-extras-0.7.1.80-0.2.fc10.i386.rpm
Comment 7 Yao Ziyuan 2008-11-01 09:47:25 EDT
This time:

Clicking on "File":

Detail: menuitem
Menu bar.
params:
	active
	prelight
	focus
	ltr
	state: selected
	roundness: 3
	gradients
draw_menuitem
	color: R: 0.037934 G: 0.485817 B: 0.720882
drawing gradient

Moving onto File|New:

Detail: menuitem
Menu bar.
params:
	active
	prelight
	focus
	ltr
	state: selected
	roundness: 3
	gradients
draw_menuitem
	color: R: 0.037934 G: 0.485817 B: 0.720882
drawing gradient

Detail: menuitem
Not menu bar.
params:
	prelight
	ltr
	state: selected
	roundness: 3
	gradients
draw_menuitem
	color: R: 0.037934 G: 0.485817 B: 0.720882
drawing gradient


Moving back onto File:

Detail: menuitem
Menu bar.
params:
	active
	prelight
	focus
	ltr
	state: selected
	roundness: 3
	gradients
draw_menuitem
	color: R: 0.037934 G: 0.485817 B: 0.720882
drawing gradient


I suspect this bug has something to do with low-level, hardware-related operations, because drawing a rounded main menu entry involves more complex bitmap manipulations such as preparing a gradient and rounded (means there can be an alpha channel) menu entry bitmap and then posting this translucent bitmap onto the menubar (just my guess). But note that my computer can render Fedora 9's Nodoka theme perfectly (when I was in Fedora 9).

In the meanwhile, I'm going to finish the download of Fedora-10-Snap3-i686-Live CD image in 1 hour and 40 minutes. Then I will be able to write this image onto a USB hard disk and reboot my computer with this fresh F10 snap3 Live OS and see if my hardware can render the fresh F10 perfectly.
Comment 8 Yao Ziyuan 2008-11-01 10:07:07 EDT
I mean, if it is really caused by low level things, Nodoka-Squared is not affected maybe because drawing a squared menu item on a menubar does not involve blending a translucent bitmap onto the menubar.
Comment 9 Yao Ziyuan 2008-11-01 13:09:29 EDT
I just ran Fedora-10-Snap3-i686-Live, and this fresh f10 snap3 also has the same issue (as in http://i34.tinypic.com/212ziuf.png).

Also remember my computer has no problem drawing F9's Nodoka menus.

So, the cause can be any one or combination of:
(1) The f10 Nodoka engine has changed the way it makes low-level calls to draw menus;
(2) F10's radeon video driver has changed;
(3) Other middle layers (GTK, Linux kernel, ...) have changed.

My video card is "ATI Technologies Inc RV280 [Radeon 9200]", and the driver is "radeon". I think it represents a significant portion of users.

Possible solutions are: reverting the above 1, 2 and/or 3 to their F9 states.
Comment 10 Yao Ziyuan 2008-11-01 13:13:38 EDT
Or, let f10 Nodoka engine be able to draw squared menus but rounded (roundness=3) controls for radeon users.
Comment 11 Martin Sourada 2008-11-01 18:48:25 EDT
I'd suspect cairo or the radeon video driver, nevertheless I am still a bit concerned if it cannot be fixed on my part. So I've took much closer look at the code and found that there is difference between drawing rounded (2+) menus and (nearly) not rounded (0,1) menus. The drawing functions do something like this:

roundness >= 2:
set shape (for fill)
set gradient
clip region but preserve shape (I don't really recall why this is present, the result looks pretty much the same if I remove it)
draw fill
set shape (for outline)
set colour
draw outline

roundness <= 1:
set shape (for fill)
set gradient
draw fill
set shape (for outline)
set colour
draw outline

As you see, there is a region clipped between setting the gradient and drawing the fill, so I suspect something might cause removing/changing the gradient during that. So I little optimized the drawing function to avoid that. If that does not help, than I really don't know what might... (There hasn't been any changes in this particular drawing function in nodoka since it became default in fedora, IIRC)

Try these packages:
http://mso.fedorapeople.org/packages/RPMS/i386/gtk-nodoka-engine-0.7.1.80-0.3.fc10.i386.rpm
http://mso.fedorapeople.org/packages/RPMS/i386/gtk-nodoka-engine-extras-0.7.1.80-0.3.fc10.i386.rpm
Comment 12 Yao Ziyuan 2008-11-01 19:14:22 EDT
I applied these 2 rpms and yes it works!
Comment 13 Martin Sourada 2008-11-01 19:21:08 EDT
(In reply to comment #12)
> I applied these 2 rpms and yes it works!

That's great! I'll fix it in Fedora probably tomorrow then (going to sleep now).
Comment 14 Yao Ziyuan 2008-11-01 19:22:47 EDT
Here is a screenshot of how it looks now:
http://i36.tinypic.com/mbswt4.png

You can see the menu and controls (e.g. buttons) are OK now.
Comment 15 Yao Ziyuan 2008-11-01 19:24:21 EDT
And to be more considerate, you can put some comments in the source code documenting this issue so as to prevent future regressions.
Comment 16 Yao Ziyuan 2008-11-01 21:26:07 EDT
I've just found that the radeon driver is also responsible for another misdrawing. This time it is about Firefox and affects gtk themes other than Nodoka (e.g. Aurora).

1. Firefox in Fedora 10 Snapshot 3 Live CD running in VirtualBox:
http://i37.tinypic.com/a47erc.png

2. Firefox in Fedora 10 Snapshot 3 running in a real computer with Radeon:
http://i36.tinypic.com/4h88xh.png

Note the difference is the Address box and the Search box have different background colors. What's more, any text entered in these boxes in the Radeon case will have white background (and the rest of the text box is still in light gray. And, if I right click such a text box to bring up the right-click menu and then click elsewhere to cancel the menu, the region in the text box previously beneath the menu will become white. So the problem is the text boxes should be white initially.

Since this is turning into a bug in the radeon driver, can you bring in some radeon driver developer into this bug report's Assignees? Or should I start a new bug report?
Comment 17 Yao Ziyuan 2008-11-01 21:27:44 EDT
Correction: Not "themes other than Nodoka", but "more themes than just Nodoka".

> I've just found that the radeon driver is also responsible for another
misdrawing. This time it is about Firefox and affects gtk themes other than
Nodoka (e.g. Aurora).
Comment 18 Martin Sourada 2008-11-02 03:51:52 EST
Hm... that's interesting misrendering. I've checked the code and this time it seems I cannot even workaround it in nodoka. Can you file a different bug for that issue (against the radeon driver)?
Comment 19 Yao Ziyuan 2008-11-02 07:43:40 EST
OK. I started a new bug: https://bugzilla.redhat.com/show_bug.cgi?id=469556
Comment 20 Bug Zapper 2008-11-25 23:34:00 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 21 Martin Sourada 2008-12-06 07:51:47 EST
Forgot to close the bug... It's been fixed in 0.7.2.

Note You need to log in before you can comment on or make changes to this bug.