diff --git a/graphics.qrc b/graphics.qrc
index 81b9fa0a..d01542fc 100644
--- a/graphics.qrc
+++ b/graphics.qrc
@@ -33,5 +33,7 @@
img/buttonIconsWhite/pencil.pngimg/buttonIconsBlack/cursor-move.pngimg/buttonIconsWhite/cursor-move.png
+ img/buttonIconsBlack/square.png
+ img/buttonIconsWhite/square.png
diff --git a/img/buttonIconsBlack/square.png b/img/buttonIconsBlack/square.png
new file mode 100644
index 00000000..e04961b0
Binary files /dev/null and b/img/buttonIconsBlack/square.png differ
diff --git a/img/buttonIconsBlack/square.svg b/img/buttonIconsBlack/square.svg
new file mode 100644
index 00000000..ee8836e6
--- /dev/null
+++ b/img/buttonIconsBlack/square.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/img/buttonIconsWhite/square.png b/img/buttonIconsWhite/square.png
new file mode 100644
index 00000000..82c2c18c
Binary files /dev/null and b/img/buttonIconsWhite/square.png differ
diff --git a/img/buttonIconsWhite/square.svg b/img/buttonIconsWhite/square.svg
new file mode 100644
index 00000000..b5986e3e
--- /dev/null
+++ b/img/buttonIconsWhite/square.svg
@@ -0,0 +1,56 @@
+
+
diff --git a/src/capture/button.cpp b/src/capture/button.cpp
index 76d4dfdf..70975a26 100644
--- a/src/capture/button.cpp
+++ b/src/capture/button.cpp
@@ -119,7 +119,7 @@ QIcon Button::getIcon(const Type t, bool isWhite) {
case Type::pencil:
path += "pencil.png";
break;
- case Type::rectangle:
+ case Type::selection:
path += "square-outline.png";
break;
case Type::save:
@@ -134,6 +134,9 @@ QIcon Button::getIcon(const Type t, bool isWhite) {
case Type::move:
path += "cursor-move.png";
break;
+ case Type::rectangle:
+ path += "square.png";
+ break;
default:
break;
}
@@ -261,16 +264,17 @@ Button::typeData Button::typeTooltip = {
{Button::Type::exit, QT_TR_NOOP("Leaves the capture screen")},
{Button::Type::copy, QT_TR_NOOP("Copies the selecion into the clipboard")},
{Button::Type::save, QT_TR_NOOP("Opens the save image window")},
- {Button::Type::pencil, QT_TR_NOOP("Sets the paint tool to a pencil")},
- {Button::Type::line, QT_TR_NOOP("Sets the paint tool to a line drawer")},
- {Button::Type::arrow, QT_TR_NOOP("Sets the paint tool to an arrow drawer")},
- {Button::Type::rectangle, QT_TR_NOOP("Sets the paint tool to a rectagle drawer")},
- {Button::Type::circle, QT_TR_NOOP("Sets the paint tool to a circle drawer")},
- {Button::Type::marker, QT_TR_NOOP("Sets the paint tool to a marker")},
- {Button::Type::text, QT_TR_NOOP("Sets the paint tool to a text creator")},
+ {Button::Type::pencil, QT_TR_NOOP("Sets the Pencil as the paint tool")},
+ {Button::Type::line, QT_TR_NOOP("Sets the Line as the paint tool")},
+ {Button::Type::arrow, QT_TR_NOOP("Sets the Arrow as the paint tool")},
+ {Button::Type::rectangle, QT_TR_NOOP("Sets the Rectangle as the paint tool")},
+ {Button::Type::circle, QT_TR_NOOP("Sets the Circle as the paint tool")},
+ {Button::Type::marker, QT_TR_NOOP("Sets the Marker as the paint tool")},
+ {Button::Type::text, QT_TR_NOOP("Sets the Text as the paint tool")},
{Button::Type::colorPicker, QT_TR_NOOP("Opens the color picker widget")},
{Button::Type::undo, QT_TR_NOOP("Undo the last modification")},
- {Button::Type::imageUploader, QT_TR_NOOP("Upload the selection to Imgur")},
+ {Button::Type::imageUploader, QT_TR_NOOP("Uploads the selection to Imgur")},
+ {Button::Type::selection, QT_TR_NOOP("Sets the Selection as the paint tool")},
{Button::Type::move, QT_TR_NOOP("Move the selection area")}
};
@@ -290,6 +294,7 @@ Button::typeData Button::typeName = {
{Button::Type::colorPicker, QT_TR_NOOP("Color Picker")},
{Button::Type::undo, QT_TR_NOOP("Undo")},
{Button::Type::imageUploader, QT_TR_NOOP("Image Uploader")},
+ {Button::Type::selection, QT_TR_NOOP("Rectangular Selection")},
{Button::Type::move, QT_TR_NOOP("Move")}
};
diff --git a/src/capture/button.h b/src/capture/button.h
index 3cf45078..db17a7c4 100644
--- a/src/capture/button.h
+++ b/src/capture/button.h
@@ -43,6 +43,7 @@ public:
undo,
imageUploader,
move,
+ selection,
last, // used for iteration over the enum
text,
mouseVisibility,
diff --git a/src/capture/capturemodification.cpp b/src/capture/capturemodification.cpp
index 5a05de31..77c2d845 100644
--- a/src/capture/capturemodification.cpp
+++ b/src/capture/capturemodification.cpp
@@ -25,9 +25,12 @@ CaptureModification::CaptureModification(const Button::Type t, const QPoint p,
const QColor c) : m_color(c), m_type(t)
{
m_coords.append(p);
- if (m_type == Button::Type::circle || m_type == Button::Type::rectangle
- || m_type == Button::Type::arrow || m_type == Button::Type::line ||
- m_type == Button::Type::marker) {
+ if (m_type == Button::Type::circle
+ || m_type == Button::Type::rectangle
+ || m_type == Button::Type::arrow
+ || m_type == Button::Type::line
+ || m_type == Button::Type::marker
+ || m_type == Button::Type::selection) {
m_coords.append(p);
}
}
@@ -49,9 +52,12 @@ QVector CaptureModification::getPoints() const {
}
// addPoint adds a point to the vector of points
void CaptureModification::addPoint(const QPoint p) {
- if (m_type == Button::Type::circle || m_type == Button::Type::rectangle
- || m_type == Button::Type::arrow || m_type == Button::Type::line ||
- m_type == Button::Type::marker) {
+ if (m_type == Button::Type::circle
+ || m_type == Button::Type::rectangle
+ || m_type == Button::Type::arrow
+ || m_type == Button::Type::line
+ || m_type == Button::Type::marker
+ || m_type == Button::Type::selection) {
m_coords[1] = p;
} else {
m_coords.append(p);
diff --git a/src/capture/screenshot.cpp b/src/capture/screenshot.cpp
index 3f5e4c1f..5aab84ce 100644
--- a/src/capture/screenshot.cpp
+++ b/src/capture/screenshot.cpp
@@ -228,7 +228,11 @@ void Screenshot::paintInPainter(QPainter &painter,
case Button::Type::pencil:
painter.drawPolyline(points.data(), points.size());
break;
+ case Button::Type::selection:
+ painter.drawRect(QRect(points[0], points[1]));
+ break;
case Button::Type::rectangle:
+ painter.setBrush(QBrush(modification.getColor()));
painter.drawRect(QRect(points[0], points[1]));
break;
default:
diff --git a/translation/Internationalization_es.ts b/translation/Internationalization_es.ts
index 19fc415f..0937d6cb 100644
--- a/translation/Internationalization_es.ts
+++ b/translation/Internationalization_es.ts
@@ -4,162 +4,204 @@
Button
-
+ Shows the dimensions of the selection (X Y)
- Muestra la dimensión de ls selección (X Y)
+ Muestra la dimensión de la selección (X Y)
-
+ Sets the visibility of the mouse pointerSelecciona la visibilidad del puntero del ratón
-
+ Leaves the capture screenCierra la pantalla de captura
-
+ Copies the selecion into the clipboardCopia la selección al portapapeles
-
+ Opens the save image windowAbre la ventana de guardar imagen
- Sets the paint tool to a pencil
- Establece el lápiz como herramienta de dibujo
+ Establece el lápiz como herramienta de dibujo
- Sets the paint tool to a line drawer
- Establece la línea como herramienta de dibujo
+ Establece la línea como herramienta de dibujo
- Sets the paint tool to an arrow drawer
- Establece la flecha como herramienta de dibujo
+ Establece la flecha como herramienta de dibujo
- Sets the paint tool to a rectagle drawer
- Establece el rectángulo como herramienta de dibujo
+ Establece el rectángulo como herramienta de dibujo
- Sets the paint tool to a circle drawer
- Establece el círculo como herramienta de dibujo
+ Establece el círculo como herramienta de dibujo
- Sets the paint tool to a marker
- Establece el marcador como herramienta de dibujo
+ Establece el marcador como herramienta de dibujo
- Sets the paint tool to a text creator
- Establece el texto como herramienta de dibujo
+ Establece el texto como herramienta de dibujo
-
+ Opens the color picker widgetAbre el selector de color
-
+ Undo the last modificationDeshace la última modificación
- Upload the selection to Imgur
+ Sube la selección a Imgur
+
+
+
+ Sets the Pencil as the paint tool
+ Establece el Lápiz como herramienta de dibujo
+
+
+
+ Sets the Line as the paint tool
+ Establece la Línea como herramienta de dibujo
+
+
+
+ Sets the Arrow as the paint tool
+ Establece la Flecha como herramienta de dibujo
+
+
+
+ Sets the Rectangle as the paint tool
+ Establece el Rectángulo como herramienta de dibujo
+
+
+
+ Sets the Circle as the paint tool
+ Establece el Círculo como herramienta de dibujo
+
+
+
+ Sets the Marker as the paint tool
+ Establece el Marcador como herramienta de dibujo
+
+
+
+ Sets the Text as the paint tool
+ Establece el Texto como herramienta de dibujo
+
+
+
+ Uploads the selection to ImgurSube la selección a Imgur
-
+
+ Sets the Selection as the paint tool
+ Establece la Selección como herramienta de dibujo
+
+
+ Move the selection areaMueve la selección
-
+ Selection Size IndicatorIndicador de Tamaño de Selección
-
+ Mouse VisibilityVisibilidad del Ratón
-
+ ExitSalir
-
+ CopyCopiar
-
+ SaveGuardar
-
+ PencilLápiz
-
+ LineLínea
-
+ ArrowFlecha
-
+ RectangleRectángulo
-
+ CircleCírculo
-
+ MarkerMarcador
-
+ TextTexto
-
+ Color PickerSelector de Color
-
+ UndoDeshacer
-
+ Image UploaderSubir Imagen
-
+
+ Rectangular Selection
+ Selección Rectangular
+
+
+ MoveMover Selección