diff --git a/area.js b/area.js index 2b78cd8..28c7705 100644 --- a/area.js +++ b/area.js @@ -32,6 +32,9 @@ import Gtk from 'gi://Gtk'; import Pango from 'gi://Pango'; import Shell from 'gi://Shell'; import St from 'gi://St'; +import Cogl from 'gi://Cogl'; + +const Color = Clutter.Color ?? Cogl.Color; import * as Main from 'resource:///org/gnome/shell/ui/main.js'; import * as Screenshot from 'resource:///org/gnome/shell/ui/screenshot.js'; @@ -1164,7 +1167,7 @@ export const DrawingArea = GObject.registerClass({ } _onColorPicked(color) { - if (color instanceof Clutter.Color) + if (color instanceof Color) color = color.to_string().slice(0, -2); this.currentColor = this.getColorFromString(color); @@ -1209,7 +1212,7 @@ export const DrawingArea = GObject.registerClass({ if (pickPixel.pickAsync) { pickPixel.pickAsync().then(result => { - if (result instanceof Clutter.Color) { + if (result instanceof Color) { // GS 3.38+ this._onColorPicked(result); } else { @@ -1472,7 +1475,7 @@ export const DrawingArea = GObject.registerClass({ // toString provides a string suitable for displaying the color name to the user. getColorFromString(string, fallback) { let [colorString, displayName] = string.split(':'); - let [success, color] = Clutter.Color.from_string(colorString); + let [success, color] = Color.from_string(colorString); color.toJSON = () => colorString; color.toString = () => displayName || colorString; if (success) diff --git a/data/icons/tool-arrow-symbolic.svg b/data/icons/tool-arrow-symbolic.svg new file mode 100644 index 0000000..742843f --- /dev/null +++ b/data/icons/tool-arrow-symbolic.svg @@ -0,0 +1,7 @@ + + +https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/symbolic/actions/detach-symbolic.svg +https://www.gnu.org/licenses/gpl-3.0.html + + + diff --git a/elements.js b/elements.js index eec7739..c6a039f 100644 --- a/elements.js +++ b/elements.js @@ -27,19 +27,22 @@ import Clutter from 'gi://Clutter'; import GObject from 'gi://GObject'; import Pango from 'gi://Pango'; import PangoCairo from 'gi://PangoCairo'; +import Cogl from 'gi://Cogl'; import { CURATED_UUID as UUID } from './utils.js'; +const Color = Clutter.Color ?? Cogl.Color; + export const StaticColor = { - WHITE: Clutter.Color.new(255, 255, 255, 255), - BLUE: Clutter.Color.new(0, 0, 255, 255), - TRANSPARENT: Clutter.Color.new(0, 0, 0, 0), - BLACK: Clutter.Color.new(0, 0, 0, 255), - GRAY: Clutter.Color.new(160, 160, 164, 255), - RED: Clutter.Color.new(255, 0, 0, 255) -} + WHITE: Color.from_string('#ffffff'), + BLUE: Color.from_string('#0000ff'), + TRANSPARENT: Color.from_string('#00000000'), + BLACK: Color.from_string('#000000'), + GRAY: Color.from_string('#a0a0a4'), + RED: Color.from_string('#ff0000') +}; -export const Shape = { NONE: 0, LINE: 1, ELLIPSE: 2, RECTANGLE: 3, TEXT: 4, POLYGON: 5, POLYLINE: 6, IMAGE: 7 }; +export const Shape = { NONE: 0, LINE: 1, ELLIPSE: 2, RECTANGLE: 3, TEXT: 4, POLYGON: 5, POLYLINE: 6, IMAGE: 7, ARROW: 8 }; export const TextAlignment = { LEFT: 0, CENTER: 1, RIGHT: 2 }; export const Transformation = { TRANSLATION: 0, ROTATION: 1, SCALE_PRESERVE: 2, STRETCH: 3, REFLECTION: 4, INVERSION: 5, SMOOTH: 100 }; @@ -255,8 +258,7 @@ const _DrawingElement = GObject.registerClass({ cr.moveTo(points[0][0], points[0][1]); for (let j = 1; j < points.length; j++) { cr.lineTo(points[j][0], points[j][1]); - } - + } } else if (shape == Shape.ELLIPSE && points.length >= 2) { let radius = Math.hypot(points[1][0] - points[0][0], points[1][1] - points[0][1]); let ratio = 1; @@ -284,6 +286,21 @@ const _DrawingElement = GObject.registerClass({ if (shape == Shape.POLYGON) cr.closePath(); + } else if (shape == Shape.ARROW && points.length >= 2) { + // Draw the main line + cr.moveTo(points[0][0], points[0][1]); + cr.lineTo(points[1][0], points[1][1]); + + // Draw arrowhead + let angle = Math.atan2(points[1][1] - points[0][1], points[1][0] - points[0][0]); + let arrowSize = this.line.lineWidth * 5; // Adjust this multiplier to change arrow size + + cr.moveTo(points[1][0], points[1][1]); + cr.lineTo(points[1][0] - arrowSize * Math.cos(angle - Math.PI/6), + points[1][1] - arrowSize * Math.sin(angle - Math.PI/6)); + cr.moveTo(points[1][0], points[1][1]); + cr.lineTo(points[1][0] - arrowSize * Math.cos(angle + Math.PI/6), + points[1][1] - arrowSize * Math.sin(angle + Math.PI/6)); } } @@ -427,6 +444,17 @@ const _DrawingElement = GObject.registerClass({ row += ` ${points[i][0]},${points[i][1]}`; row += `"${transAttribute}/>`; + } else if (this.shape == Shape.ARROW && points.length >= 2) { + let angle = Math.atan2(points[1][1] - points[0][1], points[1][0] - points[0][0]); + let arrowSize = this.line.lineWidth * 5; // Should match the Cairo version + + row += ``; } return row; diff --git a/files.js b/files.js index 552c1fc..41aaa97 100644 --- a/files.js +++ b/files.js @@ -37,7 +37,7 @@ class Icons { constructor(extension) { const ICON_NAMES = [ 'arc', 'color', 'dashed-line', 'document-export', 'fillrule-evenodd', 'fillrule-nonzero', 'fill', 'full-line', 'linecap', 'linejoin', 'palette', 'smooth', 'stroke', - 'tool-ellipse', 'tool-line', 'tool-mirror', 'tool-move', 'tool-none', 'tool-polygon', 'tool-polyline', 'tool-rectangle', 'tool-resize', + 'tool-ellipse', 'tool-line', 'tool-mirror', 'tool-move', 'tool-none', 'tool-polygon', 'tool-polyline', 'tool-rectangle', 'tool-resize', 'tool-arrow', ]; const ICON_DIR = extension.dir.get_child('data').get_child('icons'); const THEMED_ICON_NAMES = { diff --git a/locale/de/LC_MESSAGES/draw-on-your-screen.mo b/locale/de/LC_MESSAGES/draw-on-your-screen.mo index 243cc9a..902b666 100644 Binary files a/locale/de/LC_MESSAGES/draw-on-your-screen.mo and b/locale/de/LC_MESSAGES/draw-on-your-screen.mo differ diff --git a/locale/de/LC_MESSAGES/draw-on-your-screen.po b/locale/de/LC_MESSAGES/draw-on-your-screen.po index 0fee016..e96e088 100644 --- a/locale/de/LC_MESSAGES/draw-on-your-screen.po +++ b/locale/de/LC_MESSAGES/draw-on-your-screen.po @@ -241,6 +241,10 @@ msgctxt "drawing-tool" msgid "Line" msgstr "Linie" +msgctxt "drawing-tool" +msgid "Arrow" +msgstr "Pfeil" + msgctxt "drawing-tool" msgid "Ellipse" msgstr "Ellipse" @@ -643,6 +647,9 @@ msgstr "Werkzeug Bild auswählen" msgid "Select line tool" msgstr "Werkzeug Linie auswählen" +msgid "Select arrow tool" +msgstr "Werkzeug Pfeil auswählen" + msgid "Select mirror tool" msgstr "Werkzeug Spiegeln auswählen" diff --git a/locale/draw-on-your-screen.po b/locale/draw-on-your-screen.po index dc6070a..3267203 100644 --- a/locale/draw-on-your-screen.po +++ b/locale/draw-on-your-screen.po @@ -230,6 +230,10 @@ msgctxt "drawing-tool" msgid "Line" msgstr "" +msgctxt "drawing-tool" +msgid "Arrow" +msgstr "" + msgctxt "drawing-tool" msgid "Ellipse" msgstr "" @@ -648,6 +652,9 @@ msgstr "" msgid "Select line tool" msgstr "" +msgid "Select arrow tool" +msgstr "" + msgid "Select mirror tool" msgstr "" diff --git a/locale/es_ES/LC_MESSAGES/draw-on-your-screen.mo b/locale/es_ES/LC_MESSAGES/draw-on-your-screen.mo new file mode 100644 index 0000000..206a1cf Binary files /dev/null and b/locale/es_ES/LC_MESSAGES/draw-on-your-screen.mo differ diff --git a/locale/es_ES/LC_MESSAGES/draw-on-your-screen.po b/locale/es_ES/LC_MESSAGES/draw-on-your-screen.po new file mode 100644 index 0000000..c8478c6 --- /dev/null +++ b/locale/es_ES/LC_MESSAGES/draw-on-your-screen.po @@ -0,0 +1,740 @@ +# translations for Draw On Your Screen. +# Copyright (C) 2023 Listed translators +# +# This file is distributed under the same license as Draw On Your Screen. +# Juan Tarrel , 2023. +# +# Some words refer to SVG attributes (font, line, fill rule ...). +# You are free to translate them or not. +msgid "" +msgstr "" +"Project-Id-Version: Draw On Your Screen\n" +"Report-Msgid-Bugs-To: https://codeberg.org/som/DrawOnYourScreen/issues\n" +"POT-Creation-Date: 2023-10-03 21:43:10-0700\n" +"PO-Revision-Date: 2023-10-03 21:43:10-0700\n" +"Last-Translator: Juan Tarrel \n" +"Language-Team: \n" +"Language: es_MX\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#. Translators: %s is a key label +#, javascript-format +msgid "" +"Press %s to get\n" +"a fourth control point" +msgstr "" +"Presiona %s para obtener\n" +"un cuarto punto de control" + +msgid "Mark a point of symmetry" +msgstr "Marca un punto de simetria" + +msgid "Draw a line of symmetry" +msgstr "Dibuja una linea de simetría" + +#. Translators: initial content of the text area +msgctxt "text-area-content" +msgid "Text" +msgstr "Texto" + +#. Translators: %s is a key label +#, javascript-format +msgid "Press %s to mark vertices" +msgstr "Presiona %s para marcar los vértices" + +#. Translators: %s is a key label +#, javascript-format +msgid "" +"Press %s\n" +"to start a new line" +msgstr "" +"Presiona %s\n" +"para empezar una nueva línea" + +#. Translators: It is displayed in an OSD notification to ask the user to start picking, so it should use the imperative mood. +msgctxt "osd-notification" +msgid "Pick a color" +msgstr "Elige un color" + +#. Translators: "released" as the opposite of "grabbed" +msgid "Keyboard and pointer released" +msgstr "Teclado y puntero liberados" + +msgid "Keyboard and pointer grabbed" +msgstr "Teclado y puntero agarrados" + +msgid "Leaving drawing mode" +msgstr "Salir del modo de dibujo" + +#. Translators: %s is a key label +#, javascript-format +msgid "Press %s for help" +msgstr "Presiona %s para obtener ayuda" + +msgid "Entering drawing mode" +msgstr "Entrando a modo dibujo" + +msgid "Global" +msgstr "Global" + +msgid "Internal" +msgstr "Interno" + +msgid "System" +msgstr "Sistema" + +msgid "Dashed line" +msgstr "Línea punteada" + +#. Translators: as the alternative to "Dashed line" +msgid "Full line" +msgstr "Línea completa" + +msgid "Fill" +msgstr "Rellenar" + +#. Translators: as the alternative to "Fill" +msgid "Outline" +msgstr "Contorno" + +#. Translators: fill-rule SVG attribute +msgid "Nonzero" +msgstr "Nonzero" + +msgid "Evenodd" +msgstr "Evenodd" + +#. Translators: generic font-family SVG attribute +msgctxt "font-family" +msgid "Sans-Serif" +msgstr "Sans-Serif" + +msgctxt "font-family" +msgid "Serif" +msgstr "Serif" + +msgctxt "font-family" +msgid "Monospace" +msgstr "Monospace" + +msgctxt "font-family" +msgid "Cursive" +msgstr "Cursive" + +msgctxt "font-family" +msgid "Fantasy" +msgstr "Fantasy" + +#. Translators: font-style SVG attribute +msgctxt "font-style" +msgid "Normal" +msgstr "Normal" + +msgctxt "font-style" +msgid "Oblique" +msgstr "Oblicuo" + +msgctxt "font-style" +msgid "Italic" +msgstr "Cursiva" + +#. Translators: font-weight SVG attribute +msgctxt "font-weight" +msgid "Thin" +msgstr "Delgado" + +msgctxt "font-weight" +msgid "Ultra Light" +msgstr "Ultraligero" + +msgctxt "font-weight" +msgid "Light" +msgstr "ligero" + +msgctxt "font-weight" +msgid "Semi Light" +msgstr "Semiligero" + +msgctxt "font-weight" +msgid "Book" +msgstr "Libro" + +msgctxt "font-weight" +msgid "Normal" +msgstr "Normal" + +msgctxt "font-weight" +msgid "Medium" +msgstr "Medium" + +msgctxt "font-weight" +msgid "Semi Bold" +msgstr "Semi negrita" + +msgctxt "font-weight" +msgid "Bold" +msgstr "Negrita" + +msgctxt "font-weight" +msgid "Ultra Bold" +msgstr "Ultra negrita" + +msgctxt "font-weight" +msgid "Heavy" +msgstr "Pesado" + +msgctxt "font-weight" +msgid "Ultra Heavy" +msgstr "Ultra Pesado" + +#. Translators: stroke-linecap SVG attribute +msgctxt "stroke-linecap" +msgid "Butt" +msgstr "Extremo en ángulo recto" + +msgctxt "stroke-linecap" +msgid "Round" +msgstr "Redondeado" + +msgctxt "stroke-linecap" +msgid "Square" +msgstr "Cuadrado" + +#. Translators: stroke-linejoin SVG attribute +msgctxt "stroke-linejoin" +msgid "Miter" +msgstr "Inglete" +msgctxt "stroke-linejoin" +msgid "Round" +msgstr "Redondeado" + +msgctxt "stroke-linejoin" +msgid "Bevel" +msgstr "Bisel" + +#. Translators: value in pixel unit (e.g. "5 px") +#, javascript-format +msgid "%f px" +msgstr "%f px" + +msgid "Left aligned" +msgstr "Alineado a la izquierda" + +msgid "Centered" +msgstr "Centrado" + +msgid "Right aligned" +msgstr "Alineado a la derecha" + +msgctxt "drawing-tool" +msgid "Free drawing" +msgstr "Dibujo libre" + +msgctxt "drawing-tool" +msgid "Line" +msgstr "Línea" + +msgctxt "drawing-tool" +msgid "Arrow" +msgstr "Flecha" + +msgctxt "drawing-tool" +msgid "Ellipse" +msgstr "Elipse" + +msgctxt "drawing-tool" +msgid "Rectangle" +msgstr "Rectangulo" + +msgctxt "drawing-tool" +msgid "Text" +msgstr "Texto" + +msgctxt "drawing-tool" +msgid "Polygon" +msgstr "Polígono" + +msgctxt "drawing-tool" +msgid "Polyline" +msgstr "Polilínea" + +msgctxt "drawing-tool" +msgid "Image" +msgstr "Imagen" + +msgctxt "drawing-tool" +msgid "Move" +msgstr "Mover" + +msgctxt "drawing-tool" +msgid "Resize" +msgstr "Cambiar tamaño" + +msgctxt "drawing-tool" +msgid "Mirror" +msgstr "Espejo" + +msgid "Erase" +msgstr "Borrar" + +msgid "Smooth" +msgstr "Liso" + +msgid "Open drawing" +msgstr "Abrir dibujo" + +msgid "Save drawing as…" +msgstr "Salvar dibujo como…" + +msgid "Palette" +msgstr "Paleta" + +msgid "Color" +msgstr "Color" + +#. Translators: It is displayed in a menu button tooltip or as a shortcut action description, so it should NOT use the imperative mood. +msgid "Pick a color" +msgstr "Escoge un color" + +msgid "Add to images" +msgstr "Agrega a imagenes" + +msgid "Delete" +msgstr "Borrar" + +msgid "Type a name" +msgstr "Escribe un nombre" + +#. Translators: "Preferences" page in preferences +msgid "Preferences" +msgstr "Preferencias" + +#. Translators: "Drawing" page in preferences +msgid "Drawing" +msgstr "Dibujo" + +#. Translators: "About" page in preferences +msgid "About" +msgstr "Acerca de" + +#. Translators: you are free to translate the extension name, that is displayed in About page, or not +msgid "Draw On You Screen" +msgstr "Dibuja En Tu Pantalla" + +#. Translators: version number in "About" page +#, javascript-format +msgid "Version %f" +msgstr "Version %f" + +#. Translators: you are free to translate the extension description, that is displayed in About page, or not +msgid "" +"Start drawing with Super+Alt+D and save your beautiful work by taking a " +"screenshot" +msgstr "" +"Comienza a dibujar con Super+Alt+D y guarda tu hermoso trabajo " +"tomando una captura de pantalla" + +#. Translators: add your name here or keep it empty, it will be displayed in about page, e.g. +#. msgstr "" +#. "translator1\n" +#. "translator2\n" +#. "translator3" +msgid "translator-credits" +msgstr "Juan Tarrel" + +msgid "Palettes" +msgstr "Paletas" + +msgid "Add a new palette" +msgstr "Agrega una nueva paleta" + +msgid "Area" +msgstr "Área" + +msgid "Auto" +msgstr "Auto" + +msgid "Grid overlay line" +msgstr "Línea de superposición de cuadrícula" + +msgid "Tools" +msgstr "Herramientas" + +msgid "Dash array" +msgstr "Matriz de tablero" + +msgid "Reset settings" +msgstr "Restablecer configuración" + +msgid "Rename the palette" +msgstr "Renombra la paleta" + +msgid "Remove the palette" +msgstr "Borra la paleta " + +#. Translators: default name of a new palette +msgid "New palette" +msgstr "Nueva paleta" + +msgid "In drawing mode" +msgstr "En modo dibujo" + +msgid "Draw" +msgstr "Dibujar" + +msgid "Left click" +msgstr "Clic Izquierdo" + +msgid "Menu" +msgstr "Menú" + +msgid "Right click" +msgstr "Clic Derecho" + +msgid "Center click" +msgstr "Clic central" + +msgid "Increment/decrement line width" +msgstr "Incrementar/disminuir el ancho de línea" + +msgid "Scroll" +msgstr "Desplazarse" + +#. Translators: %s are key labels (Ctrl+F1 and Ctrl+F9) +msgid "Select color" +msgstr "Seleccionar color" + +#, javascript-format +msgid "%s … %s" +msgstr "%s … %s" + +#. Translators: %s is a key label +msgid "Ignore pointer movement" +msgstr "Ignorar el movimiento del puntero" + +#, javascript-format +msgid "%s held" +msgstr "%s retenido" + +msgid "Leave" +msgstr "Salir" + +msgid "Select eraser (while starting drawing)" +msgstr "" +"Seleccione el borrador (mientras comienza a dibujar)" + +msgid "Duplicate (while starting handling)" +msgstr "Duplicar (al iniciar el manejo)" + +msgid "Rotate rectangle, polygon, polyline" +msgstr "Girar rectángulo, polígono, polilínea" + +msgid "Extend circle to ellipse" +msgstr "Extender círculo a elipse" + +msgid "Curve line" +msgstr "Línea curva" + +msgid "Smooth free drawing outline" +msgstr "Esquema de dibujo suave y libre." + +msgid "Do not preserve image ratio" +msgstr "No conservar la proporción de la imagen" + +msgid "Rotate (while moving)" +msgstr "Girar (mientras se mueve)" + +msgid "Stretch (while resizing)" +msgstr "Estirar (mientras cambia el tamaño)" + +msgid "Inverse (while mirroring)" +msgstr "Inverso (durante la duplicación)" + +msgid "Drawing on the desktop" +msgstr "Dibujar en el escritorio" + +msgid "Draw On Your Screen becomes Draw On Your Desktop" +msgstr "Dibujar en tu pantalla se convierte en Dibujar en" +"tu escritorio" + +msgid "Erase all drawings" +msgstr "Borrar todos los dibujos" + +msgid "Disable panel indicator" +msgstr "Desactivar indicador del panel" + +msgid "Disable on-screen notifications" +msgstr "Desactivar notificaciones en pantalla" + +msgid "Persistent over toggles" +msgstr "Persistente sobre alternancia" + +msgid "Drawing remains when toggling drawing mode" +msgstr "El dibujo permanece al alternar el modo de dibujo" + +msgid "Persistent over restarts" +msgstr "Reinicios persistentes" + +msgid "Drawing is automatically saved to a file" +msgstr "El dibujo se guarda automáticamente en un archivo." + +msgid "Enter/leave drawing mode" +msgstr "Entrar/salir del modo de dibujo" + +#. Translators: there is a similar text in GNOME Boxes (https://gitlab.gnome.org/GNOME/gnome-boxes/tree/master/po) +msgid "Grab/ungrab keyboard and pointer" +msgstr "Agarrar/desagarrar el teclado y el puntero" + +msgid "Background color" +msgstr "Color de fondo" + +msgid "The color of the drawing area background" +msgstr "El color del fondo del área de dibujo." + +msgid "Automatic dash array" +msgstr "Matriz de guiones automática" + +msgid "Compute the lengths from the line width" +msgstr "Calcular las longitudes a partir del ancho de línea." + +msgid "Dash array on" +msgstr "Matriz de guión activada" + +msgid "The dash length in pixels" +msgstr "La longitud del guión en píxeles." + +msgid "Dash array off" +msgstr "Conjunto de tablero desactivado" + +msgid "The gap between the dashes in pixels" +msgstr "El espacio entre los guiones en píxeles." + +msgid "Dash offset" +msgstr "Desplazamiento del guión" + +msgid "The dash offset in pixels" +msgstr "El desplazamiento del guión en píxeles." + +msgid "Grid overlay color" +msgstr "Color de superposición de cuadrícula" + +msgid "The color of the lines" +msgstr "El color de las líneas." + +msgid "Automatic grid overlay line" +msgstr "Línea de superposición automática de cuadrícula" + +msgid "Compute the lengths from the screen size" +msgstr "Calcular las longitudes a partir del tamaño de la pantalla." + +msgid "Grid overlay line spacing" +msgstr "Interlineado de superposición de cuadrícula" + +msgid "The gap between lines in pixels" +msgstr "El espacio entre líneas en píxeles." + +msgid "Grid overlay line width" +msgstr "Ancho de línea de superposición de cuadrícula" + +msgid "The line width in pixels" +msgstr "El ancho de línea en píxeles." + +msgid "Image location" +msgstr "Ubicación de la imagen" + +msgid "The location of the directory in which the image tool picks" +msgstr "La ubicación del directorio en el que selecciona" +"la herramienta de imagen" + +msgid "Color palettes" +msgstr "Paletas de colores" + +msgid "The palettes of drawing colors" +msgstr "Las paletas de colores de dibujo." + +msgid "Automatic square area size" +msgstr "Tamaño del área cuadrada automática" + +msgid "Compute the area size from the screen size" +msgstr "Calcule el tamaño del área a partir del tamaño de la pantalla" + +msgid "Square area size" +msgstr "Tamaño del área cuadrada" + +msgid "The size of the area in pixels" +msgstr "El tamaño del área en píxeles." + +msgid "Decrement line width" +msgstr "Disminuir el ancho de línea" + +msgid "Decrement line width even more" +msgstr "Disminuya aún más el ancho de línea" + +msgid "Erase last brushstroke" +msgstr "Borrar la última pincelada" + +msgid "Export drawing to a SVG file" +msgstr "Exportar dibujo a un archivo SVG" + +msgid "Increment line width" +msgstr "Incrementar el ancho de línea" + +msgid "Increment line width even more" +msgstr "Incrementar aún más el ancho de línea" + +msgid "Open next drawing" +msgstr "Abrir siguiente dibujo" + +msgid "Open preferences" +msgstr "Preferencias abiertas" + +msgid "Open previous drawing" +msgstr "Abrir dibujo anterior" + +msgid "Add images from the clipboard" +msgstr "Agregar imágenes desde el portapapeles" + +msgid "Redo" +msgstr "Rehacer" + +msgid "Save drawing" +msgstr "Salvar dibuto" + +msgid "Select color 1" +msgstr "Selecciona el color 1" + +msgid "Select color 2" +msgstr "Selecciona el color 2" + +msgid "Select color 3" +msgstr "Selecciona el color 3" + +msgid "Select color 4" +msgstr "Selecciona el color 4" + +msgid "Select color 5" +msgstr "Selecciona el color 5" + +msgid "Select color 6" +msgstr "Selecciona el color 6" + +msgid "Select color 7" +msgstr "Selecciona el color 7" + +msgid "Select color 8" +msgstr "Selecciona el color 8" + +msgid "Select color 9" +msgstr "Selecciona el color 9" + +msgid "Select ellipse tool" +msgstr "Seleccionar herramienta elipse" + +msgid "Select image tool" +msgstr "Seleccionar herramienta de imagen" + +msgid "Select line tool" +msgstr "Seleccionar herramienta de línea" + +msgid "Select arrow tool" +msgstr "Seleccionar herramienta de flecha" + +msgid "Select mirror tool" +msgstr "Seleccionar herramienta espejo" + +msgid "Select move tool" +msgstr "Seleccionar herramienta de movimiento" + +msgid "Select free drawing" +msgstr "Seleccionar dibujado libre" + +msgid "Select polygon tool" +msgstr "Seleccionar herramienta de polígono" + +msgid "Select polyline tool" +msgstr "Seleccionar herramienta de polilínea" + +msgid "Select rectangle tool" +msgstr "Seleccionar herramienta rectángulo" + +msgid "Select resize tool" +msgstr "Seleccionar herramienta de texto" + +msgid "Select text tool" +msgstr "Werkzeug Text auswählen" + +msgid "Smooth last brushstroke" +msgstr "Última pincelada suave" + +msgid "Change color palette" +msgstr "Cambiar paleta de colores" + +msgid "Change color palette (reverse)" +msgstr "Cambiar paleta de colores (inversa)" + +msgid "Toggle fill/outline" +msgstr "Alternar relleno/contorno" + +msgid "Toggle fill rule" +msgstr "Alternar regla de relleno" + +msgid "Change font family" +msgstr "Cambiar familia de fuentes" + +msgid "Change font family (reverse)" +msgstr "Cambiar familia de fuentes (inversa)" + +msgid "Change font style" +msgstr "Cambiar estilo de fuente" + +msgid "Change font weight" +msgstr "Cambiar el peso de la fuente" + +msgid "Change image" +msgstr "Cambiar imagen" + +msgid "Change image (reverse)" +msgstr "Cambiar imagen (reversa)" + +msgid "Change linecap" +msgstr "Cambiar límite de línea" + +msgid "Change linejoin" +msgstr "Cambiar unión de línea" + +msgid "Change text alignment" +msgstr "Cambiar la alineación del texto" + +msgid "Add a drawing background" +msgstr "Agregar un fondo de dibujo" + +msgid "Add a grid overlay" +msgstr "Agregar una superposición de cuadrícula" + +msgid "Show help" +msgstr "Mostrar ayuda" + +msgid "Hide panel and dock" +msgstr "Ocultar panel y acoplar" + +#. Translators: It is an action: "Make the drawing area a square" +msgid "Square drawing area" +msgstr "Área de dibujo cuadrado" + +msgid "Undo" +msgstr "Deshacer" + +#, javascript-format +#~ msgid "Type your text and press %s" +#~ msgstr "Escribe tu texto y presiona %s" + +#~ msgid "Redo last brushstroke" +#~ msgstr "Rehacer la última pincelada" + +#~ msgid "Undo last brushstroke" +#~ msgstr "Deshacer la última pincelada" diff --git a/locale/es_MX/LC_MESSAGES/draw-on-your-screen.mo b/locale/es_MX/LC_MESSAGES/draw-on-your-screen.mo index 6547486..206a1cf 100644 Binary files a/locale/es_MX/LC_MESSAGES/draw-on-your-screen.mo and b/locale/es_MX/LC_MESSAGES/draw-on-your-screen.mo differ diff --git a/locale/es_MX/LC_MESSAGES/draw-on-your-screen.po b/locale/es_MX/LC_MESSAGES/draw-on-your-screen.po index fdd6927..c8478c6 100644 --- a/locale/es_MX/LC_MESSAGES/draw-on-your-screen.po +++ b/locale/es_MX/LC_MESSAGES/draw-on-your-screen.po @@ -238,6 +238,10 @@ msgctxt "drawing-tool" msgid "Line" msgstr "Línea" +msgctxt "drawing-tool" +msgid "Arrow" +msgstr "Flecha" + msgctxt "drawing-tool" msgid "Ellipse" msgstr "Elipse" @@ -637,6 +641,9 @@ msgstr "Seleccionar herramienta de imagen" msgid "Select line tool" msgstr "Seleccionar herramienta de línea" +msgid "Select arrow tool" +msgstr "Seleccionar herramienta de flecha" + msgid "Select mirror tool" msgstr "Seleccionar herramienta espejo" diff --git a/locale/it_IT/LC_MESSAGES/draw-on-your-screen.mo b/locale/it_IT/LC_MESSAGES/draw-on-your-screen.mo index b5535bc..8c010f9 100644 Binary files a/locale/it_IT/LC_MESSAGES/draw-on-your-screen.mo and b/locale/it_IT/LC_MESSAGES/draw-on-your-screen.mo differ diff --git a/locale/it_IT/LC_MESSAGES/draw-on-your-screen.po b/locale/it_IT/LC_MESSAGES/draw-on-your-screen.po index fbeff47..4fc6617 100644 --- a/locale/it_IT/LC_MESSAGES/draw-on-your-screen.po +++ b/locale/it_IT/LC_MESSAGES/draw-on-your-screen.po @@ -51,6 +51,9 @@ msgstr "Disegno libero" msgid "Line" msgstr "Linea" +msgid "Arrow" +msgstr "Freccia" + msgid "Ellipse" msgstr "Ellisse" @@ -148,6 +151,9 @@ msgstr "Liscia l'ultima pennellata" msgid "Select line" msgstr "Seleziona la linea" +msgid "Select arrow tool" +msgstr "Seleziona la freccia" + msgid "Select ellipse" msgstr "Seleziona ellisse" diff --git a/menu.js b/menu.js index 10af7d7..ed5e1b8 100644 --- a/menu.js +++ b/menu.js @@ -129,7 +129,7 @@ export const DisplayStrings = { if (!this._Tool) this._Tool = { 0: pgettext("drawing-tool", "Free drawing"), 1: pgettext("drawing-tool", "Line"), 2: pgettext("drawing-tool", "Ellipse"), 3: pgettext("drawing-tool", "Rectangle"), 4: pgettext("drawing-tool", "Text"), 5: pgettext("drawing-tool", "Polygon"), - 6: pgettext("drawing-tool", "Polyline"), 7: pgettext("drawing-tool", "Image"), + 6: pgettext("drawing-tool", "Polyline"), 7: pgettext("drawing-tool", "Image"), 8: pgettext("drawing-tool", "Arrow"), 100: pgettext("drawing-tool", "Move"), 101: pgettext("drawing-tool", "Resize"), 102: pgettext("drawing-tool", "Mirror") }; return this._Tool; } diff --git a/metadata.json b/metadata.json index 95d8a68..203c4fc 100644 --- a/metadata.json +++ b/metadata.json @@ -9,7 +9,8 @@ "persistent-file-name": "persistent", "svg-file-name": "DrawOnYourScreen", "shell-version": [ - "46" + "46", + "47" ], "version": 12.7 } diff --git a/schemas/gschemas.compiled b/schemas/gschemas.compiled index 2847df0..84c312a 100644 Binary files a/schemas/gschemas.compiled and b/schemas/gschemas.compiled differ diff --git a/schemas/org.gnome.shell.extensions.draw-on-your-screen.gschema.xml b/schemas/org.gnome.shell.extensions.draw-on-your-screen.gschema.xml index 8534366..adcd84f 100644 --- a/schemas/org.gnome.shell.extensions.draw-on-your-screen.gschema.xml +++ b/schemas/org.gnome.shell.extensions.draw-on-your-screen.gschema.xml @@ -109,7 +109,7 @@ [ - ('Palette', ['HotPink', 'Cyan', 'yellow', 'Orangered', 'Chartreuse', 'DarkViolet', 'White', 'Gray', 'Black']), + ('Palette', ['rgb(255,105,180):HotPink', 'rgb(0,255,255):Cyan', 'rgb(255,255,0):yellow', 'rgb(255,69,0):Orangered', 'rgb(127,255,0):Chartreuse', 'rgb(148,0,211):DarkViolet', 'rgb(255,255,255):White', 'rgb(190,190,190):Gray', 'rgb(0,0,0):Black']), ('GNOME HIG lighter', ['rgb(153,193,241):Blue 1', 'rgb(143,240,164):Green 1', 'rgb(249,240,107):Yellow 1', 'rgb(255,190,111):Orange 1', 'rgb(246,97,81):Red 1', 'rgb(220,138,221):Purple 1', 'rgb(205,171,143):Brown 1', 'rgb(255,255,255):Light 1', 'rgb(119,118,123):Dark 1']), ('GNOME HIG light', ['rgb(98,160,234):Blue 2', 'rgb(87,227,137):Green 2', 'rgb(248,228,92):Yellow 2', 'rgb(255,163,72):Orange 2', 'rgb(237,51,59):Red 2', 'rgb(192,97,203):Purple 2', 'rgb(181,131,90):Brown 2', 'rgb(246,245,244):Light 2', 'rgb(94,92,100):Dark 2']), ('GNOME HIG normal', ['rgb(53,132,228):Blue 3', 'rgb(51,209,122):Green 3', 'rgb(246,211,45):Yellow 3', 'rgb(255,120,0):Orange 3', 'rgb(224,27,36):Red 3', 'rgb(145,65,172):Purple 3', 'rgb(152,106,68):Brown 3', 'rgb(222,221,218):Light 3', 'rgb(61,56,70):Dark 3']), @@ -249,6 +249,10 @@ ["<Primary>l"] Select line tool + + ["<Primary>a"] + Select arrow tool + ["<Primary>c"] Select mirror tool @@ -298,7 +302,7 @@ Dashed line - ["<Primary>a"] + ["<Primary><Shift>a"] Toggle fill/outline diff --git a/shortcuts.js b/shortcuts.js index 712963d..c4db279 100644 --- a/shortcuts.js +++ b/shortcuts.js @@ -29,7 +29,7 @@ export const GLOBAL_KEYBINDINGS_SWITCHES = [ // The setting keys of the "org.gnome.shell.extensions.draw-on-your-screen.internal-shortcuts" schema. export const INTERNAL_KEYBINDINGS = [ 'undo', 'redo', 'delete-last-element', 'smooth-last-element', - 'select-none-shape', 'select-line-shape', 'select-ellipse-shape', 'select-rectangle-shape', 'select-polygon-shape', 'select-polyline-shape', + 'select-none-shape', 'select-line-shape', 'select-arrow-shape', 'select-ellipse-shape', 'select-rectangle-shape', 'select-polygon-shape', 'select-polyline-shape', 'select-text-shape', 'select-image-shape', 'select-move-tool', 'select-resize-tool', 'select-mirror-tool', 'switch-fill', 'switch-fill-rule', 'switch-color-palette', 'switch-color-palette-reverse', 'pick-color', 'increment-line-width', 'increment-line-width-more', 'decrement-line-width', 'decrement-line-width-more', diff --git a/ui/areamanager.js b/ui/areamanager.js index 993edb0..4181355 100644 --- a/ui/areamanager.js +++ b/ui/areamanager.js @@ -203,6 +203,7 @@ export class AreaManager { 'switch-image-file-reverse' : this.activeArea.switchImageFile.bind(this.activeArea, true), 'select-none-shape': () => this.activeArea.selectTool(Area.Tool.NONE), 'select-line-shape': () => this.activeArea.selectTool(Area.Tool.LINE), + 'select-arrow-shape': () => this.activeArea.selectTool(Area.Tool.ARROW), 'select-ellipse-shape': () => this.activeArea.selectTool(Area.Tool.ELLIPSE), 'select-rectangle-shape': () => this.activeArea.selectTool(Area.Tool.RECTANGLE), 'select-text-shape': () => this.activeArea.selectTool(Area.Tool.TEXT),