From e0b8da86edfc6b87167c6b3d49a09c31b21813e7 Mon Sep 17 00:00:00 2001 From: ALMAS <9382335+almas1992@users.noreply.github.com> Date: Tue, 19 Dec 2023 20:43:28 +0800 Subject: [PATCH] [v3] export `SetIcon` method (#3147) * export `SetIcon` method * add change log --- mkdocs-website/docs/en/changelog.md | 1 + v3/pkg/application/application.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index 809f31e3..8f83d457 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [darwin] add getPrimaryScreen/getScreens to impl by @tmclane in [#2618](https://github.com/wailsapp/wails/pull/2618) - [linux] add onKeyPress logic to convert linux keypress into an accelerator @[Atterpac](https://github.com/Atterpac) in[#3022](https://github.com/wailsapp/wails/pull/3022]) - [linux] add task `run:linux` by [@marcus-crane](https://github.com/marcus-crane) in [#3146](https://github.com/wailsapp/wails/pull/3146) +- export `SetIcon` method by @almas1992 in [PR](https://github.com/wailsapp/wails/pull/3147) ### Fixed diff --git a/v3/pkg/application/application.go b/v3/pkg/application/application.go index 35fbc21e..5fb7f96a 100644 --- a/v3/pkg/application/application.go +++ b/v3/pkg/application/application.go @@ -611,6 +611,12 @@ func (a *App) Quit() { }) } +func (a *App) SetIcon(icon []byte) { + if a.impl != nil { + a.impl.setIcon(icon) + } +} + func (a *App) SetMenu(menu *Menu) { a.ApplicationMenu = menu if a.impl != nil {