Commit Graph

42 Commits

Author SHA1 Message Date
abakkk 40f4f0b946 change license 2021-05-27 18:54:08 +02: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 e588728d3d Dot not use stateObj
Remove `Me.stateObj.areaManager`.
It caused errors on extension updated from ego (`JS ERROR: TypeError: Me.stateObj.areaManager is undefined`).
2020-10-21 09:33:40 +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 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 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 3c67bf3398 colored SVG images
Color (fill) SVG images by pressing the `Shift` key.
2020-09-22 23:21:48 +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 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 f7d1f15cf5 add tooltips to "Open drawing" submenu buttons 2020-09-18 11:42:16 +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 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 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
abakkk 60091a94b6 rework of Files.Jsons
In the same way as Files.Images.
2020-09-13 23:50:09 +02:00
abakkk 464aae77c6 improve images again
* Files.Images does the same thing, with just a new accessor (getSorted).
* Files.Image is splited and the new subclass manage gicons.
2020-09-13 15:44:42 +02:00
abakkk 24682db69c add a lot of icons
* Complete Files.Icons.
* Add a lot of icons in the menu and the osd notifications.
2020-09-12 15:25:42 +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 8277710510 get all icons from Files.Icons 2020-09-10 15:19:17 +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 c1689cac75 rework prefs, settings, locales
Although there is a lot of changes, nothing is important.
2020-09-02 16:16:23 +02:00
abakkk 89067a8dd9 use an Extension class 2020-08-31 13:05:41 +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 4e0455af34 GS 3.24 compatibility
* item actor
* Gio.File.load_bytes not available
2020-08-08 00:27:41 +02:00
abakkk 075b080aaf fix submenu scrollview adjustment
* auto-scroll when pointer is near the top or the bottom
* scroll with keyboard arrows

copy files-view extension
2020-08-06 22:10:12 +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 80e2955f8c fix menu item name and sensitivity stynchronization 2020-08-05 02:49:52 +02:00
abakkk 11b90ecc0a put json file stuff in files.js
In the same way than image files.
2020-08-05 02:01:17 +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 7a41c6157c improve menu grouped action items
* Fix style: use 'popup-menu' and 'popup-menu-item' style classes to provide theme colors
* Synchonize button sensitivity
2020-07-13 12:53:01 +02:00
abakkk 19355033ff regroup first menu items
Like old GS system menu.
2020-07-11 22:28:44 +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 ef51bb8bf9 draw-to-menu 5 2020-07-03 22:51:23 +02:00
abakkk 9b7e7cc3cb draw-to-menu 2 2020-06-30 23:41:54 +02:00
abakkk 80163fcca8 draw-to-menu 1 2020-06-30 23:40:15 +02:00