small cleanups

This commit is contained in:
itdominator 2021-11-27 01:59:20 -06:00
parent c16da39330
commit e6fe296b92
4 changed files with 5 additions and 10 deletions

View File

@ -3,17 +3,12 @@ import os, subprocess, threading, hashlib
from os.path import isfile
# Gtk imports
import gi
gi.require_version('Gtk', '3.0')
# from gi.repository import Gtk
from gi.repository import GdkPixbuf
# Application imports
from .mixins import *
def threaded(fn):
def wrapper(*args, **kwargs):
threading.Thread(target=fn, args=args, kwargs=kwargs).start()
@ -61,9 +56,9 @@ class Icon(DesktopIconMixin, VideoIconMixin):
def create_scaled_image(self, path, wxh):
try:
pixbuf = GdkPixbuf.Pixbuf.new_from_file(path)#.get_pixbuf()
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 # Gtk.Image.new_from_pixbuf(scaled_pixbuf)
return scaled_pixbuf
except Exception as e:
print("Image Scaling Issue:")
print( repr(e) )

View File

@ -80,7 +80,7 @@ class Settings:
fpdf = ('.pdf')
# Dire structure check
# Dir structure check
if path.isdir(REMUX_FOLDER) == False:
os.mkdir(REMUX_FOLDER)