MCPcopy Create free account
hub / github.com/DEROFDN/Engram / showLoadingOverlay

Function showLoadingOverlay

functions.go:1015–1042  ·  view source on GitHub ↗

Add an overlay with the loading animation

()

Source from the content-addressed store, hash-verified

1013
1014// Add an overlay with the loading animation
1015func showLoadingOverlay() {
1016 frame := &iframe{}
1017
1018 if res.loading == nil {
1019 res.loading, _ = x.NewAnimatedGifFromResource(resourceLoadingGif)
1020 res.loading.SetMinSize(fyne.NewSize(ui.Width*0.45, ui.Width*0.45))
1021 }
1022
1023 rect := canvas.NewRectangle(colors.DarkMatter)
1024 rect.SetMinSize(frame.Size())
1025
1026 background := container.NewStack(
1027 rect,
1028 container.NewCenter(
1029 res.loading,
1030 ),
1031 )
1032
1033 res.loading.Start()
1034
1035 layout := container.NewStack(
1036 frame,
1037 background,
1038 )
1039
1040 overlays := session.Window.Canvas().Overlays()
1041 overlays.Add(layout)
1042}
1043
1044// Load embedded resources
1045func loadResources() {

Callers 5

closeWalletFunction · 0.85
loginFunction · 0.85
layoutAssetExplorerFunction · 0.85
layoutTELAFunction · 0.85
layoutTELAManagerFunction · 0.85

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected