develop #1
src
debs
solarfm-0-0-1-x64
opt
SolarFM
versions
solarfm-0.0.1
SolarFM
solarfm
__builtins__.py__init__.py__main__.py
shellfm
windows
signal_classes
utils
user_config/usr/share/solarfm
@@ -56,6 +56,11 @@ class Icon(DesktopIconMixin, VideoIconMixin):
|
||||
|
||||
def create_scaled_image(self, path, wxh):
|
||||
try:
|
||||
if path.lower().endswith(".gif"):
|
||||
return GdkPixbuf.PixbufAnimation.new_from_file(path) \
|
||||
.get_static_image() \
|
||||
.scale_simple(wxh[0], wxh[1], GdkPixbuf.InterpType.BILINEAR)
|
||||
else:
|
||||
return GdkPixbuf.Pixbuf.new_from_file_at_scale(path, wxh[0], wxh[1], True)
|
||||
except Exception as e:
|
||||
print("Image Scaling Issue:")
|
||||
|
@@ -115,7 +115,7 @@ class WidgetMixin:
|
||||
def create_grid_iconview_widget(self, view, wid):
|
||||
scroll = Gtk.ScrolledWindow()
|
||||
grid = Gtk.IconView()
|
||||
store = Gtk.ListStore(GdkPixbuf.Pixbuf or None, str)
|
||||
store = Gtk.ListStore(GdkPixbuf.Pixbuf or GdkPixbuf.PixbufAnimation or None, str)
|
||||
|
||||
grid.set_model(store)
|
||||
grid.set_pixbuf_column(0)
|
||||
@@ -156,7 +156,7 @@ class WidgetMixin:
|
||||
def create_grid_treeview_widget(self, view, wid):
|
||||
scroll = Gtk.ScrolledWindow()
|
||||
grid = Gtk.TreeView()
|
||||
store = Gtk.ListStore(GdkPixbuf.Pixbuf or None, str)
|
||||
store = Gtk.ListStore(GdkPixbuf.Pixbuf or GdkPixbuf.PixbufAnimation or None, str)
|
||||
# store = Gtk.TreeStore(GdkPixbuf.Pixbuf or None, str)
|
||||
column = Gtk.TreeViewColumn("Icons")
|
||||
icon = Gtk.CellRendererPixbuf()
|
||||
|
Reference in New Issue
Block a user