Changeset - r28803:93db387017f6
[Not reviewed]
master
0 1 0
Peter Nelson - 2 months ago 2024-02-22 22:23:29
peter1138@openttd.org
Fix b7630b0: Incorrect padding for text purchase list. (#12160)

Restore to original (and more normal) framerect padding.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1821,7 +1821,7 @@ struct BuildVehicleWindow : Window {
 
			int needed_height = this->details_height;
 
			/* Draw details panels. */
 
			if (this->sel_engine != INVALID_ENGINE) {
 
				const Rect r = this->GetWidget<NWidgetBase>(WID_BV_PANEL)->GetCurrentRect().Shrink(WidgetDimensions::scaled.frametext, WidgetDimensions::scaled.framerect);
 
				const Rect r = this->GetWidget<NWidgetBase>(WID_BV_PANEL)->GetCurrentRect().Shrink(WidgetDimensions::scaled.framerect);
 
				int text_end = DrawVehiclePurchaseInfo(r.left, r.right, r.top, this->sel_engine, this->te);
 
				needed_height = std::max(needed_height, (text_end - r.top) / GetCharacterHeight(FS_NORMAL));
 
			}
0 comments (0 inline, 0 general)