kivy: Window Application icon doesn't work
on windows platform with kivy 1.8.0 ‘portable package’, App.icon
doesn’t set the window icon, tested with the following code:
from kivy.app in App
class MyApp(App):
def build(self):
self.icon = 'myicon.png'
if __name__ == '__main__':
MyApp().run()
example from the kivy.App documentation
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
About this issue
- Original URL
- State: open
- Created 10 years ago
- Reactions: 1
- Comments: 23 (8 by maintainers)
Links to this issue
Commits related to this issue
- attempting to add window icon for gui app (fail) This isn't at all working for Linux, but I think it may be due to a bug in kivy. Anyway, I'm committing this so it will build and I can test it out on... — committed to BusKill/buskill-app by maltfield 4 years ago
- overwriting the kivy icons with our icons to force-fix icons in our linux AppImage due to this bug * https://github.com/kivy/kivy/issues/2202 — committed to BusKill/buskill-app by maltfield 4 years ago
- attempting to add the icon for MacOS builds The last build got the icon working in Linux (at least in QubesOS--there may be other issues related to Ubuntu and distros that demand a .desktop file) *... — committed to BusKill/buskill-app by maltfield 4 years ago
Bug still present on Ubuntu 16.04 and Kivy 1.9.2.
One reason is because the icon doesn’t appear on Ubuntu Unity is because that OS relies on .desktop files. On my blog, I describe a handy workaround:
~~http://www.indeliblebluepen.com/?p=1012~~
https://dev.to/codemouse92/icons-python-and-ubuntu
@maltfield Hm, it appears it wasn’t archived, however, I DID republish it on DEV a while back! (I’d forgotten).
https://dev.to/codemouse92/icons-python-and-ubuntu
@yukkidev I was able to get this working in my project, you may be able to use it for a reference: https://github.com/n2qzshce/ham-radio-sync/blob/1819c70019f9e42140b056b76b082bb0208454af/src/ui/app_window.py#L135
Ah, yes it is. I’ll have to run it through internet archive later.
Is there a fix for this?