Fixed onload size alloc being incorrect, added settings params

This commit is contained in:
2023-04-28 21:09:44 -05:00
parent 29b32a9dc3
commit 1f0760492b
3 changed files with 19 additions and 13 deletions

View File

@@ -46,18 +46,18 @@ class ImageView(ImageViewMixin, Gtk.Image):
...
def _subscribe_to_events(self):
event_system.subscribe("zoom_out", self._zoom_out)
event_system.subscribe("size_allocate", self._size_allocate)
event_system.subscribe("handle_file_from_dnd", self._handle_file_from_dnd)
event_system.subscribe("vertical_flip", self._vertical_flip)
event_system.subscribe("zoom_out", self._zoom_out)
event_system.subscribe("rotate_left", self._rotate_left)
event_system.subscribe("vertical_flip", self._vertical_flip)
event_system.subscribe("scale_1_two_1", self._scale_1_two_1)
event_system.subscribe("fit_to_container", self._fit_to_container)
event_system.subscribe("horizontal_flip", self._horizontal_flip)
event_system.subscribe("rotate_right", self._rotate_right)
event_system.subscribe("zoom_in", self._zoom_in)
event_system.subscribe("size_allocate", self._size_allocate)
def _load_widgets(self):
...
@@ -85,9 +85,11 @@ class ImageView(ImageViewMixin, Gtk.Image):
if not self.work_pixbuff:
self.set_as_static(path)
self.pixbuff = self.work_pixbuff
self.pixbuff = self.work_pixbuff.copy()
if self.fit_to_win:
self._fit_to_container()
else:
self._scale_1_two_1()
def set_as_gif(self, path):
image = None