diff --git a/conf/intelliphoto_dox b/conf/intelliphoto_dox index 8c10cda..c1d0642 100644 --- a/conf/intelliphoto_dox +++ b/conf/intelliphoto_dox @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = IntelliPhoto -PROJECT_NUMBER = 0.6 +PROJECT_NUMBER = 0.7 PROJECT_BRIEF = PROJECT_LOGO = OUTPUT_DIRECTORY = docs diff --git a/cppcheck_config.txt b/cppcheck_config.txt index 008b5ba..450c488 100644 --- a/cppcheck_config.txt +++ b/cppcheck_config.txt @@ -226,7 +226,10 @@ src/Layer/PaintingArea.cpp:18:0: information: Include file: "Tool/IntelliToolFlo src/Layer/PaintingArea.cpp:19:0: information: Include file: "Tool/IntelliToolPolygon.h" not found. [missingInclude] ^ -src/Layer/PaintingArea.cpp:20:0: information: Include file: "GUI/IntelliPhotoGui.h" not found. [missingInclude] +src/Layer/PaintingArea.cpp:20:0: information: Include file: "Tool/IntelliToolGradient.h" not found. [missingInclude] + +^ +src/Layer/PaintingArea.cpp:21:0: information: Include file: "GUI/IntelliPhotoGui.h" not found. [missingInclude] ^ src/Tool/IntelliTool.h:4:0: information: Include file: "IntelliHelper/IntelliColorPicker.h" not found. [missingInclude] @@ -276,6 +279,15 @@ src/Tool/IntelliToolFloodFill.cpp:5:0: information: Include file: n ^ src/Tool/IntelliToolFloodFill.cpp:6:0: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem] +^ +src/Tool/IntelliToolGradient.cpp:2:0: information: Include file: "Layer/PaintingArea.h" not found. [missingInclude] + +^ +src/Tool/IntelliToolGradient.cpp:3:0: information: Include file: "math.h" not found. [missingInclude] + +^ +src/Tool/IntelliToolGradient.cpp:4:0: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem] + ^ src/Tool/IntelliToolLine.h:5:0: information: Include file: "QPoint" not found. [missingInclude] diff --git a/cppcheck_errors.txt b/cppcheck_errors.txt index 3e6f39d..dc71700 100644 --- a/cppcheck_errors.txt +++ b/cppcheck_errors.txt @@ -7,21 +7,33 @@ src/IntelliHelper/IntelliDatamanager.cpp:66:53: note: Shadowed declaration src/IntelliHelper/IntelliDatamanager.cpp:89:33: note: Shadow variable int red, green, blue, alpha; ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::image' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::image' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::width' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::width' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::height' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::height' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::widthOffset' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::widthOffset' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::heightOffset' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::heightOffset' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ +src/Tool/IntelliToolGradient.cpp:6:22: warning: Member variable 'IntelliToolGradient::doubleA' is not initialized in the constructor. [uninitMemberVar] +IntelliToolGradient::IntelliToolGradient(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings) + ^ +src/Tool/IntelliToolGradient.cpp:6:22: warning: Member variable 'IntelliToolGradient::VectorAB' is not initialized in the constructor. [uninitMemberVar] +IntelliToolGradient::IntelliToolGradient(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings) + ^ +src/Tool/IntelliToolGradient.cpp:6:22: warning: Member variable 'IntelliToolGradient::NormalVector' is not initialized in the constructor. [uninitMemberVar] +IntelliToolGradient::IntelliToolGradient(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings) + ^ +src/Tool/IntelliToolGradient.cpp:6:22: warning: Member variable 'IntelliToolGradient::NormalDotNormal' is not initialized in the constructor. [uninitMemberVar] +IntelliToolGradient::IntelliToolGradient(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings) + ^ src/tst_unittest.cpp:1370:0: style: The function 'bench_Circle_fullDraw' is never used. [unusedFunction] ^ @@ -142,22 +154,22 @@ src/tst_unittest.cpp:1138:0: style: The function 'bench_setPolygon' is never use src/mainUnitTest.cpp:118:0: style: The function 'cleanupTestCase' is never used. [unusedFunction] ^ -src/GUI/IntelliPhotoGui.cpp:27:0: style: The function 'closeEvent' is never used. [unusedFunction] +src/GUI/IntelliPhotoGui.cpp:28:0: style: The function 'closeEvent' is never used. [unusedFunction] ^ src/mainUnitTest.cpp:113:0: style: The function 'initTestCase' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:324:0: style: The function 'mouseMoveEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:329:0: style: The function 'mouseMoveEvent' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:305:0: style: The function 'mousePressEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:310:0: style: The function 'mousePressEvent' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:337:0: style: The function 'mouseReleaseEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:342:0: style: The function 'mouseReleaseEvent' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:367:0: style: The function 'paintEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:372:0: style: The function 'paintEvent' is never used. [unusedFunction] ^ src/Layer/PaintingArea.cpp:223:0: style: The function 'slotActivateLayer' is never used. [unusedFunction] @@ -316,7 +328,7 @@ src/mainUnitTest.cpp:146:0: style: The function 'test_setLayerUp' is never used. src/mainUnitTest.cpp:144:0: style: The function 'test_setPolygon' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:352:0: style: The function 'wheelEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:357:0: style: The function 'wheelEvent' is never used. [unusedFunction] ^ nofile:0:0: information: Cppcheck cannot find all the include files (use --check-config for details) [missingInclude] diff --git a/docs/Icons/circle-tool.svg b/docs/Icons/circle-tool.svg deleted file mode 100644 index a6cc0e4..0000000 --- a/docs/Icons/circle-tool.svg +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/docs/Icons/eraser-tool.svg b/docs/Icons/eraser-tool.svg deleted file mode 100644 index cdc518d..0000000 --- a/docs/Icons/eraser-tool.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/docs/Icons/flood-fill-tool.svg b/docs/Icons/flood-fill-tool.svg deleted file mode 100644 index 980bb7a..0000000 --- a/docs/Icons/flood-fill-tool.svg +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/docs/Icons/magic-wand-tool.svg b/docs/Icons/magic-wand-tool.svg deleted file mode 100644 index 71f019d..0000000 --- a/docs/Icons/magic-wand-tool.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/docs/Icons/pen-tool.svg b/docs/Icons/pen-tool.svg deleted file mode 100644 index 5dd9782..0000000 --- a/docs/Icons/pen-tool.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/docs/Icons/plain-tool.svg b/docs/Icons/plain-tool.svg deleted file mode 100644 index 6dee885..0000000 --- a/docs/Icons/plain-tool.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/docs/Icons/polygon-tool.svg b/docs/Icons/polygon-tool.svg deleted file mode 100644 index 7602729..0000000 --- a/docs/Icons/polygon-tool.svg +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff --git a/docs/Icons/rectangle-tool.svg b/docs/Icons/rectangle-tool.svg deleted file mode 100644 index 3056a02..0000000 --- a/docs/Icons/rectangle-tool.svg +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/src/Bilder.qrc b/src/Bilder.qrc index 01e8468..f2c6dfa 100644 --- a/src/Bilder.qrc +++ b/src/Bilder.qrc @@ -10,5 +10,6 @@ icons/line-tool.svg icons/flood-fill-tool.svg icons/plain-tool.svg + icons/gradient-tool.svg diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index a92c481..39e3a20 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -7,6 +7,8 @@ #include #include #include +#include +#include // IntelliPhotoGui constructor IntelliPhotoGui::IntelliPhotoGui(){ @@ -20,7 +22,7 @@ IntelliPhotoGui::IntelliPhotoGui(){ setIntelliStyle(); // Size the app resize(600,600); - showMaximized(); + showMaximized(); setDefaultValues(); } @@ -242,13 +244,13 @@ void IntelliPhotoGui::slotSetActiveLayer(){ void IntelliPhotoGui::slotUpdateFastRenderSettingsOn(){ paintingArea->setRenderSettings(true); - FastRendererLabel->setText("Fast Render: On"); + FastRendererLabel->setText("Fast Render: On"); UpdateGui(); } void IntelliPhotoGui::slotUpdateFastRenderSettingsOff(){ paintingArea->setRenderSettings(false); - FastRendererLabel->setText("Fast Render: Off"); + FastRendererLabel->setText("Fast Render: Off"); UpdateGui(); } @@ -303,8 +305,8 @@ void IntelliPhotoGui::slotCreateFloodFillTool(){ } void IntelliPhotoGui::slotCreateGradientTool(){ - GradientButton->setChecked(true); - paintingArea->createGradientTool(); + GradientButton->setChecked(true); + paintingArea->createGradientTool(); } // Open an about dialog @@ -330,6 +332,7 @@ void IntelliPhotoGui::slotEnterPressed(){ void IntelliPhotoGui::slotResetToolButtons(){ CircleButton->setChecked(false); FloodFillButton->setChecked(false); + GradientButton->setChecked(false); LineButton->setChecked(false); PenButton->setChecked(false); PlainButton->setChecked(false); @@ -421,7 +424,7 @@ void IntelliPhotoGui::createActions(){ connect(actionCreateNewShapedLayer, SIGNAL(triggered()), this, SLOT(slotCreateNewShapedLayer())); // Delete New Layer action and tie to IntelliPhotoGui::deleteLayer() - actionDeleteLayer = new QAction(tr("&Delete Layer..."), this); + actionDeleteLayer = new QAction(tr("&Delete Layer"), this); actionDeleteLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_D)); connect(actionDeleteLayer, SIGNAL(triggered()), this, SLOT(slotDeleteLayer())); @@ -430,39 +433,39 @@ void IntelliPhotoGui::createActions(){ connect(actionChangeDim, SIGNAL(triggered()), this, SLOT(slotChangeDim())); connect(dimCanvas, SIGNAL(clicked()), this, SLOT(slotChangeDim())); - actionSetActiveLayer = new QAction(tr("&set Active"), this); + actionSetActiveLayer = new QAction(tr("&Set Active"), this); actionSetActiveLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_A)); connect(actionSetActiveLayer, SIGNAL(triggered()), this, SLOT(slotSetActiveLayer())); - actionSetActiveAlpha = new QAction(tr("&set Alpha"), this); + actionSetActiveAlpha = new QAction(tr("&Set Alpha"), this); actionSetActiveAlpha->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_A)); connect(actionSetActiveAlpha, SIGNAL(triggered()), this, SLOT(slotSetActiveAlpha())); - actionSetPolygon = new QAction(tr("&set new Polygondata"), this); + actionSetPolygon = new QAction(tr("&Set Polygon Data"), this); actionSetPolygon->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_P)); connect(actionSetPolygon, SIGNAL(triggered()), this, SLOT(slotSetPolygon())); - actionMovePositionUp = new QAction(tr("&move Up"), this); + actionMovePositionUp = new QAction(tr("&Move Up"), this); actionMovePositionUp->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Up)); connect(actionMovePositionUp, SIGNAL(triggered()), this, SLOT(slotPositionMoveUp())); - actionMovePositionDown = new QAction(tr("&move Down"), this); + actionMovePositionDown = new QAction(tr("&Move Down"), this); actionMovePositionDown->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Down)); connect(actionMovePositionDown, SIGNAL(triggered()), this, SLOT(slotPositionMoveDown())); - actionMovePositionLeft = new QAction(tr("&move Left"), this); + actionMovePositionLeft = new QAction(tr("&Move Left"), this); actionMovePositionLeft->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Left)); connect(actionMovePositionLeft, SIGNAL(triggered()), this, SLOT(slotPositionMoveLeft())); - actionMovePositionRight = new QAction(tr("&move Right"), this); + actionMovePositionRight = new QAction(tr("&Move Right"), this); actionMovePositionRight->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Right)); connect(actionMovePositionRight, SIGNAL(triggered()), this, SLOT(slotPositionMoveRight())); - actionMoveLayerUp = new QAction(tr("&move Layer Up"), this); + actionMoveLayerUp = new QAction(tr("&Move Forth"), this); actionMoveLayerUp->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Up)); connect(actionMoveLayerUp, SIGNAL(triggered()), this, SLOT(slotMoveLayerUp())); - actionMoveLayerDown = new QAction(tr("&move Layer Down"), this); + actionMoveLayerDown = new QAction(tr("&Move Back"), this); actionMoveLayerDown->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Down)); connect(actionMoveLayerDown, SIGNAL(triggered()), this, SLOT(slotMoveLayerDown())); @@ -528,18 +531,17 @@ void IntelliPhotoGui::createActions(){ connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons())); connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool())); - actionCreateGradientTool = new QAction(tr("&Gradient"),this); - connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotResetToolButtons())); - connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool())); + actionCreateGradientTool = new QAction(tr("&Gradient"),this); + actionCreateGradientTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_G)); + connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotResetTools())); + connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool())); // Create about action and tie to IntelliPhotoGui::about() - actionAboutDialog = new QAction(tr("&About"), this); - actionAboutDialog->setShortcut(Qt::Key_F2); + actionAboutDialog = new QAction(tr("&About"), this); connect(actionAboutDialog, SIGNAL(triggered()), this, SLOT(slotAboutDialog())); // Create about Qt action and tie to IntelliPhotoGui::aboutQt() - actionAboutQtDialog = new QAction(tr("About &Qt"), this); - actionAboutQtDialog->setShortcut(Qt::Key_F3); + actionAboutQtDialog = new QAction(tr("About &Qt"), this); connect(actionAboutQtDialog, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(EditLineWidth, SIGNAL(returnPressed()), this, SLOT(slotEnterPressed())); @@ -551,8 +553,8 @@ void IntelliPhotoGui::createActions(){ connect(FloodFillButton,SIGNAL(pressed()), this, SLOT(slotResetToolButtons())); connect(FloodFillButton, SIGNAL(clicked()), this, SLOT(slotCreateFloodFillTool())); - connect(GradientButton, SIGNAL(pressed()), this, SLOT(slotResetToolButtons())); - connect(GradientButton, SIGNAL(clicked()), this, SLOT(slotCreateGradientTool())); + connect(GradientButton, SIGNAL(pressed()), this, SLOT(slotResetTools())); + connect(GradientButton, SIGNAL(clicked()), this, SLOT(slotCreateGradientTool())); connect(LineButton,SIGNAL(pressed()), this, SLOT(slotResetToolButtons())); connect(LineButton, SIGNAL(clicked()), this, SLOT(slotCreateLineTool())); @@ -577,11 +579,11 @@ void IntelliPhotoGui::createActions(){ actionSetInnerAlpha->setShortcut(QKeySequence(Qt::ALT + Qt::Key_A)); connect(actionSetInnerAlpha, SIGNAL(triggered()), this, SLOT(slotSetInnerAlpha())); - actionGoBack = new QAction(tr("&Go back"),this); + actionGoBack = new QAction(tr("&Undo"),this); actionGoBack->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Z)); connect(actionGoBack, SIGNAL(triggered()), this, SLOT(slotGoBack())); - actionGoForward = new QAction(tr("&Go forward"),this); + actionGoForward = new QAction(tr("&Redo"),this); actionGoForward->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Y)); connect(actionGoForward, SIGNAL(triggered()), this, SLOT(slotGoForward())); } @@ -600,13 +602,13 @@ void IntelliPhotoGui::createMenus(){ fileMenu->addSeparator(); fileMenu->addAction(actionExit); - //Attach all actions to Render Settings + // Attach all actions to Render Settings renderMenu = new QMenu(tr("&Fast Renderer"), this); renderMenu->addAction(actionUpdateFastRenderSettingsOn); renderMenu->addAction(actionUpdateFastRenderSettingsOff); - //Attach all Layer Creations to Menu - layerCreationMenu = new QMenu(tr("&Create new Layer"), this); + // Attach all Layer Creations to Menu + layerCreationMenu = new QMenu(tr("&Create Layer"), this); layerCreationMenu->addAction(actionCreateNewRasterLayer); layerCreationMenu->addAction(actionCreateNewShapedLayer); @@ -627,41 +629,37 @@ void IntelliPhotoGui::createMenus(){ layerMenu->addSeparator(); layerMenu->addAction(actionDeleteLayer); - //Attach all Color Options + // Attach all Color Options colorMenu = new QMenu(tr("&Color"), this); colorMenu->addAction(actionColorPickerFirstColor); colorMenu->addAction(actionColorPickerSecondColor); colorMenu->addAction(actionColorSwap); - //Attach all Tool Creation Actions - toolCreationMenu = new QMenu(tr("&Drawingtools"), this); + // Attach all Tool Creation Actions + toolCreationMenu = new QMenu(tr("&Tool Selection"), this); toolCreationMenu->addAction(actionCreateCircleTool); - toolCreationMenu->addAction(actionCreateFloodFillTool); - toolCreationMenu->addAction(actionCreateGradientTool); + toolCreationMenu->addAction(actionCreateFloodFillTool); + toolCreationMenu->addAction(actionCreateGradientTool); toolCreationMenu->addAction(actionCreateLineTool); toolCreationMenu->addAction(actionCreatePenTool); toolCreationMenu->addAction(actionCreatePlainTool); toolCreationMenu->addAction(actionCreatePolygonTool); toolCreationMenu->addAction(actionCreateRectangleTool); - //Attach all Tool Setting Actions - toolSettingsMenu = new QMenu(tr("&Toolsettings"), this); + // Attach all Tool Setting Actions + toolSettingsMenu = new QMenu(tr("&Tool Settings"), this); toolSettingsMenu->addAction(actionSetWidth); toolSettingsMenu->addAction(actionSetInnerAlpha); - //Attach all Tool Options + // Attach all Tool Options toolMenu = new QMenu(tr("&Tools"), this); toolMenu->addMenu(toolCreationMenu); - toolMenu->addMenu(toolSettingsMenu); - toolMenu->addSeparator(); - toolMenu->addMenu(colorMenu); + toolMenu->addMenu(toolSettingsMenu); // Attach all actions to Options optionMenu = new QMenu(tr("&Options"), this); optionMenu->addAction(actionGoBack); - optionMenu->addAction(actionGoForward); - optionMenu->addMenu(layerMenu); - optionMenu->addMenu(toolMenu); + optionMenu->addAction(actionGoForward); optionMenu->addSeparator(); optionMenu->addMenu(renderMenu); optionMenu->addAction(actionChangeDim); @@ -674,6 +672,9 @@ void IntelliPhotoGui::createMenus(){ // Add menu items to the menubar menuBar()->addMenu(fileMenu); menuBar()->addMenu(optionMenu); + menuBar()->addMenu(layerMenu); + menuBar()->addMenu(toolMenu); + menuBar()->addMenu(colorMenu); menuBar()->addMenu(helpMenu); } @@ -691,6 +692,11 @@ void IntelliPhotoGui::createGui(){ paintingArea = new PaintingArea(1280, 720); paintingArea->guiReference = this; + QScreen *screen = QGuiApplication::primaryScreen(); + QRect screenGeometry = screen->geometry(); + Buttonsize.setWidth(screenGeometry.width()/20); + Buttonsize.setHeight(screenGeometry.height()/20); + preview = QPixmap(":/Icons/Buttons/icons/circle-tool.svg"); CircleButton = new QPushButton(); CircleButton->setFixedSize(Buttonsize); @@ -705,7 +711,7 @@ void IntelliPhotoGui::createGui(){ FloodFillButton->setIconSize(Buttonsize); FloodFillButton->setCheckable(true); - preview = QPixmap(":/Icons/Buttons/icons/icon.png"); + preview = QPixmap(":/Icons/Buttons/icons/gradient-tool.svg"); GradientButton = new QPushButton(); GradientButton->setFixedSize(Buttonsize); GradientButton->setIcon(preview); @@ -810,9 +816,9 @@ void IntelliPhotoGui::createGui(){ QString String = QString("%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height()); dimCanvas->setText(String); - FastRendererLabel = new QLabel(); - FastRendererLabel->setFixedSize(Buttonsize.width() * 2 + 15,(Buttonsize.height() * 2) / 3); - FastRendererLabel->setText("Fast Render: On"); + FastRendererLabel = new QLabel(); + FastRendererLabel->setFixedSize(Buttonsize.width() * 2 + 15,(Buttonsize.height() * 2) / 3); + FastRendererLabel->setText("Fast Render: On"); ScrollArea = new QScrollArea(this); ScrollArea->setBackgroundRole(QPalette::Dark); @@ -829,7 +835,7 @@ void IntelliPhotoGui::createGui(){ mainLayout->addWidget(PlainButton,3,2,1,1); mainLayout->addWidget(PolygonButton,3,3,1,1); mainLayout->addWidget(RectangleButton,4,2,1,1); - mainLayout->addWidget(GradientButton,4,3,1,1); + mainLayout->addWidget(GradientButton,4,3,1,1); mainLayout->addWidget(WidthLine,5,2,1,2); mainLayout->addWidget(EditLineWidth,6,2,1,2); mainLayout->addWidget(innerAlphaLine,7,2,1,2); @@ -841,7 +847,7 @@ void IntelliPhotoGui::createGui(){ mainLayout->addWidget(ActiveLayerImageLabel,12,2,1,2); mainLayout->addWidget(dimActive,13,2,1,2); mainLayout->addWidget(dimCanvas,14,2,1,2); - mainLayout->addWidget(FastRendererLabel,15,2,1,2); + mainLayout->addWidget(FastRendererLabel,15,2,1,2); mainLayout->setHorizontalSpacing(0); } diff --git a/src/GUI/IntelliPhotoGui.h b/src/GUI/IntelliPhotoGui.h index 434d3a2..503e5b6 100644 --- a/src/GUI/IntelliPhotoGui.h +++ b/src/GUI/IntelliPhotoGui.h @@ -290,7 +290,7 @@ QPixmap preview; /*! * \brief Buttonsize the size of all standard buttons */ -const QSize Buttonsize = QSize(35,35); +QSize Buttonsize; /*! * \brief CircleButton for creating a circle Tool diff --git a/docs/Icons/line-tool.svg b/src/icons/gradient-tool.svg similarity index 62% rename from docs/Icons/line-tool.svg rename to src/icons/gradient-tool.svg index 6ff03e8..8953735 100644 --- a/docs/Icons/line-tool.svg +++ b/src/icons/gradient-tool.svg @@ -15,10 +15,34 @@ viewBox="0 0 67.733332 67.733335" version="1.1" id="svg8" - sodipodi:docname="line-tool.svg" - inkscape:version="0.92.4 (5da689c313, 2019-01-14)"> + sodipodi:docname="gradient-tool.svg" + inkscape:version="0.92.4 (f8dce91, 2019-08-02)"> + + + + + + + @@ -40,6 +64,15 @@ x2="-13.131983" y2="106.49742" gradientUnits="userSpaceOnUse" /> + + inkscape:window-width="1853" + inkscape:window-height="1025" + inkscape:window-x="67" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-page="true" /> @@ -78,17 +112,19 @@ inkscape:groupmode="layer" id="layer1" transform="translate(0,-229.26665)"> + -