Commit Graph

7602 Commits

Author SHA1 Message Date
David Capello
911589111e Add Sentry as an alternative to handling minidumps manually (#2857) 2021-09-21 11:29:48 -03:00
David Capello
f687ddef72 Update laf module 2021-09-16 18:50:06 -03:00
David Capello
eb53829629 Clone tests beta branch when running actions for Aseprite beta branch 2021-09-13 10:45:17 -03:00
David Capello
7d248c33d7 Fix initialization order of base class and member variable in ui::CloseEvent class
Fixed clang warning: field 'm_canceled' will be initialized after base 'ui::Event'
2021-09-06 18:00:56 -03:00
Martín Capello
495623d6b2 Add support to "visible" attribute 2021-09-06 13:58:19 -03:00
Martín Capello
05dfd75743 Add cancelation support to CloseEvent 2021-09-06 13:57:57 -03:00
Martín Capello
e6d0c1858a Add <image> tag support 2021-09-06 13:53:02 -03:00
Joshua Ogunyinka
3da532453c Fixed issue regarding when color index of a pixel is bigger than the palette size 2021-09-02 16:56:39 +04:00
David Capello
013792a215 Don't access preferences from background thread and check current_editor existence
Related to #2874 and ac31ee35c0
2021-09-01 12:11:02 -03:00
David Capello
6341fcee23 Add missing #include to use current_editor 2021-09-01 12:02:29 -03:00
Robert Rüdiger
ac31ee35c0 Fix translucent backgrounds in color selection 2021-09-01 12:01:59 -03:00
David Capello
4c6835c439 Merge branch 'cyclic-change-color-2' 2021-09-01 10:40:32 -03:00
David Capello
845f275ae7 Enable cycling colors when palette size=1 so RGB/HSV colors are converted to index=0 anyway
In this way after ChangeColor command to increase/decrease an index is
used, we always got an index selected (even index=0 if palette size=1)
2021-09-01 10:38:35 -03:00
Jeremy Behreandt
edb9f89456 Cyclic Color Change in Palettes
Made Change Color: Increment/Decrement Foreground/Background methods cyclic instead of clamped. At last palette element, incrementing selected color returns to first element. At first palette element, decrementing color returns to last element.
2021-08-31 01:10:18 -05:00
Gaspar Capello
dd2d226264 Fix crash after saving a GIF file from an indexed image which transparent index is gone
Before this fix, it was possible to lose the transparent index at Indexed Color Mode.
It was reproducible doing:
- New file, Indexed mode, Black background.
- Erase all the palette, add 40 colors slots (these all will be black)
- Press Remap button
- Go to Sprite > Properties...  set transparent color to 11.
- Erase color entries 2 to 20
- Press Remap button
You'll see the transparent index is gone (transparent index = -1)
To reproduce the crash, additional steps are needed:
- Right click to layer and select 'Layer from Background'
- Make a color RGBA(0, 0, 0, 0) and add to the palette
- Paint on canvas with this color (it'll act like a eraser)
- File > Save As... save in GIF format.
- Press OK
Crash!

This crash was reported on ticket 2620 and 2621.
2021-08-30 15:53:33 -03:00
Jeremy Behreandt
d14cf4038d Color Sort For Hue, Alpha
Removes switch case with fall through. Removes nested switch
cases. Refactors color sorting method to 1. push zero alpha colors to
the front of the palette; 2. resort to value as a criterion for gray
colors; 3. use saturation and value as back up comparisons for each
other for equivalent values; 4. approximate gamma-to-linear when
perceptual lightness is chosen.

Partial fix for #2901.
2021-08-30 15:33:53 -03:00
Joshua Ogunyinka
971ba32338 added support for loading/saving alpha channels in palette files 2021-08-30 10:57:20 -03:00
David Capello
1f6c6951af Add SetGridBounds::setGrid() to avoid some duplicated code 2021-08-30 10:52:40 -03:00
Joshua Ogunyinka
f85f24e847 fixed restoring grid preference on undo/redo (fix #2872) 2021-08-28 08:54:00 +04:00
David Capello
dc1c41f176 Add initial .clang-format
Maybe it's not the final version, but it's a good start. We cannot
match the coding style that we were using, but it's pretty close.
We'll start applying clang-format incrementally in a near future.
2021-08-27 19:17:27 -03:00
David Capello
6d67d91335 Add note about const usage in coding style 2021-08-27 17:42:44 -03:00
Joshua Ogunyinka
33d0187dab Continue playing the same tag in the Preview window after switching sprites (fix #2797) 2021-08-26 08:54:29 -03:00
Martín Capello
bbec09c752 Fix typo in CMakeLists.txt file 2021-08-24 11:14:53 -03:00
David Capello
d3d30ed851 Merge branch 'improve-save-performance-fseek' 2021-08-23 12:33:20 -03:00
jestarray
59e01493cb Added Duration to filename formatter 2021-08-23 11:50:28 -03:00
David Capello
4981f05f0b Fix color of the central little pixel of the crosshair 2021-08-20 20:11:51 -03:00
David Capello
95e6b5ddd6 Update .aseprite file specs with v1.3 updates 2021-08-20 14:48:01 -03:00
David Capello
f2fb2791a0 Fix crash changing screen/UI scaling (fix #2830) 2021-08-20 14:38:45 -03:00
David Capello
2fa47b59c9 Center the "open sequence" dialog correctly when it's showed from a file specified in the CLI (fix #2899) 2021-08-18 15:36:15 -03:00
David Capello
1e98a65859 Minor change in ui::Manager::run() 2021-08-18 15:34:05 -03:00
David Capello
341408e902 Don't crash when saving palettes to .jpg format (fix #2654)
Now .jpg is not even show in the list of available format to save
palettes (same for other file format that don't support indexed color
mode).
2021-08-18 13:03:38 -03:00
David Capello
5ecebff375 Don't name any specific Windows SDK version (fix #2886) 2021-08-14 12:02:59 -03:00
David Capello
078ba588a7 Update laf submodule 2021-08-13 13:10:07 -03:00
Martín Capello
1eb740482e Update last row and column of pixels in the editor's viewport when the sprite is zoomed in and the color mode or FX dialog are used. (also fix #2803) 2021-08-13 11:11:55 -03:00
Alex Marcolina
54fddf7cc3 Replace fseek with putl/w to reduce io flushes
ase_file_write_start_chunk needs to skip forward the size of the chunk header, as these values will be written in later.  Using fseek was causing performance issues on my Windows machine due to causing an io flush on every chunk, for projects with many (thousands) of chunks.  Replacing with the equivalent put commands in ase_file_write_close_chunk results in ~100x speedup.
2021-08-01 20:44:15 -07:00
Martín Capello
fc79146c56 Fix crash when pressing ESC while moving a selection (fix #2829) 2021-07-16 11:24:49 -03:00
Martín Capello
0145458686 Git-ignore .vs directory 2021-07-16 11:24:37 -03:00
David Capello
5a6bd465f5 Cache mouse cursors to avoid re-generating them on each setCursor()
This should improve the mouse movement, where a new mouse cursor was
created on each mouse movement with black & white pixels. It's a
regression introduced in ef4f691459
(which was originally introduced to improve the mouse movement
perception in a 100Hz monitor).

This might be a possible fix for:
https://github.com/aseprite/aseprite/issues/2713
2021-07-09 10:21:16 -03:00
David Capello
8f838ba36d Backport FullscreenMode command (#464)
Original from ae02600a63
2021-07-05 20:11:46 -03:00
David Capello
8c0215dd06 Fix UI tests 2021-07-05 19:42:32 -03:00
David Capello
95df0b23d3 Show main os::Window on the first flipDisplay() 2021-07-05 19:42:04 -03:00
David Capello
4a5a3a7bc4 Fix compilation when ENABLE_DEVMODE is defined 2021-07-05 19:41:51 -03:00
David Capello
c42c5e1453 Backport new laf API to main branch of aseprite
Some features from the beta branch of aseprite & laf were backported
to the main branch of aseprite.

Related commits:
- New memory handling (db4504e816)
- New get event with timeout (e6ec13cc31)
- Convert os::NativeCursor to an enum (06a5b4f3ae)
- Adapt code to the new os::Display -> os::Window refactor (5d31314cdb)
- Save/load main window layout correctly and limit to current workarea (d6acb9e20f)
- Redraw window immediately on "live resizing" (d0b39ebade)
2021-07-05 17:51:29 -03:00
David Capello
6b2c296ef0 Update giflib module to the latest version 2021-07-01 11:38:13 -03:00
David Capello
ffe65bface Detect webp files by file content (fix #2807) 2021-07-01 11:37:11 -03:00
David Capello
f99b5218b9 Remove unused code from ReplaceColor command
The original intention was to save selected colors in the Replace
Color dialog so then showing up it again would restore those saved
color. But it never worked in that way and just by mistake it was
using the Foreground/Background pair of colors by default (which is
the desidered behavior now). So we are just removing the buggy code
that never worked. (Related to #2028 in some way.)
2021-06-29 16:31:51 -03:00
David Capello
e73d96262d Always use Foreground color in Select > Color Range (fix #2028) 2021-06-29 16:26:48 -03:00
David Capello
78abaf0292 Minor change in MaskColor add ConfigSection constant 2021-06-29 16:23:56 -03:00
David Capello
9609d2c827 Fix crash if we press F5/reload menus when we have a menu open (fix #2496) 2021-06-28 21:13:56 -03:00
David Capello
6ad0f59e7f Update laf module 2021-06-28 19:56:25 -03:00