mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 23:51:44 +08:00
[v2] Add "AlwaysOnTop" option
This commit is contained in:
parent
d47b3734af
commit
e0e4c0ae11
@ -26,6 +26,9 @@ func NewWindow(parent winc.Controller, options *options.App) *Window {
|
||||
var exStyle int
|
||||
if options.Windows != nil {
|
||||
exStyle = w32.WS_EX_CONTROLPARENT | w32.WS_EX_APPWINDOW
|
||||
if options.AlwaysOnTop {
|
||||
exStyle |= w32.WS_EX_TOPMOST
|
||||
}
|
||||
if options.Windows.WindowIsTranslucent {
|
||||
exStyle |= w32.WS_EX_NOREDIRECTIONBITMAP
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ type App struct {
|
||||
MaxHeight int
|
||||
StartHidden bool
|
||||
HideWindowOnClose bool
|
||||
AlwaysOnTop bool
|
||||
RGBA *RGBA
|
||||
Assets embed.FS
|
||||
Menu *menu.Menu
|
||||
|
@ -168,6 +168,14 @@ Example: 0xFF000088 - Red at 50% transparency
|
||||
This value is the RGBA value to set the window by default.
|
||||
Default: 0xFFFFFFFF.
|
||||
|
||||
### AlwaysOnTop
|
||||
|
||||
Name: AlwaysOnTop
|
||||
|
||||
Type: bool
|
||||
|
||||
Indicates that the window should stay above other windows when losing focus.
|
||||
|
||||
### Assets
|
||||
|
||||
Name: Assets
|
||||
|
Loading…
Reference in New Issue
Block a user