Commit Graph

50 Commits

Author SHA1 Message Date
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
abakkk 62c1ac3e96 '%s' -> '%d' 2019-04-01 22:09:33 +02:00
abakkk 31e540e128 i18n 2019-04-01 21:05:18 +02:00
abakkk 1a4de3190f minor 2019-03-29 22:59:53 +01:00
abakkk 8288ead3c3 minor 2019-03-28 22:49:28 +01:00
abakkk ec2408043f change middle click
middle click: toggle fill
remove toggleShape method
update prefs and .pot
2019-03-28 22:15:31 +01:00
abakkk d2c285154b add panel indicator and prefs to disable osd notifications and indicator 2019-03-28 22:01:39 +01:00
abakkk 14205295fc add svg attributes in pot 2019-03-28 15:26:10 +01:00
abakkk 82c45f4cc1 rework of prefs 2019-03-28 14:59:14 +01:00
abakkk c04dd01b44 change prefs and helper order, to be the same as in the menu 2019-03-27 01:07:20 +01:00
abakkk 05e6c7b33f reinstate fill and change dashed shortcut 2019-03-27 00:59:48 +01:00
abakkk 27ea6a8be9 add context menu 2019-03-26 22:28:24 +01:00
abakkk da52cfa260 Drawing is hidden by default when leaving drawing mode
It doesn't stay on top of windows because of problems with "desktop"
extensions.
2019-03-12 00:29:14 +01:00
abakkk 2b25958d8c add persistence feature 2019-03-11 17:53:35 +01:00
abakkk 0c17e2cfbe move-drawing-on-desktop pref 2019-03-10 22:16:11 +01:00
abakkk 3ebcec5a68 escape key: leave and erase => leave and hide 2019-03-08 12:41:38 +01:00
abakkk f65379c8e1 "credits" -> "author" 2019-03-07 19:45:19 +01:00
abakkk 0de553c748 remind system screenshort shortcuts in helper 2019-03-07 19:22:19 +01:00
abakkk 0e2360591c add square area 2019-03-07 16:32:06 +01:00
abakkk 8718e219a2 Add transformations
by pressing Ctrl key
rectangle and text: rotate
circle: extend (ellipse) and rotate
line: cubic Bezier curve
2019-03-07 14:28:35 +01:00
abakkk 9594ec3c69 minor 2019-03-05 22:00:14 +01:00
abakkk c59f499b4c add smooth feature 2019-03-05 21:08:43 +01:00
abakkk 7f9a3195b4 init 2019-03-05 12:36:59 +01:00