Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. --- a/src/corelib/theme/mimagedirectory.cpp
  2. +++ b/src/corelib/theme/mimagedirectory.cpp
  3. @@ -82,6 +82,18 @@ MPixmapHandle ImageResource::fetchPixmap(const QSize &size)
  4. }
  5. }
  6.  
  7. + for (int x = 0; x < image.width(); ++x) {
  8. + for (int y = 0; y < image.height(); ++y) {
  9. + QRgb pixel = image.pixel(x, y);
  10. + if (pixel == qRgba(0, 0, 0, 0)) {
  11. + image.setPixel(QPoint(x, y), qRgb(255, 0, 127));
  12. + } else if (qAlpha(pixel) < 255) {
  13. + image.setPixel(QPoint(x, y), qRgb(0, 255, 127));
  14. + }
  15. + }
  16. + }
  17. +
  18. +
  19. #ifdef Q_WS_X11
  20. if (convertToX11) {
  21. Pixmap x11Pixmap = XCreatePixmap(QX11Info::display(), QX11Info::appRootWindow(),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement