diff --git a/widgets/widget.cpp b/widgets/widget.cpp index bcc458527..6821c4183 100644 --- a/widgets/widget.cpp +++ b/widgets/widget.cpp @@ -20,11 +20,13 @@ #include "widget.h" -#include +#include #include #include +#include + #include "layout.h" #include "plasma/plasma.h" @@ -52,7 +54,7 @@ class Widget::Private bool Widget::Private::shouldPaint(QPainter *painter, const QTransform &transform) { qreal zoomLevel = painter->transform().m11() / transform.m11(); - return zoomLevel == scalingFactor(Plasma::DesktopZoom); + return (zoomLevel - scalingFactor(Plasma::DesktopZoom)) < std::numeric_limits::epsilon(); } Widget::Widget(QGraphicsItem *parent)