diff --git a/scene.cpp b/scene.cpp index daaa5b44a1..0c5f6339a9 100644 --- a/scene.cpp +++ b/scene.cpp @@ -364,6 +364,9 @@ void Scene::paintWindow(Window* w, int mask, QRegion region, WindowQuadList quad QSizeF size = QSizeF(thumb->size()); size.scale(QSizeF(item->width(), item->height()), Qt::KeepAspectRatio); + if (size.width() > thumb->width() || size.height() > thumb->height()) { + size = QSizeF(thumb->size()); + } thumbData.xScale = size.width() / static_cast(thumb->width()); thumbData.yScale = size.height() / static_cast(thumb->height()); // it can happen in the init/closing phase of the tabbox