Code improvement.
And added a comment to the code.
This commit is contained in:
parent
bab8c1f383
commit
8e6fb90482
@ -26,8 +26,15 @@ func newWindow(w fyne.Window, layout LayoutContract) Window {
|
|||||||
w.CenterOnScreen()
|
w.CenterOnScreen()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
/**
|
||||||
|
* Bug fixed.
|
||||||
|
* When starting the program, sometimes the window was displayed incorrectly.
|
||||||
|
*/
|
||||||
time.Sleep(time.Millisecond * 500)
|
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{
|
return Window{
|
||||||
|
Loading…
Reference in New Issue
Block a user