added background fill; added info load per image

This commit is contained in:
2023-09-24 16:39:18 -05:00
parent f10c6d9afd
commit b6d2e9ec54
5 changed files with 27 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
# Python imports
from os.path import getsize
import inspect
# Lib imports
@@ -74,7 +75,6 @@ class ImageView(ImageViewMixin, Gtk.Image):
self.animation = None
self._stop_animation()
event_system.emit("update_path_label", (path,))
if path.endswith(".gif"):
self.set_as_gif(path)
return
@@ -86,6 +86,12 @@ class ImageView(ImageViewMixin, Gtk.Image):
self.set_as_static(path)
self.pixbuff = self.work_pixbuff.copy()
width = self.pixbuff.get_width()
height = self.pixbuff.get_height()
size = sizeof_fmt( getsize(path) )
path = f"{path} | {width} x {height} | {size}"
event_system.emit("update_path_label", (path,))
if self.fit_to_win:
self._fit_to_container()
else: