From 651bf806fc7fe5eac9e8bf541582ba26660b6c4d Mon Sep 17 00:00:00 2001 From: Jonas Mucke Date: Wed, 22 Jan 2020 21:52:08 +0100 Subject: [PATCH] upset for future work --- src/GUI/IntelliPhotoGui.cpp | 1 + src/Layer/PaintingArea.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index 9fec611..cddc0ed 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -5,6 +5,7 @@ #include "QEvent" #include "QCloseEvent" +#include "QScrollBar" // IntelliPhotoGui constructor IntelliPhotoGui::IntelliPhotoGui(){ diff --git a/src/Layer/PaintingArea.cpp b/src/Layer/PaintingArea.cpp index 2e23384..334a4d4 100644 --- a/src/Layer/PaintingArea.cpp +++ b/src/Layer/PaintingArea.cpp @@ -322,7 +322,7 @@ void PaintingArea::wheelEvent(QWheelEvent*event){ // The QPaintEvent is sent to widgets that need to // update themselves void PaintingArea::paintEvent(QPaintEvent*event){ - this->setFixedSize(QSize(maxWidth,maxHeight)); + this->setFixedSize(QSize(maxWidth*2,maxHeight*2)); this->drawLayers(); QPainter painter(this); @@ -331,7 +331,8 @@ void PaintingArea::paintEvent(QPaintEvent*event){ painter.scale(1,1); //calulate image here for scroll - painter.drawImage(0,0, *Canvas); + //Todo set offset in first to parameters and calulate them into mouse position + painter.drawImage(0, 0, *Canvas, 0, 0); update(); }