Code improvement.

And added a comment to the code.
This commit is contained in:
Leonid Nikitin 2024-02-17 19:45:28 +06:00
parent bab8c1f383
commit 8e6fb90482
Signed by: kor-elf
GPG Key ID: 3C0F720C170F6E1D

View File

@ -26,8 +26,15 @@ func newWindow(w fyne.Window, layout LayoutContract) Window {
w.CenterOnScreen()
go func() {
/**
* Bug fixed.
* When starting the program, sometimes the window was displayed incorrectly.
*/
time.Sleep(time.Millisecond * 500)
w.Resize(fyne.Size{Width: 1040, Height: 600})
size := w.Canvas().Size()
size.Width += 1
size.Height += 1
w.Resize(size)
}()
return Window{