update icon to match modern mac styling

This commit is contained in:
2025-05-07 21:54:09 -04:00
parent acb3735be2
commit ecd36bb0e2
7 changed files with 29 additions and 32 deletions

11
main.go
View File

@@ -15,15 +15,11 @@ import (
tk "modernc.org/tk9.0"
)
// this is a default image
//
//go:embed noise.png
var noise []byte
var noise []byte // this is a default image
// this is the app icon
//
//go:embed icon.png
var icon []byte
var icon []byte // this is the app icon
//go:generate go run ./filetypes/cmd/gen.go
var validFileTypes = filetypes.Valid
@@ -137,6 +133,8 @@ func repaint(img *tk.LabelWidget, name string, opt tk.Opt) {
}
func main() {
// TODO: see if there's a way to keep the "default" icon from flashing up on startup
tk.App.IconPhoto(tk.NewPhoto(tk.Data(icon)), tk.DefaultIcon())
img := tk.Label()
repaint(img, "", tk.Data(noise))
@@ -231,6 +229,5 @@ func main() {
// }))
tk.Pack(img)
tk.App.IconPhoto(tk.NewPhoto(tk.Data(icon)))
tk.App.Wait()
}