diff --git a/resources/OpenBoard.qrc b/resources/OpenBoard.qrc index f7008934..d1a5661f 100644 --- a/resources/OpenBoard.qrc +++ b/resources/OpenBoard.qrc @@ -366,6 +366,18 @@ images/desc.png images/toolPalette/axesTool.png images/numbersTool.svg + images/stylusPalette/eraserArrow.svg + images/stylusPalette/penArrow.svg + images/stylusPalette/eraserOnArrow.svg + images/stylusPalette/eraserOn.svg + images/stylusPalette/eraser.svg + images/stylusPalette/marker.svg + images/stylusPalette/markerArrow.svg + images/stylusPalette/markerOn.svg + images/stylusPalette/markerOnArrow.svg + images/stylusPalette/pen.svg + images/stylusPalette/penOn.svg + images/stylusPalette/penOnArrow.svg images/trash-my-documents.png images/trash-empty.png images/trash-folder.png diff --git a/resources/forms/mainWindow.ui b/resources/forms/mainWindow.ui index 48d40c93..a24810b4 100644 --- a/resources/forms/mainWindow.ui +++ b/resources/forms/mainWindow.ui @@ -1192,8 +1192,8 @@ - :/images/stylusPalette/pen.png - :/images/stylusPalette/penOn.png:/images/stylusPalette/pen.png + :/images/stylusPalette/pen.svg + :/images/stylusPalette/penOn.svg:/images/stylusPalette/pen.svg Pen @@ -1211,8 +1211,8 @@ - :/images/stylusPalette/eraser.png - :/images/stylusPalette/eraserOn.png:/images/stylusPalette/eraser.png + :/images/stylusPalette/eraser.svg + :/images/stylusPalette/eraserOn.svg:/images/stylusPalette/eraser.svg Eraser @@ -1230,8 +1230,8 @@ - :/images/stylusPalette/marker.png - :/images/stylusPalette/markerOn.png:/images/stylusPalette/marker.png + :/images/stylusPalette/marker.svg + :/images/stylusPalette/markerOn.svg:/images/stylusPalette/marker.svg Marker diff --git a/resources/images/stylusPalette/eraser.svg b/resources/images/stylusPalette/eraser.svg new file mode 100644 index 00000000..aba1b8b1 --- /dev/null +++ b/resources/images/stylusPalette/eraser.svg @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/eraserArrow.svg b/resources/images/stylusPalette/eraserArrow.svg new file mode 100644 index 00000000..21e35455 --- /dev/null +++ b/resources/images/stylusPalette/eraserArrow.svg @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/eraserOn.svg b/resources/images/stylusPalette/eraserOn.svg new file mode 100644 index 00000000..84e14906 --- /dev/null +++ b/resources/images/stylusPalette/eraserOn.svg @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/eraserOnArrow.svg b/resources/images/stylusPalette/eraserOnArrow.svg new file mode 100644 index 00000000..6f3c719d --- /dev/null +++ b/resources/images/stylusPalette/eraserOnArrow.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/marker.svg b/resources/images/stylusPalette/marker.svg new file mode 100644 index 00000000..2d9a2c39 --- /dev/null +++ b/resources/images/stylusPalette/marker.svg @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/markerArrow.svg b/resources/images/stylusPalette/markerArrow.svg new file mode 100644 index 00000000..0e2b9ad6 --- /dev/null +++ b/resources/images/stylusPalette/markerArrow.svg @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/markerOn.svg b/resources/images/stylusPalette/markerOn.svg new file mode 100644 index 00000000..5e874b3a --- /dev/null +++ b/resources/images/stylusPalette/markerOn.svg @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/markerOnArrow.svg b/resources/images/stylusPalette/markerOnArrow.svg new file mode 100644 index 00000000..80bb8213 --- /dev/null +++ b/resources/images/stylusPalette/markerOnArrow.svg @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/pen.svg b/resources/images/stylusPalette/pen.svg new file mode 100644 index 00000000..0b2b3176 --- /dev/null +++ b/resources/images/stylusPalette/pen.svg @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/penArrow.svg b/resources/images/stylusPalette/penArrow.svg new file mode 100644 index 00000000..0ef25469 --- /dev/null +++ b/resources/images/stylusPalette/penArrow.svg @@ -0,0 +1,286 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/penOn.svg b/resources/images/stylusPalette/penOn.svg new file mode 100644 index 00000000..8e07f511 --- /dev/null +++ b/resources/images/stylusPalette/penOn.svg @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/stylusPalette/penOnArrow.svg b/resources/images/stylusPalette/penOnArrow.svg new file mode 100644 index 00000000..58e6fe2e --- /dev/null +++ b/resources/images/stylusPalette/penOnArrow.svg @@ -0,0 +1,316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/desktop/UBDesktopAnnotationController.cpp b/src/desktop/UBDesktopAnnotationController.cpp index f63560e6..c810fd46 100644 --- a/src/desktop/UBDesktopAnnotationController.cpp +++ b/src/desktop/UBDesktopAnnotationController.cpp @@ -563,7 +563,7 @@ void UBDesktopAnnotationController::penActionPressed() int iX = cursorPos.x() - (palettePos.x() + buttonPos.x()); // x position of the cursor in the palette int iY = cursorPos.y() - (palettePos.y() + buttonPos.y()); // y position of the cursor in the palette - if(iX >= 37 && iX <= 44 && iY >= 37 && iY <= 44) + if(iX >= 30 && iX <= 44 && iY >= 30 && iY <= 44) { mbArrowClicked = true; penActionReleased(); @@ -617,7 +617,7 @@ void UBDesktopAnnotationController::eraserActionPressed() int iX = cursorPos.x() - (palettePos.x() + buttonPos.x()); // x position of the cursor in the palette int iY = cursorPos.y() - (palettePos.y() + buttonPos.y()); // y position of the cursor in the palette - if(iX >= 37 && iX <= 44 && iY >= 37 && iY <= 44) + if(iX >= 30 && iX <= 44 && iY >= 30 && iY <= 44) { mbArrowClicked = true; eraserActionReleased(); @@ -672,7 +672,7 @@ void UBDesktopAnnotationController::markerActionPressed() int iX = cursorPos.x() - (palettePos.x() + buttonPos.x()); // x position of the cursor in the palette int iY = cursorPos.y() - (palettePos.y() + buttonPos.y()); // y position of the cursor in the palette - if(iX >= 37 && iX <= 44 && iY >= 37 && iY <= 44) + if(iX >= 30 && iX <= 44 && iY >= 30 && iY <= 44) { mbArrowClicked = true; markerActionReleased(); diff --git a/src/desktop/UBDesktopPalette.cpp b/src/desktop/UBDesktopPalette.cpp index 2346e4ac..4ef402b6 100644 --- a/src/desktop/UBDesktopPalette.cpp +++ b/src/desktop/UBDesktopPalette.cpp @@ -214,14 +214,14 @@ void UBDesktopPalette::showEvent(QShowEvent *event) QIcon penIcon; QIcon markerIcon; QIcon eraserIcon; - penIcon.addPixmap(QPixmap(":images/stylusPalette/penArrow.png"), QIcon::Normal, QIcon::Off); - penIcon.addPixmap(QPixmap(":images/stylusPalette/penOnArrow.png"), QIcon::Normal, QIcon::On); + penIcon.addFile(":images/stylusPalette/penArrow.svg", QSize(), QIcon::Normal, QIcon::Off); + penIcon.addFile(":images/stylusPalette/penOnArrow.svg", QSize(), QIcon::Normal, QIcon::On); UBApplication::mainWindow->actionPen->setIcon(penIcon); - markerIcon.addPixmap(QPixmap(":images/stylusPalette/markerArrow.png"), QIcon::Normal, QIcon::Off); - markerIcon.addPixmap(QPixmap(":images/stylusPalette/markerOnArrow.png"), QIcon::Normal, QIcon::On); + markerIcon.addFile(":images/stylusPalette/markerArrow.svg", QSize(), QIcon::Normal, QIcon::Off); + markerIcon.addFile(":images/stylusPalette/markerOnArrow.svg", QSize(), QIcon::Normal, QIcon::On); UBApplication::mainWindow->actionMarker->setIcon(markerIcon); - eraserIcon.addPixmap(QPixmap(":images/stylusPalette/eraserArrow.png"), QIcon::Normal, QIcon::Off); - eraserIcon.addPixmap(QPixmap(":images/stylusPalette/eraserOnArrow.png"), QIcon::Normal, QIcon::On); + eraserIcon.addFile(":images/stylusPalette/eraserArrow.svg", QSize(), QIcon::Normal, QIcon::Off); + eraserIcon.addFile(":images/stylusPalette/eraserOnArrow.svg", QSize(), QIcon::Normal, QIcon::On); UBApplication::mainWindow->actionEraser->setIcon(eraserIcon); adjustPosition(); @@ -233,14 +233,14 @@ void UBDesktopPalette::hideEvent(QHideEvent *event) QIcon penIcon; QIcon markerIcon; QIcon eraserIcon; - penIcon.addPixmap(QPixmap(":images/stylusPalette/pen.png"), QIcon::Normal, QIcon::Off); - penIcon.addPixmap(QPixmap(":images/stylusPalette/penOn.png"), QIcon::Normal, QIcon::On); + penIcon.addFile(":images/stylusPalette/pen.svg", QSize(), QIcon::Normal, QIcon::Off); + penIcon.addFile(":images/stylusPalette/penOn.svg", QSize(), QIcon::Normal, QIcon::On); UBApplication::mainWindow->actionPen->setIcon(penIcon); - markerIcon.addPixmap(QPixmap(":images/stylusPalette/marker.png"), QIcon::Normal, QIcon::Off); - markerIcon.addPixmap(QPixmap(":images/stylusPalette/markerOn.png"), QIcon::Normal, QIcon::On); + markerIcon.addFile(":images/stylusPalette/marker.svg", QSize(), QIcon::Normal, QIcon::Off); + markerIcon.addFile(":images/stylusPalette/markerOn.svg", QSize(), QIcon::Normal, QIcon::On); UBApplication::mainWindow->actionMarker->setIcon(markerIcon); - eraserIcon.addPixmap(QPixmap(":images/stylusPalette/eraser.png"), QIcon::Normal, QIcon::Off); - eraserIcon.addPixmap(QPixmap(":images/stylusPalette/eraserOn.png"), QIcon::Normal, QIcon::On); + eraserIcon.addFile(":images/stylusPalette/eraser.svg", QSize(), QIcon::Normal, QIcon::Off); + eraserIcon.addFile(":images/stylusPalette/eraserOn.svg", QSize(), QIcon::Normal, QIcon::On); UBApplication::mainWindow->actionEraser->setIcon(eraserIcon); }