Skip to content

Commit

Permalink
Set window icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Winand committed Mar 24, 2021
1 parent 94045a1 commit 4c8e857
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 1 deletion.
2 changes: 2 additions & 0 deletions assets/ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ Sun and dawn icons by [Raj Dev](https://freeicons.io/profile/714) on [freeicons.

Lamp icon made by [Good Ware](https://www.flaticon.com/authors/good-ware) from [www.flaticon.com](https://www.flaticon.com/)

Icon color inverted using Inkscape

SVG converted using [RedKetchup - Icon Editor](https://redketchup.io/icon-editor)
Binary file removed assets/dawn.png
Binary file not shown.
Binary file removed assets/lightbulb.ico
Binary file not shown.
Binary file removed assets/lightbulb.png
Binary file not shown.
Binary file removed assets/sun.png
Binary file not shown.
Binary file renamed assets/dawn.ico → assets/sun_white.ico
Binary file not shown.
85 changes: 85 additions & 0 deletions assets/sun_white.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion main_tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
root.state('iconic')
root.bind('<Map>', lambda event: root.destroy())

# don't group (called before `update`)
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('winand.screen_on')
root.update()
top_level_hwnd = ctypes.windll.user32.GetParent(root.winfo_id())
root.iconbitmap('assets/sun_white.ico') # called after `update`

bar = ITaskBarList3()
top_level_hwnd = ctypes.windll.user32.GetParent(root.winfo_id())
bar.SetProgressValue(top_level_hwnd, 1, 1)
bar.SetProgressState(top_level_hwnd, 8)

Expand Down

0 comments on commit 4c8e857

Please sign in to comment.