#3835 closed defect (fixed)
Icon/EventIcon: badge is not drawn at the correct position
Reported by: | erikos | Owned by: | erikos |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | 0.97.x |
Severity: | Critical | Keywords: | shell-port 13.1.0 |
Cc: | Distribution/OS: | Fedora | |
Bug Status: | New |
Description
Has to be fixed for the shell port (we draw badges in the Neighborhood View (AP icons)).
Patch to test with HelloWorld attached.
Attachments (2)
Change History (9)
Changed 11 years ago by erikos
comment:1 Changed 11 years ago by erikos
Test patch for the toolkit-gtk3:
diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index c10273e..956ea44 100644
--- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -304,7 +304,7 @@ class _IconBuffer(object): if self.badge_name: context.restore() - context.translate(badge_info.attach_x, badge_info.attach_y) + context.translate(badge_info.attach_x + 10, badge_info.attach_y + 10) self._draw_badge(context, badge_info.size, sensitive, widget) self._surface_cache[cache_key] = surface
comment:2 Changed 11 years ago by dsd
- Keywords 13.1.0 added
comment:3 Changed 11 years ago by manuq
in icon.py, _get_attach_points() is returning (0, 0). The pygi-convert.sh in commit 820efa56 did it:
- attach_points = info.get_attach_points() + return 0,0;has_attach_points_, attach_points = info.get_attach_points()
comment:4 Changed 11 years ago by manuq
Yes the previous patch fixes it. I was confused by the testcase, which is wrong. 'document-open' is not good for a testcase because it doesn't have attach points. They are defined in the artwork .icon files, for example 'network-wireless-000' has:
[Icon Data] AttachPoints=970,850
As per this freedesktop spec.
comment:5 Changed 11 years ago by erikos
- Resolution set to fixed
- Status changed from new to closed
Yeah, pushed as: c0756f48d4f75702e3d419c1737cfdd837dd9ca3
comment:6 Changed 10 years ago by dnarvaez
- Component changed from sugar-toolkit-gtk3 to Sugar
test with HelloWorld