mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-06 10:22:50 +08:00
using embed to embed static resource
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
package resource
|
package resource
|
||||||
|
|
||||||
import "fyne.io/fyne/v2"
|
import (
|
||||||
|
_ "embed"
|
||||||
|
"fyne.io/fyne/v2"
|
||||||
|
)
|
||||||
|
|
||||||
var ImageEmpty = &fyne.StaticResource{
|
var ImageEmpty = &fyne.StaticResource{
|
||||||
StaticName: "flat-color-icons--audio-file.svg",
|
StaticName: "flat-color-icons--audio-file.svg",
|
||||||
@@ -12,4 +15,10 @@ var ImageEmptyQrCode = &fyne.StaticResource{
|
|||||||
StaticContent: []byte("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"black\" d=\"M1 1h10v10H1zm2 2v6h6V3z\"/><path fill=\"black\" fill-rule=\"evenodd\" d=\"M5 5h2v2H5z\"/><path fill=\"black\" d=\"M13 1h10v10H13zm2 2v6h6V3z\"/><path fill=\"black\" fill-rule=\"evenodd\" d=\"M17 5h2v2h-2z\"/><path fill=\"black\" d=\"M1 13h10v10H1zm2 2v6h6v-6z\"/><path fill=\"black\" fill-rule=\"evenodd\" d=\"M5 17h2v2H5z\"/><path fill=\"black\" d=\"M23 19h-4v4h-6V13h1h-1v6h2v2h2v-6h-2v-2h-1h3v2h2v2h2v-4h2zm0 2v2h-2v-2z\"/></svg>"),
|
StaticContent: []byte("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"black\" d=\"M1 1h10v10H1zm2 2v6h6V3z\"/><path fill=\"black\" fill-rule=\"evenodd\" d=\"M5 5h2v2H5z\"/><path fill=\"black\" d=\"M13 1h10v10H13zm2 2v6h6V3z\"/><path fill=\"black\" fill-rule=\"evenodd\" d=\"M17 5h2v2h-2z\"/><path fill=\"black\" d=\"M1 13h10v10H1zm2 2v6h6v-6z\"/><path fill=\"black\" fill-rule=\"evenodd\" d=\"M5 17h2v2H5z\"/><path fill=\"black\" d=\"M23 19h-4v4h-6V13h1h-1v6h2v2h2v-6h-2v-2h-1h3v2h2v2h2v-4h2zm0 2v2h-2v-2z\"/></svg>"),
|
||||||
}
|
}
|
||||||
|
|
||||||
var ImageIcon = resImageIcon
|
//go:embed static/icon2.png
|
||||||
|
var resImageIconData []byte
|
||||||
|
|
||||||
|
var ImageIcon = &fyne.StaticResource{
|
||||||
|
StaticName: "icon2.png",
|
||||||
|
StaticContent: resImageIconData,
|
||||||
|
}
|
||||||
|
|||||||
BIN
resource/static/icon2.png
Normal file
BIN
resource/static/icon2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 350 KiB |
Reference in New Issue
Block a user