Commit Graph

33 Commits

Author SHA1 Message Date
abakkk 40f4f0b946 change license 2021-05-27 18:54:08 +02:00
abakkk f087570eb5 minor, param renaming
"showTextRectangle" -> "showElementBounds" and
"drawTextRectangle" -> "drawElementBounds".
2021-02-19 23:21:35 +01:00
abakkk 27a398d0e1 add convenient marks for rotation and stretch transformations 2021-02-19 23:21:04 +01:00
abakkk ca6baf0dc8 minor, enumeration syntax 2021-02-19 23:20:57 +01:00
abakkk cb49c83799 add centered text alignment 2021-02-19 23:20:29 +01:00
abakkk 5698f3f7cb multi-line text elements
* Can browse and break lines anywhere
* Can past multi-line texts
* Do not need lineIndex anymore and grouped lines are preserved permanently

Related to #56
2021-02-19 23:19:50 +01:00
abakkk ed167f8d1b fix transformation stopping
* Handle case where grabbed element does not have transformation to stop.
* Update cursor after erasing drawing while an element is grabbed.
2020-10-09 08:48:42 +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 129c8f584c Name GTypes and classes against extension uuid.
For DeepExtensionReloader.
2020-09-25 11:55:36 +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 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 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 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 8277710510 get all icons from Files.Icons 2020-09-10 15:19:17 +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 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 f9769c11f2 default font and font description
* Use interface font as default font
* Work with a `Pango.FontDescription` instead of separate font properties.
2020-09-05 00:03:05 +02:00
abakkk a128664921 minor, add 'exported' directive for linters 2020-08-31 11:05:33 +02:00
abakkk c78f5e82da Extend font family possibilities
To fix in the future: memory usage of font-styled item labels
2020-08-05 23:30:25 +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 813d6b0f1b Show the textEntry when ibusCandidatePopup is visible 2020-07-11 15:59:08 +02:00
abakkk e8140eae88 Text elements as a separated class 2020-07-08 11:47:51 +02:00
abakkk 96efac1e3f draw.js -> area.js 2020-07-04 08:42:45 +02:00
abakkk ca96e76d12 draw-to-elements 5 2020-07-04 08:35:59 +02:00
abakkk 35980726fe draw-to-elements 2 2020-07-03 23:32:26 +02:00
abakkk b2b6a6a8fe draw-to-elements 1 2020-07-03 23:27:52 +02:00