Avoid setting HeaderBackground for transparent backgrounds (#11002)

This commit is contained in:
Jonathan Bennett
2026-07-14 09:22:57 +02:00
committed by GitHub
co-authored by GitHub
parent 1af7048c18
commit eb4e24b2f6
+2 -2
View File
@@ -147,8 +147,8 @@ void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y, const char *ti
// Transparent clock headers should inherit whatever body off-color is
// already active under the header (important for light/inverted themes).
const uint16_t transparentBgColor = resolveTFTOffColorAt(0, headerHeight + 1, getThemeBodyBg());
setAndRegisterTFTColorRole(TFTColorRole::HeaderBackground, transparentBgColor, transparentBgColor, 0, 0, screenW,
headerHeight);
// Intentionally skip the HeaderBackground region, as small screens draw the clock in the unused space in this region,
// and the transparent call was erasing segments from the clock
setTFTColorRole(TFTColorRole::HeaderTitle, headerTitleColorForRole, transparentBgColor);
setTFTColorRole(TFTColorRole::HeaderStatus, headerStatusColor, transparentBgColor);
} else if (useInvertedHeaderStyle) {