|
|
|
@ -309,7 +309,10 @@ class Icon(gtk.Image):
|
|
|
|
|
if self._buffer.file_name != self.props.file:
|
|
|
|
|
self._buffer.file_name = self.props.file
|
|
|
|
|
|
|
|
|
|
width, height = gtk.icon_size_lookup(self.props.icon_size)
|
|
|
|
|
if self.props.pixel_size == -1:
|
|
|
|
|
width, height = gtk.icon_size_lookup(self.props.icon_size)
|
|
|
|
|
else:
|
|
|
|
|
width = height = self.props.pixel_size
|
|
|
|
|
if self._buffer.width != width or self._buffer.height != height:
|
|
|
|
|
self._buffer.width = width
|
|
|
|
|
self._buffer.height = height
|
|
|
|
@ -323,12 +326,6 @@ class Icon(gtk.Image):
|
|
|
|
|
def _file_changed_cb(self, image, pspec):
|
|
|
|
|
self._buffer.file_name = self.props.file
|
|
|
|
|
|
|
|
|
|
def _update_buffer_size(self):
|
|
|
|
|
width, height = gtk.icon_size_lookup(self.props.icon_size)
|
|
|
|
|
|
|
|
|
|
self._buffer.width = width
|
|
|
|
|
self._buffer.height = height
|
|
|
|
|
|
|
|
|
|
def do_size_request(self, requisition):
|
|
|
|
|
self._sync_image_properties()
|
|
|
|
|
surface = self._buffer.get_surface()
|
|
|
|
|