Commit Graph

9429 Commits

Author SHA1 Message Date
David Capello
4b716255e8 Fix typo in extra paint bucket options popup (#4041) 2023-09-14 11:02:15 -03:00
David Capello
b64021ffb2 Add an initial EditorConfig 2023-09-13 10:36:38 -03:00
Martín Capello
815366d385 [lua] Add support to modify tabs buttons via Dialog:modify 2023-09-12 17:21:00 -03:00
Martín Capello
6010748f81 [lua] Add tabs onclick and ontabchange events support 2023-09-12 17:21:00 -03:00
Martín Capello
d21f47f827 [lua] Add selected tab retrieval/selection through Dialog's data and possibility to set the tabs selector at the bottom 2023-09-12 17:21:00 -03:00
David Capello
0ae408fe4e [osx] Disable native file selector by default on macOS 10.11 (fix #3984) 2023-09-12 16:14:56 -03:00
David Capello
84bd6b69f5 [win] Fix bug pasting 8bpp images (fix #4029)
Fixes a bug copying 8bpp images (e.g. from YY-CHR program).
Regression introduced in 282b040b52

Related thread: https://community.aseprite.org/t/6842
2023-09-01 17:37:11 -03:00
David Capello
f4aa19ad8c Add names to threads (#3729)
This is useful for Sentry crash reports, so we can identify threads by
name.
2023-08-29 13:55:40 -03:00
David Capello
6c5b27db81 Fix crash/hang using WebSocket in a previously disconnected socket
This can happen using Pribambase extension when we close Aseprite in
some strange way (e.g. killing the process), and the connection is not
closed correctly. It looks like the Blender addon is in an invalid
state and the data cannot be sent any more, but without this patch
Aseprite just hangs/crashes if we retry sending data, but with this
fix we can receive/show that an error happened sending data.

Related to: https://github.com/machinezone/IXWebSocket/pull/481
2023-08-29 12:39:12 -03:00
David Capello
702a7d5265 [lua] Rename Dialog:canvas{ autoScaling -> autoscaling } (fix #4011) 2023-08-21 21:10:51 -03:00
David Capello
75d7834609 [lua] Add decorate={rulers, dimmed} params to app.editor:askPoint{} 2023-08-21 20:49:58 -03:00
David Capello
922ebf3039 [lua] Increment scripting API version 2023-08-21 20:49:58 -03:00
Gaspar Capello
572cdf2b0e Add check box "Same in all tools" in the Dynamics options window (fix #4003)
Now each tool has independent 'dynamic options'. A global configuration
for all tools is also possible via the 'Same in all tools' option.

ALso this fix, solves a regression inserted in:
2cc15cda9e
(bug inserted: stabilizer is always active)
2023-08-18 15:35:15 -03:00
David Capello
bee6b98336 Add support for dark mode title bars on Windows 11 (fix #3527) 2023-08-16 17:48:45 -03:00
Martín Capello
115e20d2a5 Add tab widget to lua api 2023-08-14 18:08:33 -03:00
Gaspar Capello
456113d015 Fix after dropping a selection via Copy (Selection + Ctrl), handlers are not positioned correctly (fix #3977)
This fix disables the fine control when the transformation doesn't
include rotation, skew and/or fine scaling (so just translating doesn't
allow fine control until we rotate/skew/scaling, this might change in
the future if we add a new anti-aliasing rotation algorithm).
Also this fix improves the regular movement of the selected image.
2023-08-14 18:08:20 -03:00
Gaspar Capello
2cc15cda9e Add save dynamics options between sessions (fix #3933) 2023-08-14 18:07:46 -03:00
David Capello
9755efece4 Add note to remove duplicated code incorporated in aebb370906 2023-08-14 18:06:55 -03:00
Martín Capello
aebb370906 Add autoscrollbars feature to Lua API Dialog:show function 2023-08-14 18:04:24 -03:00
Martín Capello
1143e3bb4f Limit window position to prevent hiding its title bar when using single-window UI (fix #3839) 2023-08-14 18:04:24 -03:00
David Capello
7358626859 Add flip/rotate brush support to ChangeBrush command (#1222)
Implement part of:
https://github.com/aseprite/aseprite/issues/1222
https://steamcommunity.com/app/431730/discussions/1/1479856439033920884/
https://community.aseprite.org/t/flipping-rotating-the-current-brush/1854
2023-08-09 21:56:55 -03:00
David Capello
2406e2b197 Add FlipDiagonal algorithm 2023-08-09 16:12:02 -03:00
David Capello
aeeef8e255 Add suppor for doc::Image row stride size > width size
This patch solves several problems introducing the possibility to
specify a row stride bigger than the width (visible pixels) on each
image row. Useful in case that we want to align the initial pixel
address of each row (if DOC_USE_ALIGNED_PIXELS is defined).

This allows us to use some SIMD intrinsics (e.g. SSE2) for some image
functions in the future (right now implemented only in the new
is_same_image_simd_templ() for is_same_image()).

Anyway to avoid breaking some existing code, by default we'll still
keep the old behavior: row stride bytes = width bytes (so
DOC_USE_ALIGNED_PIXELS is undefined).
2023-08-07 15:27:39 -03:00
David Capello
ce37fbc8e3 Minor fix in doc_range_tests in the internal image used 2023-08-04 14:45:31 -03:00
David Capello
558ff54cb0 [lua] Add traceback info when a doc object is deleted and we try to use it
A reference to a doc object (Sprite, Layer, Cel, etc.) is done through
its ID in the scripting engine, when we try to access it from a script
that element might be already deleted. Previously we displayed the a
message like "Using a nil 'Cel' object". With this change we show the
traceback and a "Tried to access a deleted 'Cel'" message.
2023-08-03 20:45:44 -03:00
David Capello
741cd31fdd Update laf module 2023-08-03 13:51:40 -03:00
David Capello
50dbba268d Update actions to use new node16 as GitHub is deprecating node12 2023-08-02 18:46:52 -03:00
David Capello
413288a014 Improve flip_image() performance (x10 from old impl, x2 from new slow impl)
The old impl was using get/put_pixel(), the new slow one is using the
get/put_pixel_fast(), and the new default flip_image() is using just
raw pointers.

Added some utilites like random_image() for testing purposes, and
DOC_DISPATCH_BY_COLOR_MODE() macros to avoid switch/case for each
color mode. In a future these might use generic lambdas.
2023-08-02 17:35:20 -03:00
David Capello
2e1d50bf33 Fix some std::clamp() calls: max value cannot be less than min value 2023-07-31 10:31:08 -03:00
Gaspar Capello
ab2d7f79a3 Fix Magic Wand should "refer to visible layers" anyway when the active layer is hidden (fix #3939) 2023-07-25 10:27:06 -03:00
Gaspar Capello
a2e3ab44bd Don't rotate rectangular selection when we're in "subtract mode" and touch editor edges (fix #3976)
As Shift+Alt enables the subtract mode, if we touch an editor edges
and receive a MouseEnter message, we cannot update the selection
modifiers with the pressed Alt key because that will start rotating the
rectangular marquee automatically. We've to start rotating only if we
release the Alt key and then press it again (not by just moving the
mouse).

Recent regression introduced in bd91a6430f
when the ordering of MouseEnter/Move/Leave message order was fixed.
2023-07-25 10:18:46 -03:00
David Capello
392dbd1303 Fix font issues w/some Cyrillic script chars (fix #3797, fix #3975)
* Fixed spacing of "в", "о", and "л".
* Fixed "У", "у", "х" glyphs.
2023-07-24 17:43:55 -03:00
David Capello
056073b3f1 Fix regression w/initial folder on file selector (fix #3979)
Regression introduced in 556c621eeb
2023-07-24 16:19:59 -03:00
David Capello
400456cbec Right-clicking a tileset mode button gives the possibility to set it as the default one
Feature request: https://community.aseprite.org/t/19487
2023-07-19 11:27:00 -03:00
David Capello
11644a7d16 Add Shift+F7 to toggle other layers visibility on Preview window 2023-07-19 10:56:16 -03:00
David Capello
32009723c5 [lua] Ask for access for package.loadlib() function 2023-07-19 09:15:15 -03:00
David Capello
64369281fa Update laf module 2023-07-18 21:48:44 -03:00
David Capello
890ed91d81 [x11] Disable the native file selector on X11 (#3974)
It looks like the mouse got captured by the Aseprite window if we
start the Zenity command using the mouse in certain way (e.g. when we
click the Open File link from the Home tab). The same doesn't happen
if we press Ctrl+O or click the File > Open menu.
2023-07-18 21:42:49 -03:00
Gaspar Capello
e9f078e66e Fix error decoding pico-8 GIFs (fix #3922) 2023-07-18 20:55:32 -03:00
Martín Capello
242555ab06 Allow changing the tileset assigned to a tilemap layer 2023-07-18 18:50:57 -03:00
Martín Capello
4926f4c1fc Show, duplicate and delete tilesets in Sprite Properties dialog (fix #3875) 2023-07-18 18:50:57 -03:00
David Capello
a2d8a080f5 [lua] Create app.window to access new main window properties (#3927)
We moved the app.width/heigth to app.window.width/height and
app.events.on('resize', ...) to app.window.events.on('resize', ...).
2023-07-18 17:54:57 -03:00
lampysprites
7ee866643b [lua] Add width and height properties to app 2023-07-18 15:50:22 -03:00
lampysprites
30b858d89e [lua] Add "resize" to app events 2023-07-18 15:50:19 -03:00
Gaspar Capello
98366d3dee Fix layer name cell resizing in timeline during gui scaling or theme change. 2023-07-18 15:39:59 -03:00
Gaspar Capello
264cd98ab4 Fix menu items that don't respect UI scale (fix #3843) 2023-07-18 15:39:59 -03:00
Gaspar Capello
081f1e535b Fix ButtonSet widget with icons resizing when UIScale is changed 2023-07-18 15:39:59 -03:00
Gaspar Capello
0c3d78b4ce Fix unexpected behavior during multiple cel selection + cel property changes (fix aseprite/aseprite#3886)
Prior to this fix, if a field was modified, all fields were overwritten with the values from the Cel Properties dialog.
2023-07-18 10:39:13 -03:00
David Capello
daf3e70e9d Fix warning about undefined blend mode conversions
This was added to avoid the "control reaches end of non-void function"
warning.
2023-07-17 19:29:07 -03:00
David Capello
e84bee0f99 Minor changes removing "using namespace doc" from app/color.h 2023-07-17 15:02:15 -03:00