1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00

Change: Apply extra space for text shadow on WWT_LABEL widgets too.

This commit is contained in:
2023-12-20 20:51:46 +00:00
parent f23eaf7e16
commit 9e2496fe71

View File

@@ -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. */