Commit Graph

77 Commits

Author SHA1 Message Date
abakkk 463c1a4c5a update to Codeberg 2021-05-28 18:09:02 +02:00
abakkk 40f4f0b946 change license 2021-05-27 18:54:08 +02:00
abakkk 92b8bddb6b simplify prefs getChildrenOf
GTK4 widgets are iterable.
2021-04-26 12:00:16 +02:00
abakkk cb40739af7 override default handlers in prefs
Use GJS GObject overrides. Not to matter whether the signal exists.
2021-03-11 09:20:39 +01:00
abakkk e470e2f40d fixes for old GS versions 2021-02-20 00:56:21 +01:00
abakkk d125d77d01 Gtk4 port
Tested with Gtk 4.1.0.
2021-02-19 23:23:58 +01:00
abakkk 82aee30657 fix unsanitized GType names
With old GS/GJS, some GType names were generated from class names without sanitizing it (e.g. Menu.ActionButton).

Instead of defining all GType names, sanitize all class name as it was GType name, and let GJS generated GType name securely when it is necessary.

Fix #46.
2020-10-04 10:01:55 +02:00
abakkk 129c8f584c Name GTypes and classes against extension uuid.
For DeepExtensionReloader.
2020-09-25 11:55:36 +02:00
abakkk 27e194905b add gpl import
* Import palettes from a .gpl file (one palette for each column).
* Add possibility to use more than 9 palettes.
* Color display names support.
* color.toJSON for svg and drawing saves, color.toString for display.
2020-09-22 17:31:48 +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 e53e69efcf minor, use array instead of object for "OTHER" shortcuts
Array is more semantically appropriate.
For example 2 actions may have the same translations (error of a translator). With an object (or a map), only the second would be displayed, which is problematic to alert to the problem.

Additionally, handle the case where some GSettings keybinding values are empty.
2020-09-13 15:46:22 +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 a06d318646 rework of shortcuts.js 2020-09-10 15:55:19 +02:00
abakkk 56008f3041 add ranges to drawing settings schema
* It is no longer required to clamp the setting value in area.js.
* Add a "range" property, completed with another 'step' property, to PixelSpinButton in order to directly initiate the lower and upper values of the adjustment from the relevant setting range.
* Not related: fix an inversion between Pango and Cairo in element.js.
2020-09-09 12:12:29 +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 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 a128664921 minor, add 'exported' directive for linters 2020-08-31 11:05:33 +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 01701538bb minor, rework settings 2020-08-23 11:49:26 +02:00
abakkk a1ce4aaf79 Add font family reversed switching 2020-08-06 00:26:10 +02:00
abakkk 39ec1ba888 toggle -> switch 2020-08-06 00:06:01 +02:00
abakkk e686f03082 minor, remove Lang.bind 2020-08-01 15:00:49 +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 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 3c72b84a5c Improve text shape
* transform: translate
* add rtl capacity (currently disabled)
2020-06-24 09:18:24 +02:00
abakkk 7f039398d0 Idlize savePersistent 2020-06-22 12:16:17 +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 1e4a847565 replace Mainloop by GLib 2020-06-19 17:01:16 +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 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 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 d19c3e25ea cleanup 2020-03-02 16:32:50 +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