upset for future work

This commit is contained in:
Jonas Mucke
2020-01-22 21:52:08 +01:00
parent 8e187ba6b3
commit 651bf806fc
2 changed files with 4 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
#include "QEvent"
#include "QCloseEvent"
#include "QScrollBar"
// IntelliPhotoGui constructor
IntelliPhotoGui::IntelliPhotoGui(){

View File

@@ -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();
}