From 58c037fba0b196eca5312d48d52620c4542b2ced Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 13 Nov 2023 21:54:26 +0000 Subject: [PATCH] Change: Increase finance window lines (and underlines) with interface scale. --- src/company_gui.cpp | 8 ++++---- src/gfx.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 986336b444..7c16298e85 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -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); diff --git a/src/gfx.cpp b/src/gfx.cpp index 15420ee655..5029446db4 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -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;