Fix b7630b0: Incorrect padding for text purchase list. (#12160)

Restore to original (and more normal) framerect padding.
pull/661/head
Peter Nelson 3 months ago committed by GitHub
parent bb86023d50
commit 2b79e7cdf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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));
}

Loading…
Cancel
Save