Files
gosentry/assets/assets.go
T
mixeme 0bc9e91d1e Stabilize Jobs details panel width
Wrap dynamic job detail labels so long names, schedules, commands, and status values no longer change the right panel minimum width when the selected job changes.

Point embedded and Windows resource icons at the current asset filenames so tests and Windows builds continue to work after the asset cleanup.
2026-06-16 21:24:03 +03:00

31 lines
1004 B
Go

package assets
import (
_ "embed"
"fyne.io/fyne/v2"
)
// The application icon is embedded into the binary instead of being loaded from
// an assets directory at runtime. That keeps the Windows/Linux distribution to a
// single executable and avoids the common failure mode where the app starts with
// a generic icon because a sidecar PNG was not copied with the binary.
//
// The blank import enables the compiler directive below; no runtime package
// initialization from embed is required.
//
//go:embed pysentry-icon-big.png
var iconBytes []byte
func Icon() fyne.Resource {
// Fyne accepts resources from memory, so the same embedded PNG can be used
// for the window icon and tray icon. The Windows Explorer icon is still added
// by the build script through the .ico resource, because Explorer reads PE
// resources rather than Fyne runtime state.
return fyne.NewStaticResource("pysentry-icon-big.png", iconBytes)
}
func IconBytes() []byte {
return append([]byte(nil), iconBytes...)
}