From bab8c1f3830d1ebaf67d8427fda524b2fa122be5 Mon Sep 17 00:00:00 2001 From: Leonid Nikitin Date: Sat, 17 Feb 2024 19:18:25 +0600 Subject: [PATCH] Bug fixed. When starting the program, sometimes the window was displayed incorrectly. --- kernel/window.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/window.go b/kernel/window.go index d60971b..47834d9 100644 --- a/kernel/window.go +++ b/kernel/window.go @@ -4,6 +4,7 @@ import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/dialog" "git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper" + "time" ) type WindowContract interface { @@ -21,9 +22,14 @@ type Window struct { } func newWindow(w fyne.Window, layout LayoutContract) Window { - w.Resize(fyne.Size{Width: 799, Height: 599}) + w.Resize(fyne.Size{Width: 1039, Height: 599}) w.CenterOnScreen() + go func() { + time.Sleep(time.Millisecond * 500) + w.Resize(fyne.Size{Width: 1040, Height: 600}) + }() + return Window{ windowFyne: w, layout: layout,