# HG changeset patch # User Peter Nelson # Date 2024-01-17 22:17:14 # Node ID 34e4b1ae0c8a8f9ab1ee87f572d6547fc08cc9dd # Parent cf7f5ff835c849cb2ef63f8f6d1e13a53c9b25c8 Change: Remove extra padding from query text. (#11823) This window uses 'modalpopup' padding so does not need extra padding on its text. diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1138,18 +1138,14 @@ struct QueryWindow : public Window { { if (widget != WID_Q_TEXT) return; - Dimension d = GetStringMultiLineBoundingBox(this->message, *size); - d.width += WidgetDimensions::scaled.frametext.Horizontal(); - d.height += WidgetDimensions::scaled.framerect.Vertical(); - *size = d; + *size = GetStringMultiLineBoundingBox(this->message, *size); } void DrawWidget(const Rect &r, WidgetID widget) const override { if (widget != WID_Q_TEXT) return; - DrawStringMultiLine(r.Shrink(WidgetDimensions::scaled.frametext, WidgetDimensions::scaled.framerect), - this->message, TC_FROMSTRING, SA_CENTER); + DrawStringMultiLine(r, this->message, TC_FROMSTRING, SA_CENTER); } void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override