mirror of
https://github.com/gen2brain/cbconvert
synced 2025-10-14 02:28:51 +02:00
Add logo
This commit is contained in:
BIN
cmd/cbconvert-gui/assets/logo.png
Normal file
BIN
cmd/cbconvert-gui/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@@ -23,6 +23,9 @@ import (
|
|||||||
//go:embed assets/icon.png
|
//go:embed assets/icon.png
|
||||||
var appIcon []byte
|
var appIcon []byte
|
||||||
|
|
||||||
|
//go:embed assets/logo.png
|
||||||
|
var appLogo []byte
|
||||||
|
|
||||||
//go:embed assets/loading.gif
|
//go:embed assets/loading.gif
|
||||||
var appLoading []byte
|
var appLoading []byte
|
||||||
|
|
||||||
@@ -70,6 +73,9 @@ func main() {
|
|||||||
img, _ := png.Decode(bytes.NewReader(appIcon))
|
img, _ := png.Decode(bytes.NewReader(appIcon))
|
||||||
iup.ImageFromImage(img).SetHandle("icon")
|
iup.ImageFromImage(img).SetHandle("icon")
|
||||||
|
|
||||||
|
logo, _ := png.Decode(bytes.NewReader(appLogo))
|
||||||
|
iup.ImageFromImage(logo).SetHandle("logo")
|
||||||
|
|
||||||
dlg := iup.Dialog(layout()).SetAttributes(fmt.Sprintf(`TITLE="CBconvert %s", ICON=icon`, appVersion)).SetHandle("dlg")
|
dlg := iup.Dialog(layout()).SetAttributes(fmt.Sprintf(`TITLE="CBconvert %s", ICON=icon`, appVersion)).SetHandle("dlg")
|
||||||
|
|
||||||
dlg.SetCallback("POSTMESSAGE_CB", iup.PostMessageFunc(func(ih iup.Ihandle, s string, i int, p any) int {
|
dlg.SetCallback("POSTMESSAGE_CB", iup.PostMessageFunc(func(ih iup.Ihandle, s string, i int, p any) int {
|
||||||
@@ -82,7 +88,7 @@ func main() {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
dlg.SetCallback("RESIZE_CB", iup.ResizeFunc(func(ih iup.Ihandle, width, height int) int {
|
dlg.SetCallback("RESIZE_CB", iup.ResizeFunc(func(ih iup.Ihandle, width, height int) int {
|
||||||
iup.GetHandle("Preview").SetAttribute("IMAGE", "")
|
iup.GetHandle("Preview").SetAttribute("IMAGE", "logo")
|
||||||
iup.Refresh(ih)
|
iup.Refresh(ih)
|
||||||
|
|
||||||
previewPost()
|
previewPost()
|
||||||
|
Reference in New Issue
Block a user