def __init__(self, item, view_type, font_height):
     """
         Init widget
         @param item as (int, str, str)
         @param view_type as ViewType
         @param font_height as int
     """
     self.__font_height = font_height
     RoundedFlowBoxWidget.__init__(self, item[0], item[1],
                                   item[1], view_type)
示例#2
0
 def __init__(self, item, art_size):
     """
         Init widget
         @param item as (int, str, str)
         @param art_size as int
     """
     RoundedFlowBoxWidget.__init__(self, item[0], item[1],
                                   item[1], art_size)
     self.connect("realize", self.__on_realize)
     self.connect("destroy", self.__on_destroy)
示例#3
0
 def __init__(self, data, name, sortname, art_size=ArtSize.ROUNDED):
     """
         Init widget
         @param data as object
         @param name as str
         @param sortname as str
         @param art_size as int
     """
     RoundedFlowBoxWidget.__init__(self, data, name, sortname, art_size)
     self.__cover_size = art_size / 3
     self.__cancellable = Gio.Cancellable()
     self.connect("unmap", self.__on_unmap)
示例#4
0
 def __init__(self, data, name, sortname, view_type):
     """
         Init widget
         @param data as object
         @param name as str
         @param sortname as str
         @param art_size as int
     """
     RoundedFlowBoxWidget.__init__(self, data, name, sortname, view_type)
     self._genre = Type.NONE
     self.__album_ids = []
     self.__cancellable = Gio.Cancellable()
     self._scale_factor = self.get_scale_factor()
     self.connect("unmap", self.__on_unmap)
 def __init__(self, item, view_type, font_height):
     """
         Init widget
         @param item as (int, str, str)
         @param view_type as ViewType
         @param font_height as int
     """
     # Get values from DB
     if isinstance(item, int):
         artist_id = item
         artist_name = artist_sortname = App().artists.get_name(artist_id)
     else:
         artist_id = item[0]
         artist_name = item[1]
         artist_sortname = item[2]
     RoundedFlowBoxWidget.__init__(self, artist_id, artist_name,
                                   artist_sortname, view_type, font_height)