Change: Use CenterBounds function in more places.

CenterBounds may have a 1 pixel difference so the result is not exactly
the same.
This commit is contained in:
Peter Nelson
2022-09-07 08:31:02 +01:00
committed by PeterN
parent 18201dfbc3
commit eb4ba1991b
14 changed files with 23 additions and 26 deletions

View File

@@ -189,7 +189,7 @@ struct StatusBarWindow : Window {
if (!this->reminder_timeout.HasElapsed()) {
Dimension icon_size = GetSpriteSize(SPR_UNREAD_NEWS);
DrawSprite(SPR_UNREAD_NEWS, PAL_NONE, r.right - WD_FRAMERECT_RIGHT - icon_size.width, r.top + std::max(0, ((int)(r.bottom - r.top + 1) - (int)icon_size.height) / 2));
DrawSprite(SPR_UNREAD_NEWS, PAL_NONE, r.right - WD_FRAMERECT_RIGHT - icon_size.width, CenterBounds(r.top, r.bottom, icon_size.height));
}
break;
}