Refactored the menu system

This commit is contained in:
maze authored and maze committed 2026-10-29 17:29:54 +01:00
1 parent 4ae7655cd8
commit 86aad51e37
12 files changed
+474 -344

No files matched your search

+2 -10
View File
@@ -123,11 +123,7 @@ func (w *Spectrum) Refresh(ctx app.Context) bool {
if w.changed.CompareAndSwap(true, false) {
if w.buffer == nil {
w.buffer = app.BufferFor(ctx, bounds.Size())
if w.styles.Window.Background != nil {
app.ImageCopy(w.buffer, w.styles.Window.Background)
} else {
app.ImageFill(w.buffer, w.styles.Window.BackgroundColor)
}
app.ImageCopy(w.buffer, w.styles.Window.Background())
}
if w.waterfall {
@@ -143,11 +139,7 @@ func (w *Spectrum) Refresh(ctx app.Context) bool {
}
func (w *Spectrum) refreshAnalyzer(bounds image.Rectangle) {
if w.styles.Window.Background != nil {
app.ImageCopy(w.buffer, w.styles.Window.Background)
} else {
app.ImageFill(w.buffer, w.styles.Window.BackgroundColor)
}
app.ImageCopy(w.buffer, w.styles.Window.Background())
var (
width = bounds.Dx()