Refactored the menu system
This commit is contained in:
12 files changed
+474
-344
No files matched your search
+2
-10
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user