Commit Graph

307 Commits

Author SHA1 Message Date
abakkk b3fffc193e Merge branch 'dev' into 'master'
v8.1

Closes #46 and #45

See merge request abakkk/DrawOnYourScreen!18
2020-10-06 17:31:03 +02:00
abakkk 42eff0fa05 version -> 8.1 2020-10-06 17:20:59 +02:00
abakkk ff350130a4 rework of key event handling
* Handle stage key events only when the area is reactive. Any reason to handle key events in other cases?
* Move `Escape` key handling to the stage `key-press-event` handler. So leaving the drawing mode with `Escape` is still possible when the overview mode has been entered inadvertently.
2020-10-05 16:46:16 +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 236e4db236 transformation notUndoable => undoable
The `undoable` transformation property is not preserved when the element is "stringified". So transformations cannot be undone, once the element is loaded from JSON.
2020-10-04 22:17:13 +02:00
abakkk ccf928c048 make smooth transformations undoable/redoable 2020-10-04 20:55:06 +02:00
abakkk e218819edd make transformations undoable/redoable 2020-10-04 17:20:03 +02:00
abakkk 6374cc8c47 motion timeout
Add intermediate points to make quick free drawings smoother.
Do not redisplay the area at this step (crashes).
Use device.get_coords rather than global.get_pointer because the later return rounded (floor) values.

Fix #45.
2020-10-04 11:12:47 +02: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 6e99e380cb Merge branch 'dev' into 'master'
Dev

See merge request abakkk/DrawOnYourScreen!17
2020-09-27 19:35:29 +02:00
abakkk 950881d1c3 version -> 8 2020-09-27 19:33:49 +02:00
abakkk bf75da8fa8 add some media to the readme 2020-09-27 19:20:38 +02:00
abakkk 79f27d1b25 improve menu max-height
* Take scale factor into account.
* Put it in '_onMenuOpenStateChanged' so the max-height will be updated if the monitor size change.

See PanelMenu.Button.
2020-09-25 12:50:10 +02:00
abakkk 129c8f584c Name GTypes and classes against extension uuid.
For DeepExtensionReloader.
2020-09-25 11:55:36 +02:00
abakkk 6892b9c582 fix NEWS 2020-09-22 23:45:55 +02:00
abakkk 1db60b6d4e Merge branch 'dev' into 'master'
v7

See merge request abakkk/DrawOnYourScreen!16
2020-09-22 23:28:17 +02:00
abakkk fba13926c4 version -> 7 2020-09-22 23:24:17 +02:00
abakkk 3c67bf3398 colored SVG images
Color (fill) SVG images by pressing the `Shift` key.
2020-09-22 23:21:48 +02:00
abakkk 532b9242c9 image element, minor
* image.toJson -> image.toJSON.
* remove unused 'fill' and 'operator' properties.
2020-09-22 18:22:41 +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 4cc0c9e028 Mention Color Picker extension in the readme 2020-09-21 15:21:12 +02:00
abakkk dd18ca3051 bunch of menu optimizations
* A minimum width for the menu, the same as the aggregate menu, in order to prevent the menu with from growing on submenu open.
* A maximum width for uncontrolled content (font, image and drawing names). Same value and same reason.
* Style the font family labels in idle loop to open the submenu fastly.
* Add the drawing gicons in idle loop to open the submenu smoothly.
2020-09-20 15:40:45 +02:00
abakkk 737bc856c4 color-picker extension support
The color picker use the ["Color Picker" extensions](https://github.com/tuberry/color-picker) if it is available thanks to `pickAsync` "api". In comparaison to the GS color picker, it provides a colored cursor and a menu to adjust the color.
2020-09-20 15:40:45 +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
tuberry 9977a037ec Simplified Chinese localization update 2020-09-20 15:39:19 +02:00
abakkk b1cbc63f0b French localization update 2020-09-20 14:27:51 +02:00
abakkk 8af42fbad8 version -> v6.4 2020-09-19 00:38:09 +02:00
abakkk 34eb8e930b Merge branch 'dev' into 'master'
v6.4

See merge request abakkk/DrawOnYourScreen!15
2020-09-19 00:34:29 +02:00
abakkk d20040b135 fix textEntry position
* element.x and element.y are relative to the area, not to the stage.
* Do not hide and do not set opacity to 0 because ibusCandidatePopup need a mapped text entry to init correctly its position.
2020-09-19 00:24:50 +02:00
abakkk eb87714adc area._stopAll
* pros: the function is shared and it decreases bugs.
* cons: drawing/writing/transfo are not deleted if unfinished.
2020-09-18 19:13:10 +02:00
abakkk 324c066685 PangoCairo.show_layout_line
use `PangoCairo.show_layout_line` instead of `PangoCairo.show_layout`. It is equivalent.

show_layout (doc): "The top-left corner of the PangoLayout will be drawn at the current point of the cairo context."
show_layout_line (doc): "The origin of the glyphs (the left edge of the line) will be drawn at the current point of the cairo context."
So it is no longer necessary to query `layout.get_baseline()`.
2020-09-18 18:37:01 +02:00
abakkk 5e43b05740 fix Jsons directory monitor
`directory.monitor(...)` -> `directory.monitor_directory(...)`.
It is important to specify that the file to monitor is a directory because maybe the directory does not exist yet and remove events would not be monitored.
2020-09-18 12:54:06 +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 277a3b244b trim clipboad text lines
Since 3.38 there is a line terminator character, that has to be removed with .trim().
2020-09-18 11:05:44 +02:00
abakkk 2ac453139f GS 3.38 removed ui/tweener.js 2020-09-18 09:21:07 +02:00
abakkk 6f76640146 Merge branch 'dev' into 'master'
v6.3

Closes #42

See merge request abakkk/DrawOnYourScreen!14
2020-09-17 22:39:36 +02:00
abakkk b4d680b5ba version -> 6.3 2020-09-17 22:34:00 +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 f9e25fa8f6 clean svg exports
* Group "transform" attributes.
* Round "transform" attribute values.
* Remove unused stroke attributes.
* Add an "eraser" class attribute to let user retrieve the element role.
2020-09-16 22:10:40 +02:00
abakkk 1d73d9f0e3 pass color and font when duplacting
Fix commit 42b4c9c0 .
2020-09-16 17:38:54 +02:00
abakkk 81bce359f9 improve icons, minor 2020-09-16 13:42:22 +02:00
abakkk e3b32ace3b fix ImageFromJson
Do not use the same content for insertable image and gicon. The former depends on the area size whereas the later is square.
2020-09-16 08:52:36 +02:00
abakkk 99964991c0 change some shortcuts
Replace some `Shift + Ctrl + ...` to `Ctrl + Alt + ...`.
2020-09-15 02:06:39 +02:00
abakkk cde5bab27d fix icons
* Old Adwaita icon theme does not contain 'view-mirror-symbolic' icon.
* Redraw `tool-no-symbolic.svg` because of bad rendering in old GNOMEs.
2020-09-15 01:48:01 +02:00
abakkk 42b4c9c00c color and font
* Pass Clutter color and Pango fontDescription objects to elements, not strings.
* Do not use the color format '#rrggbbaa' in svg since it is not supported in GNOME 3.24.
2020-09-15 00:29:02 +02:00
abakkk b63c1e9ffa add possibility to insert an image directly from drawing save (.json)
The Image object is got from the Jsons objects of the openDrawing sub menu.
2020-09-14 22:44:20 +02:00
abakkk a8633f1fbc add gicons to menu openDrawingSubMenu items 2020-09-14 01:38:00 +02:00