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:
Olli 2026-08-14 11:39:10 +02:00
commit 690f0f8e9a
3 changed files with 13 additions and 1 deletions

View file

@ -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)
}