small cleanups
This commit is contained in:
parent
c16da39330
commit
e6fe296b92
|
@ -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) )
|
||||
|
|
|
@ -80,7 +80,7 @@ class Settings:
|
|||
fpdf = ('.pdf')
|
||||
|
||||
|
||||
# Dire structure check
|
||||
# Dir structure check
|
||||
if path.isdir(REMUX_FOLDER) == False:
|
||||
os.mkdir(REMUX_FOLDER)
|
||||
|
||||
|
|
Loading…
Reference in New Issue