Bug fixed.
When starting the program, sometimes the window was displayed incorrectly.
This commit is contained in:
parent
a1c9143685
commit
bab8c1f383
@ -4,6 +4,7 @@ import (
|
|||||||
"fyne.io/fyne/v2"
|
"fyne.io/fyne/v2"
|
||||||
"fyne.io/fyne/v2/dialog"
|
"fyne.io/fyne/v2/dialog"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type WindowContract interface {
|
type WindowContract interface {
|
||||||
@ -21,9 +22,14 @@ type Window struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func newWindow(w fyne.Window, layout LayoutContract) Window {
|
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()
|
w.CenterOnScreen()
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
time.Sleep(time.Millisecond * 500)
|
||||||
|
w.Resize(fyne.Size{Width: 1040, Height: 600})
|
||||||
|
}()
|
||||||
|
|
||||||
return Window{
|
return Window{
|
||||||
windowFyne: w,
|
windowFyne: w,
|
||||||
layout: layout,
|
layout: layout,
|
||||||
|
Loading…
Reference in New Issue
Block a user