Commit Graph

72 Commits

Author SHA1 Message Date
abakkk 463c1a4c5a update to Codeberg 2021-05-28 18:09:02 +02:00
abakkk cb49c83799 add centered text alignment 2021-02-19 23:20:29 +01:00
abakkk 9731ebecb7 start a new line with "Shift + Enter"
Text tool:
* Enter: valid text and close text entry.
* Escape: close text entry.
* Shift + Enter: Start a new line.

related to #30.
2020-10-12 11:09:20 +02:00
abakkk 28def0059d finish undo/redo rework
* "Undo(Redo) last brushstroke" -> "Undo(Redo)".
* Sync `_updateActionSensitivity` menu method with the new undo/redo behavior.
* Smooth button action is no longer destructive.
* Clean undone smooth transformations when doing a new smooth transformation.
2020-10-04 22:48:40 +02:00
abakkk af694382c8 add color picker
It wraps the upstream color picker, that is designed for DBus access.
There is a shortcut and a menu button.
2020-09-20 15:40:45 +02:00
abakkk 1677425413 "Unlock image ratio" -> "Do not preserve image ratio" 2020-09-18 11:53:19 +02:00
abakkk f7d1f15cf5 add tooltips to "Open drawing" submenu buttons 2020-09-18 11:42:16 +02:00
abakkk 509fa0be29 adjust some translated strings 2020-09-17 22:31:39 +02:00
abakkk 23eea44661 add "Persistent over toggles' setting
* Rename "Persistent" to "Persistent over restarts".
* If disabled, "Persistent over toggles" has priority over "Persistent over restarts" and "Drawing on the desktop".

Close issue #42.
2020-09-17 17:30:30 +02:00
abakkk 072adde856 group menu items at the bottom
In addition, 'Save as a SVG file' -> "Export to a SVG file'.
2020-09-17 17:29:59 +02:00
abakkk 771bad2d59 improve images
* Let the user choose the directory.
* Rework of Files.Images.
* area.currentImage is now an ... image, not an index.
* Add 'switch-image-file-reverse' keybinding.
* Add image gicons (from thumbnails) in the submenu.
* Images are reset on drawing mode left or on images added from the clipboard.
2020-09-11 14:22:18 +02:00
abakkk 03b73862cc .pot rework
* .pot file can be generated automaticaly from new locale/POTFILES.in.
* move shortcuts key and strings to new shortcut.js
2020-09-09 09:40:45 +02:00
abakkk 2dd900bddf new DisplayStrings object
Group the most strings to display in a new DisplayStrings object.
It is used by both menu and osd notifications.
2020-09-07 18:56:48 +02:00
abakkk 5af13a1e12 add reset button to prefs 2020-09-03 09:04:01 +02:00
abakkk 2195aed3c0 move eraser/svg note
Remove the note about eraser and svg export from the prefs and add it to readme "Tips and tricks".
2020-09-02 16:40:19 +02:00
abakkk c1689cac75 rework prefs, settings, locales
Although there is a lot of changes, nothing is important.
2020-09-02 16:16:23 +02:00
abakkk b3a1a77160 replace user stylesheet with proper drawing settings
Since the most drawing params can be changed via menu or shortcuts, remove default.css and user.css.

* Missing params like palettes, dash, grid, etc, are added to prefs.
* Add palette choice to menu and shortcuts.
* Some defaults like fonts, line width, etc, are no longer modifiable by the user.
2020-08-31 09:43:00 +02:00
abakkk a1ce4aaf79 Add font family reversed switching 2020-08-06 00:26:10 +02:00
abakkk 1172e9da6f new image shape
Images files are picked from `~/DrawOnYourScreen/images/` (and `extensiondir/images/`)
svg, png, jpeg, ...(pixbuf)
2020-08-01 14:08:17 +02:00
abakkk 55efba0b3c Small pot fix
"stroke" -> "outline"

related to #35
2020-06-30 13:01:47 +02:00
abakkk e50a8c80a7 "Modeless/modal" -> "Grab/ungrab keyboard and pointer"
And add an OSD notification.
2020-06-29 12:21:21 +02:00
abakkk 9199fbd82b Reorder pot file 2020-06-28 18:28:15 +02:00
abakkk be36fd4de2 Prefs, notifications and pot file
* Add a long timeout for some OSD notifications.
* Change some pref strings.
* "Stroke" -> "Outline"
* Clean pot file
2020-06-28 18:27:23 +02:00
abakkk 6a5481ff05 Clean prefs and fix pot file 2020-06-27 16:55:26 +02:00
abakkk fbe044a2b9 Add text alignment
Left or right.
Replace unused `rtl`.
2020-06-27 15:10:01 +02:00
abakkk dc73000a1d Minor, reorder pot file 2020-06-27 14:00:21 +02:00
abakkk c5f604a80a Evenodd switch and svg attributes
* Menu: `fillRule` submenu -> `Evenodd` switch.
* Rework SVG attributes in order to bypass useless attributes.
* Fix gjs bug: `Cairo.LineCap.SQUASH` -> `SQUARE`.
* Not to draw dashes if dash.array is `[0, 0]` (case line width is 0).
2020-06-27 13:59:07 +02:00
abakkk 8519948c3b Render texts with Pango
Cairo "toy" text tool does not render non-latin and emoji characters.
Moreover Pango provides a larger set of font attributes.

