#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 |
Description
Tested in os12. The search button (second after the activity button) have a grey background.
Attachments (4)
Change History (14)
Changed 11 years ago by manuq
comment:1 Changed 11 years ago by manuq
comment:2 Changed 11 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 11 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/toolbutton.py +++ b/src/sugar3/graphics/toolbutton.py @@ -120,6 +120,8 @@ class ToolButton(Gtk.ToolButton): self.set_icon_widget(icon) icon.show() + icon_name = GObject.property(type=str, setter=set_icon) + def create_palette(self): return None
comment:4 Changed 11 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 11 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.
comment:6 Changed 11 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 11 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 11 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 10 years ago by dnarvaez
- Component changed from sugar-toolkit to Sugar
Passing page and icon_name as parameters to the ToolButton fixes this.
The attached patch for Wikipedia activity should fix it.