From 519751043d876c1e7f5ec1decc0fb15ff3486a4c Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 19 Jan 2026 18:44:00 +0100 Subject: [PATCH] ImageView: preset correct background color. --- avr/modules/lcd2/gui2/imageview.asm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avr/modules/lcd2/gui2/imageview.asm b/avr/modules/lcd2/gui2/imageview.asm index 6e220af..e88a58b 100644 --- a/avr/modules/lcd2/gui2/imageview.asm +++ b/avr/modules/lcd2/gui2/imageview.asm @@ -51,8 +51,11 @@ ImageView_OnCreate: bigcall Widget_OnCreate bigcall Widget_GetSdramPtr ; (none) - ldi r16, LOW(STYLE_WIN_BACKGROUND) - ldi r17, HIGH(STYLE_WIN_BACKGROUND) + + adiw zh:zl, WIDGET_OFFS_BACKCOL_LO + lpm r16, Z+ + lpm r17, Z + sbiw zh:zl, WIDGET_OFFS_BACKCOL_LO+1 std Y+IMGVIEW_SD_OFFS_BGCOL_LO, r16 std Y+IMGVIEW_SD_OFFS_BGCOL_HI, r17 sec