itd/cmd/itgui/loading.go

22 lines
400 B
Go
Raw Normal View History

2022-05-05 21:00:49 +00:00
package main
import (
"image/color"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/widget"
)
func newLoadingPopUp(w fyne.Window) *widget.PopUp {
pb := widget.NewProgressBarInfinite()
rect := canvas.NewRectangle(color.Transparent)
rect.SetMinSize(fyne.NewSize(200, 0))
return widget.NewModalPopUp(
container.NewMax(rect, pb),
w.Canvas(),
)
}