fix: improve icon vertical alignment and increase icon-text gap
Shift icons up 1px to better match the text midline, and increase ICON_GAP from 4 to 6 for more breathing room between icon and text. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -186,7 +186,7 @@ void DisplayManager::showMetadataInRegion(const AssetInfo& info, uint8_t metaFla
|
||||
static constexpr uint16_t PAD_Y = 5;
|
||||
static constexpr uint16_t TEXT_H = 20;
|
||||
static constexpr uint16_t ICON_SIZE = 12;
|
||||
static constexpr uint16_t ICON_GAP = 4;
|
||||
static constexpr uint16_t ICON_GAP = 6;
|
||||
|
||||
bool showIcons = (regionW == DISPLAY_WIDTH);
|
||||
|
||||
@@ -247,7 +247,7 @@ void DisplayManager::showMetadataInRegion(const AssetInfo& info, uint8_t metaFla
|
||||
_display->setTextDatum(middle_left);
|
||||
uint16_t textX = bx + PAD_X;
|
||||
if (showIcons) {
|
||||
drawCalendarIcon(bx + PAD_X, by + (badgeH - ICON_SIZE) / 2, ICON_SIZE);
|
||||
drawCalendarIcon(bx + PAD_X, by + (badgeH - ICON_SIZE) / 2 - 1, ICON_SIZE);
|
||||
textX += ICON_SIZE + ICON_GAP;
|
||||
}
|
||||
_display->drawString(metaText.c_str(), textX, by + badgeH / 2);
|
||||
@@ -277,7 +277,7 @@ void DisplayManager::showMetadataInRegion(const AssetInfo& info, uint8_t metaFla
|
||||
_display->setTextDatum(middle_left);
|
||||
uint16_t locTextX = lx + PAD_X;
|
||||
if (showIcons) {
|
||||
drawPinIcon(lx + PAD_X, ly + (locBadgeH - ICON_SIZE) / 2, ICON_SIZE);
|
||||
drawPinIcon(lx + PAD_X, ly + (locBadgeH - ICON_SIZE) / 2 - 1, ICON_SIZE);
|
||||
locTextX += ICON_SIZE + ICON_GAP;
|
||||
}
|
||||
_display->drawString(locationText.c_str(), locTextX, ly + locBadgeH / 2);
|
||||
|
||||
Reference in New Issue
Block a user