Opened 14 years ago
Closed 9 years ago
#1305 closed defect (obsolete)
gtk.Image().set_from_icon_name() provides incorrectly scaled icon image
Reported by: | garycmartin | Owned by: | alsroot |
---|---|---|---|
Priority: | Low | Milestone: | Unspecified |
Component: | Sugar | Version: | Git as of bugdate |
Severity: | Unspecified | Keywords: | |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | Unconfirmed |
Description
Using:
image = gtk.Image() image.set_from_icon_name('insert-table', -1)
... to generate an image to place into a gtk.Button (in the toolbar) seems to be acquiring an incorrectly sized icon. When sugar scaling is set to 75 the icon is too large, and when set to 100 it is a little too small.
Code exhibiting the issue can be seen at line 187:
http://git.sugarlabs.org/projects/write/repos/garycmartins-toolbar-clone/blobs/master/toolbar.py
Change History (8)
comment:1 Changed 14 years ago by alsroot
- Owner changed from tomeu to alsroot
- Status changed from new to assigned
comment:2 Changed 14 years ago by alsroot
- Priority changed from Unspecified by Maintainer to Normal
comment:3 follow-up: ↓ 5 Changed 14 years ago by tomeu
comment:4 Changed 14 years ago by tomeu
- Milestone changed from Unspecified by Release Team to 0.86
comment:5 in reply to: ↑ 3 Changed 14 years ago by garycmartin
- Priority changed from Normal to Low
Replying to tomeu:
Aren't we doing the same in other parts of Sugar? Maybe the icon doesn't follow the guidelines in the HIG?
Already checked the svg icon, it is fine, and it looks fine when added as a toolbar button. It is just when using set_from_icon_name() that the size doesn't match the rest of what sugar is doing. Note that I'm using this for abiword.TableCreator() as it doesn't take parameters for an icon to use (if you leave it alone it shows a blurry grey bitmap). As TableCreator() is a child of GtkButton, I went for using set_from_icon_name() to try and provide the correct sugar icon.
comment:6 Changed 10 years ago by dnarvaez
- Milestone changed from 0.86 to Unspecified
comment:7 Changed 9 years ago by godiard
This in not needed anymore in Write activity.
Closing as not related to sugar.
comment:8 Changed 9 years ago by godiard
- Resolution set to obsolete
- Status changed from assigned to closed
Aren't we doing the same in other parts of Sugar? Maybe the icon doesn't follow the guidelines in the HIG?
I see that we are passing gtk.ICON_SIZE_LARGE_TOOLBAR instead of -1 in the control panel.