Fixes #29, #34
2020-06-26 13:04:28 +02:00
abakkk 3c72b84a5c Improve text shape
* transform: translate
* add rtl capacity (currently disabled)
2020-06-24 09:18:24 +02:00
abakkk 98832cec72 toggle modeless / modal
Keybinding to ungrab keyboard and mouse while drawing remains at the top.
To be aware that this create some problems with the shell (DnD #1 and maybe more ?).

related to #6, #9, #20, #24, #33
2020-06-21 01:08:45 +02:00
abakkk 9c351b5724 Rework of pref and osd texts 2020-06-20 11:17:56 +02:00
abakkk fa4223b7ce Introduce mirror manipulations
* Reflection (symmetry axis)
* Inversion (symmetry point)

`transformingElement` is locked after selecting it.
2020-06-19 16:54:31 +02:00
abakkk 4907e35778 Introduce resize manipulation
* `SCALE_PRESERVE` (preserve ratio)
* `SCALE` (vertical, horizontal or both)

There is a third transformation, `SCALE_ANGLE`, that is not used because it causes problems to the `elementFinder`. Probably a bug of Cairo.inStroke that do no consider scales.
2020-06-15 22:13:03 +02:00
abakkk 443d1f8662 Introduce move manipulation
* 'Shapes' -> 'Tools' ('Shapes' + 'Manipulations')
* 'TextState' -> 'TextStates'
* Rotation centers are now computed dynamically (when building Cairo or SVG paths).
* Text rotation center is now located at the beginning of the text.
* Text elements gain a 'lineIndex' attribute to retrieve the rotation center of the first line.
2020-06-15 21:09:30 +02:00
abakkk 04894a9031 add "file-rule" drawing element attribute 2020-06-08 22:25:26 +02:00
abakkk 9bde4d3013 add "Open preferences" shortcut
Available since GS 3.36, so the shortcut is hidden for previous versions.
2020-06-08 15:26:55 +02:00
abakkk b4eb418c89 key label translations
Get key label translations by using Gtk.
2020-06-08 14:30:47 +02:00
abakkk 5b7d1eedf4 new polyline shape
Mark vertices with `Enter` and finish drawing by releasing clic, like other shapes.
2020-06-07 20:05:30 +02:00
abakkk b69c4ccf97 new polygon shape
Mark vertices with `Enter` and finish drawing by releasing clic, like other shapes.
2020-06-07 18:57:11 +02:00
abakkk 755b3d79c9 text: start a new line with Enter key
Finish writing with click or `Escape` key.

close #30
2020-06-07 17:01:36 +02:00
abakkk 360ac081ce Add grid overlay 2020-06-05 15:58:58 +02:00
abakkk 0ae23a5d10 "Open user.css" -> "Edit style" 2020-03-04 14:23:49 +01:00
abakkk 1e03967fbf introduce space key modifier
Pointer movement is ignored when the `space` key is held.

To ensure [Screenshot Tool](https://extensions.gnome.org/extension/1112/screenshot-tool/) extension compatibility, we need a way to let the third extension select the screenshot area with pointer but without leaving drawing mode and without drawing.

As a side effect, it allows to insert straight line segments in free drawing (after releasing the key).

Fixes issue #20
2020-03-01 13:25:48 +01:00
abakkk acb728a117 .pot: "Translators" --> "translator-credits"
"translator-credits" as in Gtk.AboutDialog
2020-02-09 18:03:36 +01:00
abakkk 4cc28cf100 small rework of prefs.js 2020-01-07 22:15:18 +01:00
abakkk 662f229a64 user.css outside extension directory
* Move drawing style to `default.css`.
* Generate (when opening) and handle `user.css` in `~/.local/share/drawOnYourScreen/`.
2020-01-06 21:24:29 +01:00
abakkk bc5acc7472 change prefs order and style 2020-01-05 14:50:38 +01:00
abakkk 8f3fbe7aa9 replace 'smoothed-stroke' pref with 'Ctrl' key modifier 2020-01-05 13:42:05 +01:00
abakkk 17bbe345af new "Open" and "Save" drawing features
* Use a "drawOnYourScreen" subdir in the xdg user data dir
* Info item with the name of the last saved/open json file
* "Open drawing" sub menu with data dir content
* "Save drawing" sub menu with entry
* "Save", "Open previous" and "Open next" keybindings
2020-01-04 00:16:20 +01:00
abakkk 99369f0d42 minor, .pot comments 2019-10-11 13:32:41 +02:00