Example #1
0
 def _produce_item(self, value):
     tile = widgets.PhotoTile()
     self._prepare_item(tile)
     tile.style_class = "PisakSymbolerPhotoTileLabel"
     tile.hilite_tool = widgets.Aperture()
     tile.set_background_color(colors.LIGHT_GREY)
     tile.scale_mode = Mx.ImageScaleMode.FIT
     tile.preview_path = dirs.get_symbol_path(value)
     tile.label_text = value
     return tile
Example #2
0
 def _produce_item(self, value):
     tile = widgets.PhotoTile()
     self._prepare_item(tile)
     tile.style_class = "PisakSymbolerPhotoTileLabel"
     tile.hilite_tool = widgets.Aperture()
     tile.set_background_color(colors.LIGHT_GREY)
     tile.scale_mode = Mx.ImageScaleMode.FIT
     tile.preview_path = dirs.get_symbol_path(value)
     tile.label_text = value
     return tile
Example #3
0
 def _generate_symbol(self, name):
     symbol = widgets.PhotoTile()
     symbol.label.set_style_class("PisakSymbolerPhotoTileLabel")
     symbol.label_text = name
     symbol.set_y_expand(True)
     symbol.ratio_width = self.tile_ratio_width
     symbol.ratio_spacing = self.tile_ratio_spacing
     symbol.preview_ratio_width = self.tile_preview_ratio_width
     symbol.preview_ratio_height = self.tile_preview_ratio_height
     symbol.scale_mode = Mx.ImageScaleMode.FIT
     try:
         symbol.preview_path = dirs.get_symbol_path(name)
     except FileNotFoundError as exc:
         _LOG.error(exc)
     return symbol
Example #4
0
 def _generate_symbol(self, name):
     symbol = widgets.PhotoTile()
     symbol.label.set_style_class("PisakSymbolerPhotoTileLabel")
     symbol.label_text = name
     symbol.set_y_expand(True)
     symbol.ratio_width = self.tile_ratio_width
     symbol.ratio_spacing = self.tile_ratio_spacing
     symbol.preview_ratio_width = self.tile_preview_ratio_width
     symbol.preview_ratio_height = self.tile_preview_ratio_height
     symbol.scale_mode = Mx.ImageScaleMode.FIT
     try:
         symbol.preview_path = dirs.get_symbol_path(name)
     except FileNotFoundError as exc:
         _LOG.error(exc)
     return symbol