From 9e2496fe71080a2dfc56930f5cf665600387bd0d Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Wed, 20 Dec 2023 20:51:46 +0000 Subject: [PATCH] Change: Apply extra space for text shadow on WWT_LABEL widgets too. --- src/widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widget.cpp b/src/widget.cpp index de03433deb..95c92a9a28 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -2940,8 +2940,8 @@ void NWidgetLeaf::Draw(const Window *w) { if (this->current_x == 0 || this->current_y == 0) return; - /* Setup a clipping rectangle... for WWT_EMPTY or WWT_TEXT, an extra scaled pixel is allowed in case text shadow encroaches. */ - int extra = (this->type == WWT_EMPTY || this->type == WWT_TEXT) ? ScaleGUITrad(1) : 0; + /* Setup a clipping rectangle... for WWT_EMPTY, WWT_TEXT or WWT_LABEL, an extra scaled pixel is allowed in case text shadow encroaches. */ + int extra = (this->type == WWT_EMPTY || this->type == WWT_TEXT || this->type == WWT_LABEL) ? ScaleGUITrad(1) : 0; DrawPixelInfo new_dpi; if (!FillDrawPixelInfo(&new_dpi, this->pos_x, this->pos_y, this->current_x + extra, this->current_y + extra)) return; /* ...but keep coordinates relative to the window. */