adjust checkerboard alpha channel value

This commit is contained in:
Gary Wang 2020-01-27 17:11:24 +08:00
parent 5cbcbfecba
commit 2d07290fbe
2 changed files with 7 additions and 7 deletions

View File

@ -213,9 +213,9 @@ void GraphicsView::dragEnterEvent(QDragEnterEvent *event)
} else { } else {
event->ignore(); event->ignore();
} }
qDebug() << event->mimeData() << "Drag Enter Event" // qDebug() << event->mimeData() << "Drag Enter Event"
<< event->mimeData()->hasUrls() << event->mimeData()->hasImage() // << event->mimeData()->hasUrls() << event->mimeData()->hasImage()
<< event->mimeData()->formats() << event->mimeData()->hasFormat("text/uri-list"); // << event->mimeData()->formats() << event->mimeData()->hasFormat("text/uri-list");
return QGraphicsView::dragEnterEvent(event); return QGraphicsView::dragEnterEvent(event);
} }
@ -285,9 +285,9 @@ void GraphicsView::setCheckerboardEnabled(bool enabled)
if (m_checkerboardEnabled) { if (m_checkerboardEnabled) {
// Prepare background check-board pattern // Prepare background check-board pattern
QPixmap tilePixmap(0x20, 0x20); QPixmap tilePixmap(0x20, 0x20);
tilePixmap.fill(QColor(35, 35, 35, 110)); tilePixmap.fill(QColor(35, 35, 35, 170));
QPainter tilePainter(&tilePixmap); QPainter tilePainter(&tilePixmap);
QColor color(40, 40, 40, 110); QColor color(45, 45, 45, 170);
tilePainter.fillRect(0, 0, 0x10, 0x10, color); tilePainter.fillRect(0, 0, 0x10, 0x10, color);
tilePainter.fillRect(0x10, 0x10, 0x10, 0x10, color); tilePainter.fillRect(0x10, 0x10, 0x10, 0x10, color);
tilePainter.end(); tilePainter.end();

View File

@ -268,8 +268,8 @@ void MainWindow::mousePressEvent(QMouseEvent *event)
if (event->buttons() & Qt::LeftButton && !isMaximized()) { if (event->buttons() & Qt::LeftButton && !isMaximized()) {
m_clickedOnWindow = true; m_clickedOnWindow = true;
m_oldMousePos = event->pos(); m_oldMousePos = event->pos();
qDebug() << m_oldMousePos << m_graphicsView->transform().m11() // qDebug() << m_oldMousePos << m_graphicsView->transform().m11()
<< m_graphicsView->transform().m22() << m_graphicsView->matrix().m12(); // << m_graphicsView->transform().m22() << m_graphicsView->matrix().m12();
event->accept(); event->accept();
} }