diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop/LDesktopBackground.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/LDesktopBackground.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktopBackground.cpp b/src-qt5/core/lumina-desktop/LDesktopBackground.cpp index c3d67117..ed12bcf0 100644 --- a/src-qt5/core/lumina-desktop/LDesktopBackground.cpp +++ b/src-qt5/core/lumina-desktop/LDesktopBackground.cpp @@ -8,13 +8,17 @@ #include <QPainter> #include <QPaintEvent> +#include <QDebug> void LDesktopBackground::paintEvent(QPaintEvent *ev) { if (bgPixmap != NULL) { + //qDebug() << "Wallpaper paint Event:" << ev->rect(); QPainter painter(this); painter.setBrush(*bgPixmap); - painter.drawRect(ev->rect()); - } + painter.drawRect(ev->rect().adjusted(-1,-1,2,2)); + }else{ + QWidget::paintEvent(ev); + } } void LDesktopBackground::setBackground(const QString& bgFile, const QString& format) { @@ -67,7 +71,7 @@ void LDesktopBackground::setBackground(const QString& bgFile, const QString& for painter.setBrushOrigin(dx, dy); painter.drawRect(dx, dy, drawWidth, drawHeight); } - this->repaint(this->geometry()); //make sure the entire thing gets repainted right away + this->repaint(); //make sure the entire thing gets repainted right away show(); } |