Skip to content

Commit

Permalink
[v3/windows] Add an implementation of the SetIcon method
Browse files Browse the repository at this point in the history
  • Loading branch information
almas1992 authored Dec 21, 2023
1 parent 51afac4 commit 566febc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion v3/pkg/application/application_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,13 @@ func (m *windowsApp) show() {
func (m *windowsApp) on(_ uint) {
}

func (m *windowsApp) setIcon(_ []byte) {
func (m *windowsApp) setIcon(icon []byte) {
hIcon, err := w32.CreateLargeHIconFromImage(icon)
if err != nil {
m.parent.error("unable to create icon:", err)
return
}
w32.SetApplicationIcon(m.mainThreadWindowHWND, hIcon)
}

func (m *windowsApp) name() string {
Expand Down

0 comments on commit 566febc

Please sign in to comment.