mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
v2: linux: add icon to linux specific app option and load it during w… (#1272)
* v2: linux: add icon to linux specific app option and load it during window creation Signed-off-by: Martin Gysel <me@bearsh.org> * doc: linux specific option: icon
This commit is contained in:
@@ -75,6 +75,9 @@ func main() {
|
||||
Icon: icon,
|
||||
},
|
||||
},
|
||||
Linux: &linux.Options{
|
||||
Icon: icon,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@@ -337,6 +340,14 @@ Type: \*mac.Options
|
||||
|
||||
This defines [Mac specific options](#mac-specific-options).
|
||||
|
||||
### Linux
|
||||
|
||||
Name: Linux
|
||||
|
||||
Type: \*linux.Options
|
||||
|
||||
This defines [Linux specific options](#linux-specific-options).
|
||||
|
||||
## Windows Specific Options
|
||||
|
||||
### WebviewIsTransparent
|
||||
@@ -605,3 +616,20 @@ When clicked, that will open an about message box:
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
## Linux Specific Options
|
||||
|
||||
### Icon
|
||||
|
||||
Name: Icon
|
||||
|
||||
Type: []byte
|
||||
|
||||
Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified).
|
||||
Some window managers or desktop environments may also place it in the window frame, or display it in other contexts.
|
||||
On others, the icon is not used at all, so your mileage may vary.
|
||||
|
||||
NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used.
|
||||
On KDE it should work.
|
||||
|
||||
The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it.
|
||||
Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.
|
||||
|
||||
Reference in New Issue
Block a user