Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. diff --git a/src/WebViewportItem.cpp b/src/WebViewportItem.cpp
  2. index 1e6c3ad..8e6716e 100644
  3. --- a/src/WebViewportItem.cpp
  4. +++ b/src/WebViewportItem.cpp
  5. @@ -254,7 +254,7 @@ static const unsigned checkerSize = 16;
  6. static const unsigned checkerColor1 = 0xff555555;
  7. static const unsigned checkerColor2 = 0xffaaaaaa;
  8.  
  9. -static QPixmap& checkeredPixmap()
  10. +static QPixmap& checkeredPixmap(const QColor& overlayColor)
  11. {
  12. static QPixmap* pixmap;
  13. if (!pixmap) {
  14. @@ -269,6 +269,7 @@ static QPixmap& checkeredPixmap()
  15. alternate = !alternate;
  16. }
  17. }
  18. + painter.fillRect(pixmap->rect(), overlayColor);
  19. }
  20. return *pixmap;
  21. }
  22. @@ -280,7 +281,7 @@ void WebViewportItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* o
  23.  
  24. QRect targetRect = option->exposedRect.toAlignedRect();
  25. QPoint targetPoint = QPoint(targetRect.left() % checkerSize, targetRect.top() % checkerSize);
  26. - painter->drawTiledPixmap(targetRect, checkeredPixmap(), targetPoint);
  27. + painter->drawTiledPixmap(targetRect, checkeredPixmap(QColor(255, 255, 255, 128)), targetPoint);
  28.  
  29. QRectF topRect(0, - s_dropShadowLength, width, s_dropShadowLength);
  30. painter->fillRect(topRect, topDropShadowBrush());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement