update icon to match modern mac styling
This commit is contained in:
11
main.go
11
main.go
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user