diff --git a/app/src/colorwheel.cpp b/app/src/colorwheel.cpp index 023a6448a..8100effe6 100644 --- a/app/src/colorwheel.cpp +++ b/app/src/colorwheel.cpp @@ -172,7 +172,7 @@ void ColorWheel::mouseReleaseEvent(QMouseEvent *) void ColorWheel::resizeEvent(QResizeEvent* event) { mWheelPixmap = QPixmap(event->size()); - mWheelPixmap.fill(palette().background().color()); + mWheelPixmap.fill(palette().window().color()); drawWheelImage(event->size()); drawSquareImage(mCurrentColor.hue()); diff --git a/app/src/preferencesdialog.cpp b/app/src/preferencesdialog.cpp index a9941fe14..c2b8e79fe 100644 --- a/app/src/preferencesdialog.cpp +++ b/app/src/preferencesdialog.cpp @@ -562,7 +562,7 @@ void FilesPage::initPreset() QString name = mPresetSettings->value(key).toString(); if (name.isEmpty()) continue; - + QListWidgetItem* item = new QListWidgetItem(name); item->setFlags(item->flags() | Qt::ItemIsEditable); item->setData(Qt::UserRole, index); @@ -681,19 +681,19 @@ void FilesPage::updateValues() bool ok = true; int defaultPresetIndex = mManager->getInt(SETTING::DEFAULT_PRESET); - + for (int i = 0; i < ui->presetListWidget->count(); i++) { QListWidgetItem* item = ui->presetListWidget->item(i); int presetIndex = item->data(Qt::UserRole).toInt(&ok); bool isDefault = presetIndex == defaultPresetIndex; - + QFont font = item->font(); font.setBold(isDefault); // Bold text for the default item item->setFont(font); - QBrush backgroundBrush = (isDefault) ? palette().light() : palette().background(); + QBrush backgroundBrush = (isDefault) ? palette().light() : palette().window(); item->setBackground(backgroundBrush); } ui->autosaveCheckBox->setChecked(mManager->isOn(SETTING::AUTO_SAVE)); @@ -729,7 +729,7 @@ ToolsPage::~ToolsPage() } void ToolsPage::updateValues() -{ +{ ui->useQuickSizingBox->setChecked(mManager->isOn(SETTING::QUICK_SIZING)); setRotationIncrement(mManager->getInt(SETTING::ROTATION_INCREMENT)); } diff --git a/core_lib/src/graphics/bitmap/bitmapimage.cpp b/core_lib/src/graphics/bitmap/bitmapimage.cpp index 65e14782a..61b41df7e 100644 --- a/core_lib/src/graphics/bitmap/bitmapimage.cpp +++ b/core_lib/src/graphics/bitmap/bitmapimage.cpp @@ -436,7 +436,7 @@ void BitmapImage::autoCrop() int relRight = mBounds.width()-1; // Check left row - isEmpty = (relBottom >= relTop); // Check left only when + isEmpty = (relBottom >= relTop); // Check left only when while (isEmpty && relBottom >= relTop && relLeft <= relRight) // Loop through columns { // Point cursor to the pixel at row relTop and column relLeft @@ -628,7 +628,7 @@ void BitmapImage::drawPath(QPainterPath path, QPen pen, QBrush brush, painter.setPen(pen); painter.setBrush(brush); painter.setTransform(QTransform().translate(-mBounds.left(), -mBounds.top())); - painter.setMatrixEnabled(true); + painter.setWorldMatrixEnabled(true); if (path.length() > 0) { /* @@ -714,7 +714,7 @@ Status BitmapImage::writeFile(const QString& filename) bool b = mImage->save(filename); return (b) ? Status::OK : Status::FAIL; } - + if (bounds().isEmpty()) { QFile f(filename); diff --git a/core_lib/src/graphics/vector/beziercurve.cpp b/core_lib/src/graphics/vector/beziercurve.cpp index 68671d448..1f5aac991 100644 --- a/core_lib/src/graphics/vector/beziercurve.cpp +++ b/core_lib/src/graphics/vector/beziercurve.cpp @@ -444,7 +444,7 @@ void BezierCurve::drawPath(QPainter& painter, Object* object, QTransform transfo qreal renderedWidth = width; if (simplified) { - renderedWidth = 1.0/painter.matrix().m11(); + renderedWidth = 1.0/painter.worldTransform().m11(); // Make sure the line width is positive. renderedWidth = fabs(renderedWidth); @@ -483,7 +483,7 @@ void BezierCurve::drawPath(QPainter& painter, Object* object, QTransform transfo // highlight the selected elements colour = QColor(100,150,255); // highlight colour painter.setBrush(Qt::NoBrush); - qreal lineWidth = 1.5/painter.matrix().m11(); + qreal lineWidth = 1.5/painter.worldTransform().m11(); lineWidth = fabs(lineWidth); // make sure line width is positive, otherwise nothing is drawn painter.setPen(QPen(QBrush(colour), lineWidth, Qt::SolidLine, Qt::RoundCap,Qt::RoundJoin)); if (isSelected()) painter.drawPath(myCurve.getSimplePath()); diff --git a/core_lib/src/structure/object.cpp b/core_lib/src/structure/object.cpp index 4a49caaf2..91e4fcf9e 100644 --- a/core_lib/src/structure/object.cpp +++ b/core_lib/src/structure/object.cpp @@ -812,7 +812,7 @@ bool Object::exportX(int frameStart, int frameEnd, QTransform view, QSize export xPainter.setWorldTransform(thumbView); xPainter.setClipRegion(thumbView.inverted().map(QRegion(target))); paintImage(xPainter, i, false, antialiasing); - xPainter.resetMatrix(); + xPainter.resetTransform(); xPainter.setClipping(false); xPainter.setPen(Qt::black); xPainter.drawRect(target); diff --git a/core_lib/src/tool/strokemanager.h b/core_lib/src/tool/strokemanager.h index 560be3606..043661d7a 100644 --- a/core_lib/src/tool/strokemanager.h +++ b/core_lib/src/tool/strokemanager.h @@ -25,7 +25,7 @@ GNU General Public License for more details. #include #include #include -#include +#include #include "object.h" #include "assert.h" @@ -76,7 +76,7 @@ class StrokeManager : public QObject QTimer timer; - QTime mSingleshotTime; + QElapsedTimer mSingleshotTime; QPointF mCurrentPressPixel = { 0, 0 }; QPointF mLastPressPixel2 = { 0, 0 }; QPointF mLastPressPixel = { 0, 0 };