From e8a009bb3cb4977c217668856567a01f284c0ded Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Fri, 24 May 2024 23:27:09 +0200 Subject: [PATCH] Fix width calculation in asset packs window (#22097) --- src/openrct2-ui/windows/AssetPacks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2-ui/windows/AssetPacks.cpp b/src/openrct2-ui/windows/AssetPacks.cpp index 96aacf4ea4..6ff55c1f5a 100644 --- a/src/openrct2-ui/windows/AssetPacks.cpp +++ b/src/openrct2-ui/windows/AssetPacks.cpp @@ -238,7 +238,7 @@ static Widget WindowAssetPacksWidgets[] = { private: void PaintItem(DrawPixelInfo& dpi, int32_t y, Formatter& ft, bool isChecked, bool isSelected, bool isHighlighted) { - auto listWidth = dpi.width - 1; + auto listWidth = widgets[WIDX_LIST].right - widgets[WIDX_LIST].left; auto stringId = STR_BLACK_STRING; auto fillRectangle = ScreenRect{ { 0, y }, { listWidth, y + ItemHeight - 1 } }; if (isSelected)