@@ -47,10 +47,11 @@ def __init__(self, label, accel_string):
4747 self .label = _ (label )
4848
4949class Row ():
50- def __init__ (self , row_meta = None , keyfile = None , path = None , enabled = True ):
50+ def __init__ (self , row_meta = None , keyfile = None , path = None , enabled = True , scale_factor = 1 ):
5151 self .keyfile = keyfile
5252 self .row_meta = row_meta
5353 self .enabled = enabled
54+ self .scale_factor = scale_factor
5455 self .path = path # PosixPath
5556
5657 def get_icon_string (self , original = False ):
@@ -81,7 +82,7 @@ def get_icon_type_and_data(self, original=False):
8182
8283 if icon_string .startswith ("/" ):
8384 pixbuf = GdkPixbuf .Pixbuf .new_from_file_at_size (icon_string , 16 , 16 )
84- surface = Gdk .cairo_surface_create_from_pixbuf (pixbuf , self .main_window . get_scale_factor () , None )
85+ surface = Gdk .cairo_surface_create_from_pixbuf (pixbuf , self .scale_factor , None )
8586 return ("surface" , surface )
8687
8788 return ("icon-name" , icon_string )
@@ -501,6 +502,7 @@ def load_installed_actions(self):
501502
502503 def fill_model (self , model , parent , items , installed_actions ):
503504 disabled_actions = self .nemo_plugin_settings .get_strv ("disabled-actions" )
505+ scale_factor = self .main_window .get_scale_factor ()
504506
505507 for item in items :
506508 row_type = item .get ("type" )
@@ -514,7 +516,7 @@ def fill_model(self, model, parent, items, installed_actions):
514516 print ("Ignoring missing installed action %s" % uuid )
515517 continue
516518
517- iter = model .append (parent , [new_hash (), uuid , row_type , Row (item , kf , path , path .name not in disabled_actions )])
519+ iter = model .append (parent , [new_hash (), uuid , row_type , Row (item , kf , path , path .name not in disabled_actions , scale_factor )])
518520
519521 del installed_actions [uuid ]
520522 elif row_type == ROW_TYPE_SEPARATOR :
@@ -537,7 +539,7 @@ def push_disabled(key):
537539
538540 for uuid , (path , kf ) in sorted_actions .items ():
539541 enabled = path .name not in disabled_actions
540- model .append (parent , [new_hash (), uuid , ROW_TYPE_ACTION , Row (None , kf , path , enabled )])
542+ model .append (parent , [new_hash (), uuid , ROW_TYPE_ACTION , Row (None , kf , path , enabled , scale_factor )])
541543
542544 def save_disabled_list (self ):
543545 disabled = []
0 commit comments