Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#3658 closed defect (fixed)

ToolbarButton have grey background in Wikipedia activities

Reported by: godiard Owned by: manuq
Priority: High Milestone:
Component: Sugar Version: 0.96.x
Severity: Major Keywords: 12.1.0, patch, olpc-test-passed
Cc: dsd, erikos Distribution/OS: OLPC
Bug Status: Assigned


Tested in os12. The search button (second after the activity button) have a grey background.

Attachments (4)

0001-Search-ToolButton-pass-page-and-icon_name-as-paramet.patch (1.3 KB) - added by manuq 12 years ago.
wikipedia-toolbarbuton.png (16.7 KB) - added by manuq 12 years ago.
This image shows the bug.
0001-ToolButton-add-icon_name-as-a-GObject-property-SL-36.patch (1.2 KB) - added by manuq 12 years ago.
GTK+3 patch
0001-ToolButton-add-icon_name-as-a-GObject-property-SL-36.2.patch (1.2 KB) - added by manuq 12 years ago.
GTK+2 patch

Download all attachments as: .zip

Change History (14)

comment:1 Changed 12 years ago by manuq

Passing page and icon_name as parameters to the ToolButton fixes this.

The attached patch for Wikipedia activity should fix it.

comment:2 Changed 12 years ago by manuq

The issue happens when not passing icon_name to the constructor, and setting it as toolbutton.props.icon_name = 'name' instead.

I will check in sugar-toolkit-gtk3 now.

comment:3 Changed 12 years ago by manuq

  • Cc dsd added

Adding icon_name as a gobject property of ToolButton class would solve this too, in the toolkit. However, I don't see this in GTK2 toolkit.

--- a/src/sugar3/graphics/
+++ b/src/sugar3/graphics/
@@ -120,6 +120,8 @@ class ToolButton(Gtk.ToolButton):
+    icon_name =, setter=set_icon)
     def create_palette(self):
         return None

comment:4 Changed 12 years ago by manuq

This is the current state in both toolkits (gtk2 and gtk3):

Sugar's ToolButton, which inherits from Gtk.ToolButton, has a set_icon() method that adds a Sugar Icon to the widget. If icon_name is passed in the constructor, set_icon method is called. If ToolButton.props.icon_name is changed, set_icon is _not_ called, it is a property of Gtk.ToolButton.

The issue in this particular ticket is that previouly, the Gtk icon looked like the Sugar icon, in GTK3 it looks different.

What do we want? Change Wikipedia, or change both toolkits?

comment:5 Changed 12 years ago by godiard

  • Cc erikos added

Thanks manuq by looking at this.

I think the proper fix is change the toolkits.

Adding erikos to see if he agree.

Changed 12 years ago by manuq

This image shows the bug.

comment:6 Changed 12 years ago by erikos

  • Bug Status changed from Unconfirmed to Assigned
  • Component changed from sugar-artwork to sugar-toolkit
  • Distribution/OS changed from Unspecified to OLPC
  • Milestone changed from Unspecified by Release Team to 0.96
  • Priority changed from Unspecified by Maintainer to High
  • Severity changed from Unspecified to Major
  • Version changed from Unspecified to 0.96.x

Thanks Manuel for the close lookup of this issue. So it sounds like we could trigger the same issue when using that new icon with the old toolkit.

Patch looks good to me. Can you prepare a fancy patch for toolkit-gtk2 and toolkit-gtk3?

comment:7 Changed 12 years ago by manuq

  • Keywords 12.1.0 patch olpc-test-pending added
  • Resolution set to fixed
  • Status changed from new to closed

Thanks erikos for the review. Pushed to both tookkits.

comment:8 Changed 12 years ago by greenfeld

  • Keywords olpc-test-passed added; olpc-test-pending removed

The search button does not have a gray background in OLPC 12.1.0 os16/Wikipedia{EN}-35.

comment:9 Changed 11 years ago by dnarvaez

  • Component changed from sugar-toolkit to Sugar

comment:10 Changed 11 years ago by dnarvaez

  • Milestone 0.96 deleted

Milestone 0.96 deleted

Note: See TracTickets for help on using tickets.