diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index e1b3fd4..787c9a8 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -7,6 +7,8 @@ #include #include #include +#include +#include // IntelliPhotoGui constructor IntelliPhotoGui::IntelliPhotoGui(){ @@ -689,6 +691,11 @@ void IntelliPhotoGui::createGui(){ paintingArea = new PaintingArea(1280, 720); paintingArea->guiReference = this; + QScreen *screen = QGuiApplication::primaryScreen(); + QRect screenGeometry = screen->geometry(); + Buttonsize.setWidth(screenGeometry.width()/10); + Buttonsize.setHeight(screenGeometry.height()/10); + preview = QPixmap(":/Icons/Buttons/icons/circle-tool.svg"); CircleButton = new QPushButton(); CircleButton->setFixedSize(Buttonsize); diff --git a/src/GUI/IntelliPhotoGui.h b/src/GUI/IntelliPhotoGui.h index 25f6145..aeb2ede 100644 --- a/src/GUI/IntelliPhotoGui.h +++ b/src/GUI/IntelliPhotoGui.h @@ -124,7 +124,7 @@ PaintingArea* paintingArea; QPixmap preview; //size of all buttons -const QSize Buttonsize = QSize(35,35); +QSize Buttonsize; //buttons used for gui QPushButton* CircleButton;