Commit Graph

4541 Commits

Author SHA1 Message Date
Martín Capello
2639c36b2f Create EnterLicense dialog 2022-06-28 19:09:10 -03:00
Martín Capello
588d8027f4 Conditionally compile the license activation code when the ENABLE_DRM flag is defined 2022-06-28 19:09:10 -03:00
Martín Capello
122769c836 Change the error message when the Save operation is not available 2022-06-28 19:09:10 -03:00
Martín Capello
f672193732 Fix linked libraries when ENABLE_DRM is on. 2022-06-28 19:09:10 -03:00
Martín Capello
740dd166de Refactor the code to change the "register" dialog for "enter_license" dialog 2022-06-28 19:09:10 -03:00
Martín Capello
fcac48cccb Add option to enter Aseprite license key (#2664)
This is an initial version to add an automatic update feature in the
future.
2022-06-28 19:09:10 -03:00
David Capello
faecd682fc Merge branch 'main' into beta 2022-06-28 19:05:54 -03:00
Martín Capello
306e13dfad Clear the exported images with its mask color instead of 0 (fix #3391) 2022-06-28 18:43:23 -03:00
Gaspar Capello
1f5e4cfc4f Add '{title}' and '{layer}' functionality to the Export dialog (fix aseprite/aseprite#3363)
Also Add '{title}' functionality to CLI dialog on sprite-sheet file name
2022-06-28 18:42:33 -03:00
David Capello
3d0b5d809c Fix bug in move_or_copy_palette_colors() accessing out-of-range index 2022-06-28 15:17:29 -03:00
David Capello
6d30f274f4 [msvc] Fix problem using invalid min/max bounds in std::clamp
There is an assert() in the std::clamp() impl on MSVC that checks if
the min/max values are valid.
2022-06-28 14:02:18 -03:00
David Capello
caf475b2dc Merge branch 'main' into beta 2022-06-15 13:44:34 -03:00
David Capello
b7d5d4a2c9 Editable resize factor in File > Export (fix #3007)
Related to #3008
2022-06-15 12:25:43 -03:00
David Capello
af74f8bc84 Fix memory leak when the created cel is not used in ExpandCelCanvas 2022-06-14 23:25:10 -03:00
David Capello
4aa5fedfec New "on the fly" resize when saving/exporting image (fix #1112)
Implemented using a new FileAbstractImage interface to get scanlines
for each frame automatically resized (without modifying the original
sprite/without using SpriteSize command/adding new undo information).

Related to #3008
2022-06-14 23:19:39 -03:00
David Capello
e2798bc849 Fix crash creating the "No Recent File" w/AppMenuItem() (fix #3371) 2022-06-14 14:01:28 -03:00
David Capello
30b61e501e [lua] New Image(Image, Rectangle) ctor 2022-06-14 10:04:54 -03:00
David Capello
82cd244a6e Add support to use SaveFile commands from CLI (without UI) 2022-06-13 19:19:44 -03:00
David Capello
ddc1b76214 Convert SaveFileBaseCommand to CommandWithNewParams
With this patch we fixed some use cases:
* We can show the ui with a default filename { filename=..., ui=true }
* We can specify fromFrame/toFrame for SaveFileCopyAs
2022-06-13 17:04:12 -03:00
David Capello
d160fb8b91 Minor changes in SaveFileCommand to use enums instead of bool params 2022-06-13 12:46:11 -03:00
David Capello
8f44b521b6 Merge branch 'main' into beta 2022-06-10 10:31:13 -03:00
David Capello
4471dab289 [osx] We cannot use std::optional::value() if we want to support macOS 10.9
It looks like value() member was introduced in macOS 10.13 (error
detected because we use CMAKE_OSX_DEPLOYMENT_TARGET=10.9).
2022-06-09 19:07:08 -03:00
David Capello
71d885d2a0 Replace base::clamp -> std::clamp as now we use C++17 2022-06-09 19:05:48 -03:00
David Capello
b2d46bf10b Use std::unique_ptr/optional in more App objects 2022-06-09 17:29:40 -03:00
David Capello
99c0d5b743 Fix SpriteEvents destruction (fix #3162)
Classic "static initialization order fiasco" but in the destruction
phase.
2022-06-09 16:28:25 -03:00
David Capello
1630416991 Fix a crash when a script generates a Fg/BgColor change when closing the app
If a script Dialog changes the app.fgColor/bgColor in its onclose
callback, it will notify all fgColor/bgColor preference
observers (ContextBar is one of them), if we don't disconnect from
these signals when we're deleting ContextBar, the signals will call a
deleted slot/connection from app::script::close_all_dialogs().
2022-06-08 16:24:36 -03:00
David Capello
39ba883f90 Fix bugs executing plugin init/exit() functions in different situations
Reinstalling a previously enabled plugin extension wasn't running the
init() function, and uninstalling it wasn't calling its exit()
function.
2022-06-07 15:02:54 -03:00
David Capello
a39e235b23 Don't store a Command* pointer in AppMenuItem (fix #3359, fix #3360)
Instead of storing a Command* we can store the command ID, which it's
less problematic in extreme cases where the Command that is being
referenced is deleted or recreated, i.e. when a plugin is
disabled/re-enabled.
2022-06-07 14:47:40 -03:00
David Capello
f9d0e441d3 Be able to select a range of colors/tiles to the end just moving the mouse outside the palette region 2022-06-02 10:32:15 -03:00
David Capello
eb4fbe9114 Fix bug selecting any tile from the color bar (fix #3357) 2022-06-02 10:31:15 -03:00
David Capello
77771b703b Merge branch 'main' into beta 2022-05-30 20:41:35 -03:00
David Capello
93dcc0349f Fix warning by ThreadSanitizer in HttpLoader 2022-05-30 19:41:41 -03:00
David Capello
6ce205e0db Add experimental option to disable shaders for color selectors (#960) 2022-05-30 19:35:01 -03:00
David Capello
1781ee0f15 Fix bug painting a spot w/brush size=max when releasing the mouse after auto-scrolling 2022-05-30 18:45:57 -03:00
David Capello
251323a4d5 Add new MouseMessage() ctor to copy full information of the original message
This is mainly to keep the pressure information when a MouseMessage is
copied, and any future property which could be added in MouseMessage.
2022-05-30 18:44:12 -03:00
David Capello
23b269a6bc Use shaders for ColorWheel selector
This patch includes a fix for the RYB color wheel (the blue was not in
the correct hue angle).
2022-05-27 19:57:37 -03:00
David Capello
b561a6fbfb Use Sentry breadcrumbs to get wintab32.dll information
Useful to detect which vendor is causing most of the crashes related
to wintab32.dll. Related to:
https://github.com/aseprite/aseprite/issues/2785#issuecomment-1033222868
2022-05-26 19:34:23 -03:00
David Capello
0e9001fbd3 Go to Desktop instead of showing an error if a parent folder is deleted in the middle of files navigation 2022-05-24 09:06:32 -03:00
Kukhyeon Heo
c457f1680a [win] Fix crash browsing files when a folder is deleted (fix #2950) 2022-05-23 18:21:11 -03:00
David Capello
684d06ede8 Merge branch 'main' into beta 2022-05-23 18:04:55 -03:00
David Capello
fd430603a0 [lua] Allow to compare different docobj types without failing (fix #3218)
Just return false if we compare a layer with a sprite, etc.
2022-05-23 17:15:15 -03:00
David Capello
3ac4ca8869 Create a custom widget for UndoHistory (fix #3281)
Several performance issues fixed (as we avoid keeping a ListBox with
ListItem in sync with the UndoHistory/UndoStates). There is still some
room for improvement: e.g. grouping several ui::View::updateView() in
just one if several onAddUndoState() will be called (e.g. when we are
running a script without transactions).
2022-05-23 16:19:06 -03:00
David Capello
1366a6948c Fix performance issues adding/deleting widgets (related to #3281) 2022-05-20 11:03:12 -03:00
David Capello
b9206cc872 Fix locked sprite errors moving/copying multiple cels when the Cel (or Layer) Properties dialog is open (fix #3278) 2022-05-19 19:15:32 -03:00
David Capello
52779d4b09 Fix memory leak in UserDataView simplifying its ctor
Each "new gen::UserData" wasn't being freed.
2022-05-19 18:56:21 -03:00
David Capello
ff5afba6ae Merge branch 'main' into beta 2022-05-19 16:55:30 -03:00
David Capello
4f9fe90304 Display the Hue bar in ColorTintShadeTone with saturation/value=1.0
This is the previous behavior, but might change in the future.
2022-05-17 13:43:22 -03:00
David Capello
aca96c6d36 Use shaders for ColorTintShadeTone/ColorSpectrum selectors (#960)
This is the first step to optimize the painting code of ColorSelectors
which were using a background thread to paint their
surface. ColorWheel is still using the old method (without shaders).

This impl is already a lot faster on CPU, and it's ready for
GPU-acceleration in a future.
2022-05-17 13:24:53 -03:00
David Capello
4b99d3022a Minor change in ColorSelector to resize the previous rendered canvas 2022-05-17 09:07:52 -03:00
David Capello
922f99ef87 Use Graphics::drawSurface() with explicit Sampling/Paint options 2022-05-17 09:07:24 -03:00
David Capello
b5414c5d95 Merge branch 'fix-2776' of https://github.com/ruerob/aseprite into ruerob-fix-2776 2022-05-13 15:25:18 -03:00
David Capello
0a3644dfbb Update laf module with initial GPU support (#960)
Anyway this is incomplete and Aseprite is not yet ready to support GPU
acceleration (as the rendering phase is CPU intensive).
2022-05-13 11:41:44 -03:00
David Capello
8d2863a58b Merge branch 'main' into beta 2022-05-05 09:57:29 -03:00
David Capello
adaef68bbb Minor change in macros to detect platform 2022-05-05 09:39:16 -03:00
David Capello
7fea99a718 Move the "invert wheel for brush size" option to Edit > Keyboard Shortcuts > Mouse Wheel 2022-05-05 09:26:19 -03:00
David Capello
04903692f9 Add some comments & simplify code handling WheelAction::BrushSize 2022-05-05 09:15:00 -03:00
Thanos Kamber
2a00d41e95 Changed the default behaviour in Windows and Linux
This commit makes the default behaviour for changing the brush size to
be scroll up to increase brush size, this should already be the case
in macOS.

Note: It's correct in Windows and Linux, but I don't have a mac to test
it with.
2022-05-04 18:49:22 -03:00
Thanos Kamber
b9dfad6b6b Option invert scrolling direction for brush size (closes #2364)
This commit adds the option to invert if the brush size increases or
decreases when holding CTRL and scrolling as mentioned in the issue #2364

By default, the previous behavior is kept.
2022-05-04 18:48:45 -03:00
David Capello
9248f53447 Don't invalidate the cached file system on each action
We can use the refresh button for this, and in a future we could
refresh it when the window loses focus and is activated again, or
listening the file system changes.
2022-05-03 15:46:01 -03:00
David Capello
db84c02e94 Fix crash accessing an invalid iterator in FileSelector::onRefreshFolder() 2022-05-03 15:24:55 -03:00
David Capello
debd22014c Fix program hanging when calling FileSelector::refresh()
The FileSystemModule is already locked, so if we use LockFS another
time it will try to lock a FileSystemModule::m_mutex for a second
time.
2022-05-03 15:14:44 -03:00
David Capello
f41c6bc1c5 Fix compilation in macOS (and add Command+R to refresh) 2022-05-03 15:11:47 -03:00
David Capello
a004b7dfe1 Merge branch 'fix-232' of https://github.com/Enfyve/aseprite into Enfyve-fix-232 2022-05-03 15:11:27 -03:00
David Capello
dfa357eb8d Add an experimental CommandResult for the execution of commands
This makes possible to return true or false after the execution of
each command app.command.CommandName() if it successes or fails.
Currently the Lua API documentation says something about this here:

  https://github.com/aseprite/api/blob/main/api/command/ReplaceColor.md#replacecolor

But this is not true, the function always returned nil. Now it will
return true or false.
2022-04-29 09:53:57 -03:00
David Capello
cc7da16691 Run Console in background so commands can continue running and logging to the console if needed (fix #3227) 2022-04-28 21:58:15 -03:00
David Capello
94065571b5 [x11] Add possibility to set a user-defined string to detect styluses (#3176) 2022-04-28 16:33:21 -03:00
David Capello
f638b5ca2b Fix minor memory leak loading a doc::Palette from backup data 2022-04-26 12:16:31 -03:00
David Capello
c15f374690 Fix timeline re-painting issue when changing tag color (#3242)
This is the worst possible hack, but we're already doing this for cel
and layer color. Something to think about with #3266
2022-04-25 15:14:02 -03:00
David Capello
b31affd2e8 Fix timeline re-painting issue when changing tag range (#3242) 2022-04-25 14:00:26 -03:00
David Capello
96cb38c29d Fix timeline re-painting issue when renaming a tag (#3242) 2022-04-25 13:32:16 -03:00
David Capello
1601f7f4b1 Fix timeline re-painting issues when copying & pasting cels (fix #3242) 2022-04-25 12:54:13 -03:00
David Capello
2a59076f49 Merge branch 'main' into beta 2022-04-25 11:45:31 -03:00
David Capello
e45e05eaff Don't create new threads for files we couldn't generate a thumbnail for 2022-04-22 13:12:48 -03:00
David Capello
319824021b Keep plugin preferences when re-installing an extension (fix #3259) 2022-04-22 09:09:10 -03:00
David Capello
65ef6f8e96 Replace utf8 iterators with utf8_decode (fix #3260)
This should fix some problems decoding invalid UTF-8 strings.
2022-04-21 20:24:49 -03:00
David Capello
75a99360a0 Use std::mutex & std::thread in ThumbnailGenerator 2022-04-21 12:46:21 -03:00
David Capello
f5bce17e7b Delete unused code in FileOp and FileFormat 2022-04-21 12:23:52 -03:00
David Capello
737a60c5ac Minor change in ThumbnailGenerator::instance() 2022-04-19 17:46:31 -03:00
David Capello
78ec753a3c Simplify list of workers in ThumbnailGenerator with unique_ptrs 2022-04-19 17:14:50 -03:00
David Capello
f0a7d1faaa Fix data race loading next thumbnail without locking the item
This was detected with -fsanitize=thread
2022-04-19 17:09:49 -03:00
David Capello
46626bb5ce Merge branch 'main' into beta 2022-04-13 23:01:12 -03:00
David Capello
e4c2995326 Extensions now support defining keyboard shortcuts (#1403, #3239) 2022-04-13 22:46:48 -03:00
David Capello
721e401052 Fix some memory leaks & simplify code sending UI messages 2022-04-13 21:04:54 -03:00
David Capello
b4d3692927 Add ShowMenu command so the user can customize Alt+top level menu mnemonic shortcuts (#3239) 2022-04-12 22:52:09 -03:00
David Capello
93b0e9e520 Fix painting extra straight line using Ctrl+Shift w/Pencil tool (fix #3196) 2022-04-12 19:11:20 -03:00
David Capello
43513e0f1b Don't show tooltip when a new frame/layer is created from a script transaction
This might improve the performance of some scripts if it creates
several frames/layers at the same time.
2022-04-11 09:53:01 -03:00
David Capello
11417c56ac [lua] Add Cel.frame setter to move a cel quickly 2022-04-07 19:48:39 -03:00
David Capello
b4e9d7b155 Fix memory leaks when deleting backups from recovery data 2022-04-07 11:48:49 -03:00
David Capello
adce7ce23e Merge branch 'main' into beta 2022-04-06 00:12:20 -03:00
David Capello
e61888fc92 Fix compilation when ENABLE_UI is disabled and UIContext isn't defined 2022-04-06 00:10:49 -03:00
David Capello
ab2cef1c29 Merge branch 'main' into beta 2022-04-06 00:00:44 -03:00
David Capello
2594892dd5 Fix crash when a Lua error happens in a Dialog onclose (fix #3237) 2022-04-05 23:57:36 -03:00
David Capello
16ca5a55db Merge branch 'main' into beta 2022-04-05 23:16:55 -03:00
David Capello
3ed969ff0a Close all docs correctly even in case of exception (fix #3162) 2022-04-05 23:07:08 -03:00
David Capello
2a908f79df lua: Dialog() must return nil if there is no UI available
This avoids some crashes when running in --batch mode and some script
tries to create a Dialog().
2022-04-05 20:45:34 -03:00
David Capello
66d74688e2 Merge branch 'main' into beta 2022-03-31 19:34:38 -03:00
Gaspar Capello
683747f412 Remove tag range adjust when exporting sprite sheets (fix #3210)
Before this fix, tag ranges were adjusted in the json data file, in the 'meta' sector, when the --list-tags and --ignore-empty flags were set.
Particularlly, when --split-layers, --list-tags, and --ignore-empty were on, the calculation of tag ranges could fail with cels with pure mask pixels.
2022-03-31 17:35:49 -03:00
Gaspar Capello
b70a29269d Fix wrong json export with linked, trimmed cels (fix #2600)
Before this fix, the json file associated with the exported sprite sheet had wrong 'spriteSourceSize' coordinates in particular cases like this:
- Linked cels
- Export Sprite Sheet options: TrimmedCels + Merge Duplicates + SplitLayers checked
2022-03-31 16:43:14 -03:00
Jeremy Behreandt
d429797359 Fix Lua Color HSL Constructor
Changed call from HSV to HSL for Lua Color HSL constructor.
2022-03-29 23:15:17 -03:00
David Capello
c08dc44901 Revert "Fix multi layer movement in tilemap mode (fix #3144)"
This reverts commit bc050e8f15.
2022-03-15 13:40:46 -03:00
David Capello
3215051bc7 Merge branch 'main' into beta 2022-03-14 17:25:28 -03:00
David Capello
da4908474e Fix crash when showing the palette popup (fix #3189) 2022-03-14 17:21:54 -03:00
Gaspar Capello
bc050e8f15 Fix multi layer movement in tilemap mode (fix #3144)
Before this fix, a multi-layer mask move (with mixed layer types:
normal layer and tilemap layers with different grids) caused loss of
drawing areas.

The heart of this solution is to correctly align the 'selection mask'
and 'transform data' according to the layer's grid, and also, forcing
'site' TilemapMode/TilesetMode before each
reproduceAllTransformationsWithInnerCmds() iteration.

The scale transformation could have some things to improve in later
commits. Not fully tested yet.
2022-03-14 11:13:11 -03:00
David Capello
70a42c4c77 Add WheelAction to change InkType (related to #3195)
Mockup contributed here: https://community.aseprite.org/t/2468/10
2022-03-10 16:08:56 -03:00
David Capello
ffc7af2ee8 Merge branch 'main' into beta 2022-03-10 15:50:05 -03:00
David Capello
8064179dfc Don't show clipboard error when we're trying to show the File > New dialog
The error is confusing because the user doesn't know that we're trying
to access the clipboard info only to fill Width/Height fields
automatically on File > New. Some errors (like "invalid image format")
should be displayed only when we use Edit > Paste explicitly.
2022-03-10 15:28:52 -03:00
David Capello
4ce2d1a340 Add option to simulate mouse wheel using key shortcut+drag mouse (fix #3195)
Now we can change several values (zoom, brush size, etc.) pressing a
keyboard shortcuts and dragging the mouse in a specific vector
direction (DragVector). It allows the modification of one, two, or
even more parameters at the same time (e.g. X axis to change the brush
size, Y axis the alpha value of the ink).
2022-03-08 20:40:11 -03:00
David Capello
3dd47f913f Add missing strings for WheelActions to move through tiles 2022-03-03 18:07:51 -03:00
David Capello
18ba8f184b Merge branch 'main' into beta 2022-03-02 21:31:31 -03:00
David Capello
31ce326d5b Fix ink tests when ENABLE_UI=0
It looks like we cannot trust in the get_current_palette() content
when we are running scripts without UI. So it's preferable if we get
the palette directly from the sprite.

We should completely remove the get_current_palette() function.

Tests can be found in https://github.com/aseprite/tests/blob/main/scripts/inks.lua
2022-03-02 21:27:06 -03:00
David Capello
4b3b1f31e0 Fix ChangePixelFormatCommand so it can be compiled/linked when ENABLE_UI=0 2022-03-02 21:26:14 -03:00
David Capello
c40993e284 Merge branch 'main' into beta 2022-03-02 16:07:22 -03:00
Gaspar Capello
ef31179934 Fix painting with transparent color, opacity 255, Indexed color mode, in Alpha Compositing to behave as Simple Ink (fix #3047) 2022-03-02 15:28:25 -03:00
David Capello
e12fb556c1 Fix contour tool + pixel perfect when drawing just one pixel
Bug report: https://community.aseprite.org/t/13149
2022-02-25 15:05:29 -03:00
David Capello
2100c45de2 Fix memory leaks when we use doc::Keyframes structure
Detected with LeakSanitizer on keyframes_tests but also reported in
PR #3141. We've finally solved this problem using std::unique_ptr.
2022-02-24 19:53:42 -03:00
David Capello
d16c34b247 Fix memory leaks in some tests found with LeakSanitizer 2022-02-24 19:43:22 -03:00
David Capello
cef7e7eed1 Don't show edge layers when we draw
If we have the View > Show > Layer Edges option enabled, the active
layer edges are always visible, and it is confusing when we're drawing
because we temporarily modify the cel position/bounds. It's better if
we hide the edges in the DrawingState.

Regression introduced in 31bf651d8b
2022-02-24 17:00:21 -03:00
Joshua Ogunyinka
31bf651d8b Fix panning canvas out of view clips in Auto Guides (fix #2994) 2022-02-24 16:51:43 -03:00
David Capello
04fa9a47ab Merge branch 'main' into beta 2022-02-24 16:42:05 -03:00
David Capello
b212a24479 Add sampling options to Edit > Preferences dialog too (#3183) 2022-02-21 16:21:07 -03:00
David Capello
5ccf414183 Add options to change the downsampling algorithm (fix #3183)
Also we've restored the default algorithm to bilinear + mipmapping,
which was the default on the Aseprite before we switched to Skia m96.
This was requested by some users.
2022-02-21 15:30:09 -03:00
David Capello
3162d224f7 Add editor_benchmark
This is a simple initial benchmark to test how well the editor perform
in common operations like scroll and zoom. We have plans to improve it
through caching (and GPU textures) progressively.
2022-02-21 10:31:54 -03:00
David Capello
7e76d81fcc Merge branch 'main' into beta 2022-02-18 19:32:33 -03:00
David Capello
2d3de1728c Add SkinTheme::get() to avoid using SkinTheme::instance() as much as possible
This was done to avoid some nullptr references using
SkinTheme::instance() (mainly from
StatusBar::IndicatorsGeneration::add()) when the application is being
closed because an exception was thrown. This might be useful to detect
certain kind of crashes from Sentry.
2022-02-18 19:01:46 -03:00
David Capello
104f8a10cf Fix crash using invalid index in FileItemList (fix #3181)
There is a state where m_selected is pointing to an item that doesn't
exist in the current list of items. We didn't detect this on Debug
mode yet, but we've received one Sentry crash report about it.
2022-02-17 10:36:18 -03:00
David Capello
8b5133b4c0 [lua] Fix context used in App.useTool() 2022-02-11 10:41:56 -03:00
David Capello
0c1e08138e [lua] Fix crash using app.useTool() when the active editor is in MovingPixelsState (fix #2933)
More information in https://github.com/aseprite/aseprite/pull/3166
2022-02-11 10:19:32 -03:00
David Capello
1f4e3bcd11 Merge branch 'main' into beta 2022-02-08 12:56:26 -03:00
David Capello
845ff17788 Fix "Reset Scale" notification when there is enough workarea available
Instead of using the window size, we can use the available workarea to
know that the user can resize the main window to its full size and
there will be enough room to display some common dialogs like the
Preferences one.
2022-02-08 12:07:36 -03:00
David Capello
0588ebd01b [lua] Generate onclick event when we reorder/click a Dialog:shades with { mode="sort" } (fix #3081) 2022-02-04 17:36:49 -03:00
David Capello
97389dd1a3 [lua] New API version 2022-02-04 14:08:19 -03:00
David Capello
9cf2ff782f [lua] Fix Color.index to return an integer instead of a number (fix #3159) 2022-02-04 13:44:13 -03:00
David Capello
8d4941d86c [lua] Add Color{ index } ctor 2022-02-04 13:43:43 -03:00
David Capello
0cfeacab5c Stop filter preview before we change filter parameters
Similar fixes as in 811b893320
2022-02-03 14:59:46 -03:00
Joshua Ogunyinka
811b893320 Fix occassional crashes in despeckle/median filter (fix #2903) 2022-02-03 12:51:30 -03:00
Gaspar Capello
653931c4fc [lua] Add a warning message deleting objects that are not part of the sprite (fix #3135)
Before this fix, the Sprite:deleteLayer/Slice/etc() Lua functions
didn't warn the user if its argument (a layer/slice/etc) didn't belong
to the corresponding sprite.
2022-02-03 11:02:55 -03:00
David Capello
aec012a0d9 Fix crash using a nullptr m_pixelsMovement on MovingPixelsState::onCommitMouseMove() (fix #3161) 2022-02-03 10:57:49 -03:00
Joshua Ogunyinka
aa188d641b Fix moving rectangular marquee box while selecting color (fix #3143) 2022-02-03 10:11:25 -03:00
David Capello
bf48381c23 Show selected index correctly in PaletteViews used from ColorPopups (regression introduced in d164458c24) 2022-01-14 16:44:13 -03:00
David Capello
ce9640fbd3 Fix regression about hidden Frame/Zoom indicators by default in StatusBar
Bug report: https://community.aseprite.org/t/12488/11
2022-01-14 16:27:00 -03:00
David Capello
0b3773b17d Merge branch 'main' into beta 2022-01-13 08:44:22 -03:00
David Capello
9e23d31d84 Fix crash using Shift key in Pencil tool
Bug introduced in f3fd0de3d0
2022-01-13 08:43:03 -03:00
David Capello
835b76e83a Merge branch 'main' into beta 2022-01-13 07:09:25 -03:00
David Capello
f3fd0de3d0 Improve detection of one click when using a stylus
We can interpret a quick mouse down/up events (e.g. less than 250
milliseconds) as a simple click if the mouse doesn't move too much in
the middle of both events (e.g. a tiny rectangle of 7x7 pixels).

Some discussion about this: https://community.aseprite.org/t/12491/10
2022-01-12 23:23:19 -03:00
David Capello
87e8b45dc1 Fix regression clicking same spot w/Rectangular Marquee to deselect
Regression introduced in 26c1a94b83

Reported:
- https://community.aseprite.org/t/12491/1
- https://steamcommunity.com/app/431730/discussions/0/3200371016617015005/
2022-01-12 22:23:26 -03:00
David Capello
53c1041953 Merge branch 'main' into beta 2022-01-11 14:42:48 -03:00
David Capello
5b1740cddd [win] Fix the detection of a crash to report via Sentry 2022-01-11 14:39:52 -03:00
David Capello
0f04e016b6 Set same scroll position in timeline after updating scrollable area
This fixes the following problem:

* Hide the Timeline, and restart the program
* Open a sprite with a lot of layers
* Show the Timeline

Without this fix, depending on the selected layer the scroll will be
invalid and the layer will not be displayed by default when the
Timeline appears.

Related to 229ded9642
2022-01-11 11:34:30 -03:00
David Capello
f7a87af0fd Fix crash using Shift+click on Pencil tool (cherry-picked from ab3bf31c6a) 2022-01-10 15:59:36 -03:00
David Capello
229ded9642 Fix regression detected in #3066 setting default timeline scroll pos 2022-01-10 11:41:33 -03:00
David Capello
8ec2fff447 Merge branch 'main' into beta 2022-01-06 18:44:38 -03:00
David Capello
06cfbd794e Use DelayedMouseMove for MovingCelState too (#3119) 2022-01-06 18:43:12 -03:00
David Capello
ab3bf31c6a Merge branch 'main' into beta 2022-01-06 17:44:43 -03:00
David Capello
26c1a94b83 Group several mouse movement in one on the Editor
Mainly for Line-like tools (which require the last mouse position
only). Related to #3119, possible fix for several performance issues
on Linux mainly.
2022-01-06 16:54:39 -03:00
David Capello
6e726025ee Merge branch 'main' into beta 2022-01-05 20:16:13 -03:00
David Capello
4619089869 Fix warning in ColorBar::onIsPaletteViewActive() 2022-01-05 20:14:00 -03:00
David Capello
02de9be1ab Rename src/tests/test.h -> src/tests/app_test.h to avoid confusion with observable tests/test.h 2021-12-23 21:38:17 -03:00
David Capello
2be9403a48 Rename the Sentry crash handler to aseprite_crashpad_handler (#2857) 2021-12-21 13:40:38 -03:00
Joshua Ogunyinka
539e115b7d Fix colorbar palette indicator when view is changed (fix #3082)
The foreground/background color indicators in the ColorBar weren't
visible in certain scenarios e.g. If we choose the Tiles mode in a
tilemap, and then we select a regular layer without changing to Pixels
mode.

Co-authored-by: David Capello <david@igarastudio.com>
2021-12-16 20:37:29 -03:00
David Capello
0eef399ab9 Merge branch 'lua-errors' 2021-12-15 20:19:59 -03:00
David Capello
9340ca387d [lua] Minor change in error messages Websocket -> WebSocket 2021-12-15 20:19:26 -03:00
David Capello
91c687b1e3 Merge branch 'main' into beta 2021-12-15 17:51:19 -03:00
David Capello
977994765c Normalize some cmake options from WITH_* to ENABLE_* 2021-12-15 17:47:44 -03:00
David Capello
cf1678f4b3 Add optional & experimental support to load .psd file (only when ENABLE_PSD=on) 2021-12-15 17:44:51 -03:00
Joshua Ogunyinka
1350cd92c3 Fix incorrect cel alignment 2021-12-15 16:06:00 -03:00
lampysprites
3035d00283 [lua] Show errors that happen inside App.transaction 2021-12-12 19:20:12 +07:00
lampysprites
586b2493f9 [lua] Show more specific websocket errors 2021-12-12 18:57:51 +07:00
David Capello
e7575f2373 [lua] Fix crash using app.ranges.images/editableImages collections (fix #3069)
We were pushing invalid doc::Image objects to the Lua
stack (push_docobj<Image>) instead of pushing a ImageObj related to
the given cels in the active range.
2021-12-10 22:35:37 -03:00
David Capello
a2328a3793 Restore the previous active DocView when we close the non-active sprite
Fixes https://github.com/aseprite/aseprite/pull/2727#issuecomment-852524240
Close #2030, close #2727, close #3080, close #3089

Originally reported in:
https://community.aseprite.org/t/preview-file-to-save-when-closing/2779
2021-12-07 15:45:52 -03:00
MorganDavid
b96d8c8c30 Show user what is about to close (fix #2030) 2021-12-07 15:12:48 -03:00
Joshua Ogunyinka
b1d8da925c Add support for sprite slicing 2021-12-07 08:12:19 -03:00
Joshua Ogunyinka
174ec28638 Add support for frame-by-frame animation 2021-12-06 15:33:32 -03:00
Joshua Ogunyinka
5df21d96e8 Add support for layer groups 2021-12-06 15:33:32 -03:00
Joshua Ogunyinka
6e00c74f5b Add image processing scanline by scanline using iterators 2021-12-06 15:33:32 -03:00
Joshua Ogunyinka
7745921a2b Optimize image transparency detection 2021-12-06 15:33:32 -03:00
Joshua Ogunyinka
e5e9d59e56 Combine onImageScanline into one single function 2021-12-06 15:33:32 -03:00
Joshua Ogunyinka
9a12eb584b Initial to decode PSD files 2021-12-06 15:33:32 -03:00
Joshua Ogunyinka
ff851157cc Fix Shift+N behavior (fix #2957) 2021-12-02 17:33:10 -03:00
David Capello
2b57fcaa6c Merge branch 'main' into beta 2021-12-01 18:14:53 -03:00
Gaspar Capello
b5a787a20f Fix tilemap layers empty after converting color profile (fix #3052)
Before this fix, tilemap layers disappeared after converting the
Sprite's Color Profile in the Sprite Properties dialog.
2021-12-01 17:18:25 -03:00
Joshua Ogunyinka
3c7b344389 Save and retain color profile when saving palettes (part of #2893) 2021-12-01 09:21:02 -03:00
Omar Abdul Aziz
b30e64648e [lua] Dialog:modify() now supports combobox options
References:
* https://github.com/aseprite/aseprite/issues/2965#issuecomment-939556356
* https://github.com/aseprite/api/issues/61
2021-11-30 18:59:57 -03:00
David Capello
693a2c85ff Merge branch 'main' into beta 2021-11-18 13:41:18 -03:00
David Capello
d6339f163b Don't make SkinTheme surfaces slices immutable as we re-use them
Each time we refresh the default theme we re-use all slices/surfaces
of the SkinTheme. This could be completely avoided if we were able to
create sub-surfaces from the original sprite sheet (sharing the same
pixels).
2021-11-18 13:37:34 -03:00
David Capello
704c32ca25 Merge branch 'main' into beta 2021-11-17 14:46:48 -03:00
David Capello
f93b33f248 Migrate to Skia m96 API 2021-11-17 12:36:11 -03:00
David Capello
a713a88845 [x11] Fix initial black window on Linux
Possible regression introduced in f15589734f
2021-11-17 11:32:15 -03:00
David Capello
bed6a8d8b1 [lua] Increment API version 2021-11-16 09:08:39 -03:00
David Capello
c78af5241b Merge branch 'lua-filename-event' 2021-11-16 09:08:17 -03:00
David Capello
c13c521af2 Minor change in style 2021-11-16 09:07:50 -03:00
David Capello
8deb9c46e7 [lua] Fix clipping when drawing an image on a cel image (fix #3054) 2021-11-15 15:53:14 -03:00
Joshua Ogunyinka
12e61d33be [lua] Fix layer iteration when some layer name contains just a number (fix #3045) 2021-11-12 08:13:43 -03:00
lampysprites
67a9c2fe0d [lua] Add "filenamechange" event to Sprite.events 2021-11-11 20:18:44 +07:00
David Capello
ca252f9f02 Fix creating two ImageView if we specify "file" and "icon" for <image> widget 2021-11-05 12:15:24 -03:00
David Capello
c4f2bf79a0 Merge branch 'main' into beta 2021-10-25 17:47:23 -03:00
David Capello
91e8e5cd46 Support scrolling the debugger source code viewport w/the mouse wheel 2021-10-25 17:40:47 -03:00
David Capello
534163ae5f Fix painting issues in the debugger filling the line number column correctly 2021-10-25 17:40:12 -03:00
David Capello
76a815cc2c Merge branch 'main' into beta 2021-10-20 11:53:47 -03:00
Martín Capello
c5fccb1499 Add a check to allow exit command execution only when the main window is the currently running 2021-10-20 11:35:54 -03:00
Gaspar Capello
f15589734f Fix double-clicking a .aseprite file in macOS Finder doesn't open the file anymore (fix #2985)
More info in: #3006
2021-10-20 11:05:24 -03:00