From c6776cb76e80b8d986ba6ffe81d1db2cad71e597 Mon Sep 17 00:00:00 2001 From: fourtf Date: Thu, 17 Aug 2017 22:54:26 +0200 Subject: [PATCH] removed old code for testing colors --- src/widgets/chatwidgetview.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/widgets/chatwidgetview.cpp b/src/widgets/chatwidgetview.cpp index 37735f9ef..4b90362e9 100644 --- a/src/widgets/chatwidgetview.cpp +++ b/src/widgets/chatwidgetview.cpp @@ -173,39 +173,6 @@ void ChatWidgetView::paintEvent(QPaintEvent * /*event*/) _painter.fillRect(rect(), this->colorScheme.ChatBackground); - // code for tesing colors - /* - QColor color; - static ConcurrentMap imgCache; - - std::function getImg = [&scheme](qreal light) { - return imgCache.getOrAdd(light, [&scheme, &light] { - QImage *img = new QImage(150, 50, QImage::Format_RGB32); - - QColor color; - - for (int j = 0; j < 50; j++) { - for (qreal i = 0; i < 150; i++) { - color = QColor::fromHslF(i / 150.0, light, j / 50.0); - - scheme.normalizeColor(color); - - img->setPixelColor(i, j, color); - } - } - - return img; - }); - }; - - for (qreal k = 0; k < 4.8; k++) { - auto img = getImg(k / 5); - - painter.drawImage(QRect(k * 150, 0, 150, 150), *img); - } - - painter.fillRect(QRect(0, 9, 500, 2), QColor(0, 0, 0));*/ - auto messages = this->chatWidget->getMessagesSnapshot(); int start = this->scrollBar.getCurrentValue();