Add back noise texture
Add back the noise texture background by embedding the image file and setting it as base64-encoded data as CSS background image.
This commit is contained in:
parent
b7c0307f6b
commit
690f0f8e9a
3 changed files with 13 additions and 1 deletions
11
data/data.go
11
data/data.go
|
|
@ -2,6 +2,8 @@ package data
|
|||
|
||||
import (
|
||||
_ "embed"
|
||||
"encoding/base64"
|
||||
"strings"
|
||||
)
|
||||
|
||||
//go:embed ui/window.ui
|
||||
|
|
@ -30,3 +32,12 @@ var LibraryPanelXML string
|
|||
|
||||
//go:embed gtk.css
|
||||
var MainCSS string
|
||||
|
||||
//go:embed noise-texture.png
|
||||
var NoiseTexture []byte
|
||||
|
||||
func BuildMainCSS() string {
|
||||
noiseTextureEncoded := "data:image/png;base64," + base64.StdEncoding.EncodeToString(NoiseTexture)
|
||||
|
||||
return strings.ReplaceAll(MainCSS, "@NOISETEXTURE@", noiseTextureEncoded)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue