Merge branch 'master' into jgrpp
# Conflicts: # src/core/geometry_type.hpp # src/error_gui.cpp # src/rail_gui.cpp # src/tree_gui.cpp # src/vehicle_gui.cpp # src/widgets/dropdown.cpp
This commit is contained in:
@@ -138,7 +138,7 @@ struct StatusBarWindow : Window {
|
||||
|
||||
void DrawWidget(const Rect &r, int widget) const override
|
||||
{
|
||||
int text_offset = std::max(0, ((int)(r.bottom - r.top + 1) - FONT_HEIGHT_NORMAL) / 2); // Offset for rendering the text vertically centered
|
||||
int text_offset = std::max(0, (r.Height() - FONT_HEIGHT_NORMAL) / 2); // Offset for rendering the text vertically centered
|
||||
int text_top = r.top + text_offset;
|
||||
switch (widget) {
|
||||
case WID_S_LEFT:
|
||||
@@ -190,7 +190,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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user