Open majimboo opened 5 years ago
Out-of-the-box this is not possible. Hidden title bar and transparent window stuff shouldn't be too much work for me to support. You would have to paint custom button and progress bar visuals yourself though, probably having to come up with completely custom widgets similar to the externalwidgets example, but embedding CustomWidget
instead of WidgetBase
.
Thank you for the information. Looking forward for the frameless window implementation.
Here is my suggestion for the borderless window:
dialog.go
func NewDialog(owner Form) (*Dialog, error) {
return newDialogWithStyle(owner, win.WS_THICKFRAME|win.WS_CAPTION|win.WS_SYSMENU)
}
func NewDialogWithFixedSize(owner Form) (*Dialog, error) {
return newDialogWithStyle(owner, win.WS_CAPTION|win.WS_SYSMENU)
}
func NewBorderlessDialog(owner Form) (*Dialog, error) {
return newDialogWithStyle(owner, win.WS_POPUP|win.WS_THICKFRAME)
}
func newDialogWithStyle(owner Form, style uint32) (*Dialog, error) {
dlg := &Dialog{
FormBase: FormBase{
owner: owner,
},
}
if err := InitWindow(
dlg,
owner,
dialogWindowClass,
style,
0); err != nil {
return nil, err
}
succeeded := false
defer func() {
if !succeeded {
dlg.Dispose()
}
}()
dlg.centerInOwnerWhenRun = owner != nil
dlg.result = DlgCmdNone
succeeded = true
return dlg, nil
}
and on declarative:
if d.FixedSize {
w, err = walk.NewDialogWithFixedSize(owner)
} else if d.Borderless {
w, err = walk.NewBorderlessDialog(owner)
} else {
w, err = walk.NewDialog(owner)
}
Hello, is there an update to this for built in support?
Can I use dialog without the titlebar? And use a custom image for the window with transparency? And use images for buttons on hover and on click? Custom image for progress bar?
Like how they do MMORPG patchers: