#2844 NORM Trial-3: Sugar Icon Size Parameters
Zarro Boogs per Child
bugtracker at laptop.org
Fri Aug 17 05:22:38 EDT 2007
#2844: Sugar Icon Size Parameters
--------------------------+-------------------------------------------------
Reporter: tannewt | Owner: dcbw
Type: enhancement | Status: new
Priority: normal | Milestone: Trial-3
Component: sugar | Version: Git as of bug date
Resolution: | Keywords: icon, size, patch,review?
Verified: 0 |
--------------------------+-------------------------------------------------
Comment (by marco):
Replying to [comment:2 tannewt]:
> It can be used instead of size to resize a rectangular image. The size
property is both the width and height of the resulting image which
restricts the icon to square. With scale it alters the size by
maintaining the aspect ratio of the image.
Ok, this make sense.
{{{
+ width, height = self._get_icon_size(handle)
Just initialize those before the if block and adjust the if block logic
accordingly.
+ width=int(width*self._scale)
+ height=int(height*self._scale)
Style should be:
width = int(width * self._scale)
...
}}}
> Typically, they should be a standard size but not necessarily. I've
written a Creative Commons license selector widgets based on CanvasIcon
and ToolButton. The reason I need rectangular icons is because each CC
license is represented by as many as 3 icons next to each other. Thus the
icon is approximately three times as wide as it is high.
I think it's a very infrequent use case for toolbars, I don't think sugar
should provide API for it. You can easily do it by using set_icon_widget.
So please remove the toolbutton.py part from the patch.
{{{
- gobject.GObject.__init__(self, **kwargs)
+ self._data = None
+ gtk.Image.__init__(self, **kwargs)
+ self.props.icon_size = size
}}}
I think we should remove the size argument from the constructor. We should
just respect the icon_size gtk.Image property.
{{{
-
+
}}}
There are several of these in the patch. You are just adding spaces,
please kill them.
Thanks!
--
Ticket URL: <http://dev.laptop.org/ticket/2844#comment:3>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list