Change: Increase finance window lines (and underlines) with interface scale.

This commit is contained in:
Peter Nelson 2023-11-13 21:54:26 +00:00 committed by Peter Nelson
parent 1dff1e34f6
commit 58c037fba0
2 changed files with 5 additions and 5 deletions

View File

@ -239,7 +239,7 @@ static Money DrawYearCategory(const Rect &r, int start_y, const ExpensesList &li
}
/* Draw the total at the bottom of the category. */
GfxFillRect(r.left, y, r.right, y, PC_BLACK);
GfxFillRect(r.left, y, r.right, y + WidgetDimensions::scaled.bevel.top - 1, PC_BLACK);
y += WidgetDimensions::scaled.vsep_normal;
if (sum != 0) DrawPrice(sum, r.left, r.right, y, TC_WHITE);
@ -274,7 +274,7 @@ static void DrawYearColumn(const Rect &r, TimerGameCalendar::Year year, const Ex
}
/* Total income. */
GfxFillRect(r.left, y, r.right, y, PC_BLACK);
GfxFillRect(r.left, y, r.right, y + WidgetDimensions::scaled.bevel.top - 1, PC_BLACK);
y += WidgetDimensions::scaled.vsep_normal;
DrawPrice(sum, r.left, r.right, y, TC_WHITE);
}
@ -438,7 +438,7 @@ struct CompanyFinancesWindow : Window {
}
case WID_CF_BALANCE_LINE:
GfxFillRect(r.left, r.top, r.right, r.top, PC_BLACK);
GfxFillRect(r.left, r.top, r.right, r.top + WidgetDimensions::scaled.bevel.top - 1, PC_BLACK);
break;
}
}
@ -2106,7 +2106,7 @@ struct CompanyInfrastructureWindow : Window
case WID_CI_TOTAL:
if (_settings_game.economy.infrastructure_maintenance) {
Rect tr = r.WithWidth(this->total_width, _current_text_dir == TD_RTL);
GfxFillRect(tr.left, y, tr.right, y, PC_WHITE);
GfxFillRect(tr.left, y, tr.right, y + WidgetDimensions::scaled.bevel.top - 1, PC_WHITE);
y += WidgetDimensions::scaled.vsep_normal;
SetDParam(0, this->GetTotalMaintenanceCost() * 12); // Convert to per year
DrawString(tr.left, tr.right, y, STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL, TC_FROMSTRING, SA_RIGHT);

View File

@ -621,7 +621,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
}
if (underline) {
GfxFillRect(left, y + h, right, y + h, _string_colourremap[1]);
GfxFillRect(left, y + h, right, y + h + WidgetDimensions::scaled.bevel.top - 1, _string_colourremap[1]);
}
return (align & SA_HOR_MASK) == SA_RIGHT ? left : right;