MCPcopy Index your code
hub / github.com/rawpython/remi / set_icon_file

Method set_icon_file

remi/gui.py:1340–1348  ·  view source on GitHub ↗

Allows to define an icon for the App Args: filename (str): the resource file name (ie. "/res:myicon.png") rel (str): leave it unchanged (standard "icon")

(self, filename, rel="icon")

Source from the content-addressed store, hash-verified

1338 self.set_title(title)
1339
1340 def set_icon_file(self, filename, rel="icon"):
1341 """ Allows to define an icon for the App
1342
1343 Args:
1344 filename (str): the resource file name (ie. "/res:myicon.png")
1345 rel (str): leave it unchanged (standard "icon")
1346 """
1347 mimetype, encoding = mimetypes.guess_type(filename)
1348 self.add_child("favicon", '<link rel="%s" href="%s" type="%s" />'%(rel, filename, mimetype))
1349
1350 def set_icon_data(self, base64_data, mimetype="image/png", rel="icon"):
1351 """ Allows to define an icon for the App

Callers 1

mainMethod · 0.80

Calls 1

add_childMethod · 0.80

Tested by

no test coverage detected