summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpadcanvas.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/noncore/graphics/drawpad/drawpadcanvas.cpp b/noncore/graphics/drawpad/drawpadcanvas.cpp
index b39a633..65b3dea 100644
--- a/noncore/graphics/drawpad/drawpadcanvas.cpp
+++ b/noncore/graphics/drawpad/drawpadcanvas.cpp
@@ -540,5 +540,15 @@ void DrawPadCanvas::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
540{ 540{
541 QRect clipRect(cx, cy, cw, ch); 541 QRect clipRect(cx, cy, cw, ch);
542 QRect pixmapRect(0, 0, m_pages.current()->width(), m_pages.current()->height());
543 QRect drawRect = pixmapRect.intersect(clipRect);
542 544
543 p->drawPixmap(clipRect.topLeft(), *(m_pages.current()), clipRect); 545 p->drawPixmap(drawRect.topLeft(), *(m_pages.current()), drawRect);
546
547 if (drawRect.right() < clipRect.right()) {
548 p->fillRect(drawRect.right() + 1, cy, cw - drawRect.width(), ch, colorGroup().dark());
549 }
550
551 if (drawRect.bottom() < clipRect.bottom()) {
552 p->fillRect(cx, drawRect.bottom() + 1, cw, ch - drawRect.height(), colorGroup().dark());
553 }
544} 554}