diff --git a/src/gfx.cpp b/src/gfx.cpp index 167d6c540c..e48de20a64 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1559,7 +1559,7 @@ void DrawDirtyBlocks() w->flags &= ~WF_WIDGETS_DIRTY; } - if (w->viewport != nullptr) { + if (w->viewport != nullptr && !w->IsShaded()) { ViewPort *vp = w->viewport; if (vp->is_drawn) { vp->ClearDirty(); diff --git a/src/widget.cpp b/src/widget.cpp index 1608c8c26d..3ead549818 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -2002,8 +2002,8 @@ void NWidgetViewport::UpdateViewportCoordinates(Window *w) if (vp != nullptr) { vp->left = w->left + this->pos_x; vp->top = w->top + this->pos_y; - vp->width = this->current_x; - vp->height = this->current_y; + vp->width = w->IsShaded() ? 0 : this->current_x; + vp->height = w->IsShaded() ? 0 : this->current_y; vp->virtual_width = ScaleByZoom(vp->width, vp->zoom); vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);