Revert "Set width/height the right way"

This reverts commit 0eaa29ee9d.
This commit is contained in:
Dan Williams 2007-01-26 11:28:45 -05:00
parent 556085dbf8
commit 759c477e1f

View File

@ -145,8 +145,6 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
self._buffers = {}
self._cur_buffer = None
self._size = 24
self.props.box_width = self._size
self.props.box_height = self._size
self._color = None
self._icon_name = None
self._cache = False
@ -177,8 +175,6 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
if self._size != value and not self._cache:
self._clear_buffers()
self._size = value
self.props.box_width = value
self.props.box_height = value
self.emit_request_changed()
elif pspec.name == 'cache':
self._cache = value
@ -233,5 +229,11 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
cr.set_source_surface(buf, x, y)
cr.paint()
def do_get_width_request(self):
return self._size
def do_get_height_request(self, for_width):
return self._size
def _button_press_event_cb(self, item, event):
item.emit_activated()