Small quick fixes
This commit is contained in:
parent
23007ef215
commit
2cc48b8688
Binary file not shown.
@ -208,6 +208,8 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="row_spacing">10</property>
|
||||||
|
<property name="column_spacing">10</property>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
</child>
|
</child>
|
||||||
|
@ -8,14 +8,15 @@ from gi.repository import Gtk as gtk
|
|||||||
from gi.repository import Gio as gio
|
from gi.repository import Gio as gio
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
|
|
||||||
import os, hashlib
|
import os, subprocess, hashlib
|
||||||
from os.path import isdir, isfile, join
|
from os.path import isdir, isfile, join
|
||||||
|
|
||||||
|
|
||||||
class Icon:
|
class Icon:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.GTK_ORIENTATION = 1 # HORIZONTAL (0) VERTICAL (1)
|
self.GTK_ORIENTATION = 1 # HORIZONTAL (0) VERTICAL (1)
|
||||||
self.iconImageWxH = [64, 64]
|
self.iconImageWxH = [128, -1]
|
||||||
|
self.iconSystem = [72, 72]
|
||||||
self.iconWxH = [128, -1]
|
self.iconWxH = [128, -1]
|
||||||
self.iconMargins = 8
|
self.iconMargins = 8
|
||||||
self.usrHome = os.path.expanduser('~')
|
self.usrHome = os.path.expanduser('~')
|
||||||
@ -60,8 +61,8 @@ class Icon:
|
|||||||
elif file.lower().endswith(imagesList):
|
elif file.lower().endswith(imagesList):
|
||||||
thumbnl = self.createGtkImage(fullPathFile, self.iconImageWxH)
|
thumbnl = self.createGtkImage(fullPathFile, self.iconImageWxH)
|
||||||
else:
|
else:
|
||||||
thumbPth = self.getSystemThumbnail(fullPathFile, self.iconImageWxH[0])
|
thumbPth = self.getSystemThumbnail(fullPathFile, self.iconSystem[0])
|
||||||
thumbnl = self.createGtkImage(thumbPth, self.iconImageWxH)
|
thumbnl = self.createGtkImage(thumbPth, self.iconSystem)
|
||||||
|
|
||||||
return thumbnl
|
return thumbnl
|
||||||
|
|
||||||
|
@ -208,6 +208,8 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="row_spacing">10</property>
|
||||||
|
<property name="column_spacing">10</property>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
</child>
|
</child>
|
||||||
|
@ -8,14 +8,15 @@ from gi.repository import Gtk as gtk
|
|||||||
from gi.repository import Gio as gio
|
from gi.repository import Gio as gio
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
|
|
||||||
import os, hashlib
|
import os, subprocess, hashlib
|
||||||
from os.path import isdir, isfile, join
|
from os.path import isdir, isfile, join
|
||||||
|
|
||||||
|
|
||||||
class Icon:
|
class Icon:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.GTK_ORIENTATION = 1 # HORIZONTAL (0) VERTICAL (1)
|
self.GTK_ORIENTATION = 1 # HORIZONTAL (0) VERTICAL (1)
|
||||||
self.iconImageWxH = [64, 64]
|
self.iconImageWxH = [128, -1]
|
||||||
|
self.iconSystem = [72, 72]
|
||||||
self.iconWxH = [128, -1]
|
self.iconWxH = [128, -1]
|
||||||
self.iconMargins = 8
|
self.iconMargins = 8
|
||||||
self.usrHome = os.path.expanduser('~')
|
self.usrHome = os.path.expanduser('~')
|
||||||
@ -60,8 +61,8 @@ class Icon:
|
|||||||
elif file.lower().endswith(imagesList):
|
elif file.lower().endswith(imagesList):
|
||||||
thumbnl = self.createGtkImage(fullPathFile, self.iconImageWxH)
|
thumbnl = self.createGtkImage(fullPathFile, self.iconImageWxH)
|
||||||
else:
|
else:
|
||||||
thumbPth = self.getSystemThumbnail(fullPathFile, self.iconImageWxH[0])
|
thumbPth = self.getSystemThumbnail(fullPathFile, self.iconSystem[0])
|
||||||
thumbnl = self.createGtkImage(thumbPth, self.iconImageWxH)
|
thumbnl = self.createGtkImage(thumbPth, self.iconSystem)
|
||||||
|
|
||||||
return thumbnl
|
return thumbnl
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user