mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-03 20:30:43 +00:00
Correct pop-up calculation size and continue to leverage isHighResolution
This commit is contained in:
parent
6bd600a878
commit
30e0972de5
@ -116,7 +116,6 @@ void NotificationRenderer::drawAlertBannerOverlay(OLEDDisplay *display, OLEDDisp
|
|||||||
maxWidth = optionWidths[i] + arrowsWidth;
|
maxWidth = optionWidths[i] + arrowsWidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
totalCount = lineCount + alertBannerOptions;
|
|
||||||
|
|
||||||
// respond to input
|
// respond to input
|
||||||
if (inEvent == INPUT_BROKER_UP || inEvent == INPUT_BROKER_ALT_PRESS) {
|
if (inEvent == INPUT_BROKER_UP || inEvent == INPUT_BROKER_ALT_PRESS) {
|
||||||
@ -154,13 +153,14 @@ void NotificationRenderer::drawAlertBannerOverlay(OLEDDisplay *display, OLEDDisp
|
|||||||
if (isHighResolution && boxWidth <= 150) {
|
if (isHighResolution && boxWidth <= 150) {
|
||||||
boxWidth += 26;
|
boxWidth += 26;
|
||||||
}
|
}
|
||||||
if (SCREEN_WIDTH <= 128 && boxWidth <= 100) {
|
if (!isHighResolution && boxWidth <= 100) {
|
||||||
boxWidth += 20;
|
boxWidth += 20;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// calculate max lines on screen? for now it's 4
|
// calculate max lines on screen? for now it's 4
|
||||||
// set height from line count
|
// set height from line count
|
||||||
uint16_t boxHeight;
|
uint16_t boxHeight;
|
||||||
|
totalCount = lineCount + alertBannerOptions;
|
||||||
if (totalCount <= 4) {
|
if (totalCount <= 4) {
|
||||||
boxHeight = vPadding * 2 + totalCount * FONT_HEIGHT_SMALL + (totalCount - 1) * lineSpacing;
|
boxHeight = vPadding * 2 + totalCount * FONT_HEIGHT_SMALL + (totalCount - 1) * lineSpacing;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user