gui: remove the now-unused old qr background colors
What changed, and why it matters
This commit removes unused color constants and switches QR code display to use standard black-and-white colors. It is a cleanup change with no security relevance.
No action required; this is a benign cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change deletes the GUI_BLOCKSTREAM_QR_PALE color token and its platform-dependent definition (white on ESP32-S3, pale grey otherwise). QR rendering now uses TFT_BLACK for the background fill and TFT_WHITE for the icon/QR modules. This is purely a code simplification and visual consistency change.
Changed components
main/gui.cmain/gui.hmain/ui/qrmode.cInspect captured patch +2 / −9
diff --git a/main/gui.c b/main/gui.c
index 444cf8c..d084533 100644
--- a/main/gui.c
+++ b/main/gui.c
@@ -37,12 +37,6 @@ ESP_EVENT_DEFINE_BASE(GUI_EVENT);
const color_t GUI_BLOCKSTREAM_JADE_GREEN = 0x4C04;
const color_t GUI_BLOCKSTREAM_BUTTONBORDER_GREY = 0x0421;
-#ifdef CONFIG_IDF_TARGET_ESP32S3
-// V2 QR codes scan better with a higher contrast background
-const color_t GUI_BLOCKSTREAM_QR_PALE = 0xFFFF;
-#else
-const color_t GUI_BLOCKSTREAM_QR_PALE = 0x494A;
-#endif
const color_t GUI_BLOCKSTREAM_HIGHTLIGHT_DEFAULT = GUI_BLOCKSTREAM_JADE_GREEN;
const color_t GUI_BLOCKSTREAM_HIGHTLIGHT_ORANGE = 0xE0D3;
const color_t GUI_BLOCKSTREAM_HIGHTLIGHT_BLUE = 0xD318;
diff --git a/main/gui.h b/main/gui.h
index 2bb50f3..f548861 100644
--- a/main/gui.h
+++ b/main/gui.h
@@ -12,7 +12,6 @@ extern color_t _fg;
// Additional colour tokens
extern const color_t GUI_BLOCKSTREAM_JADE_GREEN;
extern const color_t GUI_BLOCKSTREAM_BUTTONBORDER_GREY;
-extern const color_t GUI_BLOCKSTREAM_QR_PALE;
extern const color_t GUI_BLOCKSTREAM_HIGHTLIGHT_DEFAULT;
extern const color_t GUI_BLOCKSTREAM_HIGHTLIGHT_ORANGE;
diff --git a/main/ui/qrmode.c b/main/ui/qrmode.c
index 17de840..541f446 100644
--- a/main/ui/qrmode.c
+++ b/main/ui/qrmode.c
@@ -7,10 +7,10 @@ static void make_qrcode(gui_view_node_t* parent, Icon* icons, const size_t num_i
{
// qrcodes are a background fill node with the icon node on top
gui_view_node_t* fill;
- gui_make_fill(&fill, GUI_BLOCKSTREAM_QR_PALE, FILL_QR, parent);
+ gui_make_fill(&fill, TFT_BLACK, FILL_QR, parent);
gui_view_node_t* icon;
- gui_make_icon(&icon, icons, TFT_BLACK, &GUI_BLOCKSTREAM_QR_PALE);
+ gui_make_icon(&icon, icons, TFT_BLACK, &TFT_WHITE);
gui_set_align(icon, GUI_ALIGN_CENTER, GUI_ALIGN_MIDDLE);
gui_set_parent(icon, fill);
gui_set_icon_animation(icon, icons, num_icons, frames_per_qr_icon);
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.