develop #1
|
@ -56,9 +56,7 @@ class Icon(DesktopIconMixin, VideoIconMixin):
|
|||
|
||||
def create_scaled_image(self, path, wxh):
|
||||
try:
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file(path)
|
||||
scaled_pixbuf = pixbuf.scale_simple(wxh[0], wxh[1], 2) # 2 = BILINEAR and is best by default
|
||||
return scaled_pixbuf
|
||||
return GdkPixbuf.Pixbuf.new_from_file_at_scale(path, wxh[0], wxh[1], True)
|
||||
except Exception as e:
|
||||
print("Image Scaling Issue:")
|
||||
print( repr(e) )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Python imports
|
||||
import os, threading, subprocess
|
||||
import os, threading, subprocess, time
|
||||
|
||||
# Lib imports
|
||||
import gi
|
||||
|
@ -26,7 +26,7 @@ class WidgetMixin:
|
|||
dir = view.get_current_directory()
|
||||
files = view.get_files()
|
||||
|
||||
icon = GdkPixbuf.Pixbuf.new_from_file(view.DEFAULT_ICON)
|
||||
icon = GdkPixbuf.Pixbuf()
|
||||
for i, file in enumerate(files):
|
||||
store.append([icon, file[0]])
|
||||
self.create_icon(i, view, store, dir, file[0])
|
||||
|
@ -49,6 +49,10 @@ class WidgetMixin:
|
|||
|
||||
try:
|
||||
itr = store.get_iter(i)
|
||||
except Exception as e:
|
||||
try:
|
||||
time.sleep(0.2)
|
||||
itr = store.get_iter(i)
|
||||
except Exception as e:
|
||||
print(":Invalid Itr detected: (Potential race condition...)")
|
||||
print(f"Index Requested: {i}")
|
||||
|
|
Loading…
Reference in New Issue