Commit Graph

9618 Commits

Author SHA1 Message Date
Gaspar Capello
8323a55500 Fix Cancel command do not work on scripting
Before this fix, the 'Cancel' command did not work in the following
specific situation:
As soon as Aseprite was started and without hitting the 'Esc' key,
the 'app.command.Cancel()' command did not perform any operation.

It was discovered that the Cancel command is started only once per
session and retains the 'm_type' throughout the session. Only
a specific:
app.command.Cancel {type = "all"} or
app.command.Cancel {type = "noop"}
could change the command type.
2024-08-29 10:50:03 -03:00
دانتي باولا
dd208ebe5d
Use right click action with shading ink (fix #4520) (#4615) 2024-08-29 10:45:52 -03:00
David Capello
e87f6df72b Avoid loading current dithering matrix on each mouse move (related to #4174)
With this change we are reusing the cached/loaded matrix on each
DitheringMatrixInfo struct, calling the
load_dithering_matrix_from_sprite() function just one time (not on
each brush preview/mouse movement).
2024-08-21 19:49:55 -03:00
David Capello
29479cb231 [win] Fix saving files to network paths (fix #4608) 2024-08-21 18:38:17 -03:00
David Capello
7b24cf2594 Fix "New Frame" button for existing third-party themes (fix #4609)
We made an attempt to change the "+" character with an icon, but we
cannot use an existing style to do this kind of change in themes (as
third-party themes will be using the old version of the style, not the
updated one).

We're reverting part of the change introduced in
e0ff51947a to use the "+" character for
this "New Frame" button in the status bar.
2024-08-21 16:55:11 -03:00
David Capello
1ca4306f9d [win] Fix File > Export > Export As to other drive (fix #4607)
This only affects the Windows platform.
Regression introduced in db639072f7
2024-08-21 13:50:29 -03:00
David Capello
8817724e44 Fix typo using ENABLE_I18N_STRINGS var 2024-08-19 20:08:56 -03:00
Martín Capello
712d84e44e
Avoid div by zero by preventing entering/returning a grid bounds w/zero width/height (fix #4146, #4597) 2024-08-19 18:07:40 -03:00
Christian Kaiser
4df11ac1e3
Reset mask when clicking outside of bounds with the magic wand tool (fix #4490, #4595) 2024-08-15 09:13:18 -03:00
Panagiotis Georgiadis
0bdcdbfc49 [docs] Improve phrasing for Tileset image data length
Clarified the description for the data length field of the
compressed Tileset image when flag 2 is set.
2024-08-12 17:22:05 -03:00
David Capello
d6436647ab Update laf module 2024-08-09 20:51:28 -03:00
Siddhant Madhur
3c876066aa Fix indentation in INSTALL.md
In the MacOS (Apple Silicon) install commands,
"ninja aseprite" was incorrectly indented.
2024-08-09 11:05:17 -03:00
David Capello
4e5dfa9d2c Don't export cel opacity when it's 255 (#4511 / #4552)
In this way we don't modify the current exported JSONs by users that
are not using cel opacity (which might be the most common case).
2024-08-08 19:02:51 -03:00
requizm
a11946ab0e Added opacity field when exporting a cell 2024-08-08 18:57:30 -03:00
Christian Kaiser
e0ff51947a
Add new frame menu to status bar button (#4582) 2024-08-08 17:23:41 -03:00
Gabe Spound
99f1a1ea06 Needed libwebP as a dependency on Arch Linux 2024-08-08 16:51:29 -03:00
David Capello
657e679461 Some extra comments to the coding style guide 2024-08-08 16:17:56 -03:00
David Capello
fcbd50e46f Remove emoji from contributing guide (but don't forget to smile) 2024-08-08 16:13:35 -03:00
David Capello
6f65acb54f Add VS 2022 command prompt from Start menu in INSTALL guide 2024-07-29 17:31:03 -03:00
Gaspar Capello
8f3af748b9
Don't allow to install third-party themes that override the default one (fix #4226) (#4335)
This 1) hides user themes whose name is the same as the default,
and are present in the user folders (i.e.  'extensions' and
'data/themes' folders), and 2) doesn't allow to install themes with
the same content/ID of the default aseprite-theme (fix #4226)
2024-07-29 16:02:05 -03:00
requizm
b65fb3a14e Fixed size calculation on resize_image 2024-07-25 17:59:31 -03:00
David Capello
26279597b6 Add help button "?" in some windows (fix #1980)
We hope to enhance the discoverability of Aseprite features in this
way.
2024-07-25 16:02:21 -03:00
David Capello
3c44831831 We can use = {} for default arg values in function declarations 2024-07-19 17:10:39 -03:00
David Capello
9da10605d3 Remove duplicate code with new sort_slices_by_name() function 2024-07-19 16:47:13 -03:00
requizm
6047ab69de [ui] Fixed slice order in File > Export > Export As > Area 2024-07-04 14:22:51 -03:00
David Capello
79efbd76a1 Update laf module 2024-07-04 11:10:15 -03:00
David Capello
064ddef190 Don't clone strings repository by default (fix #4489)
New ENABLE_I18N_STRINGS option (off by default) to avoid compilation
errors cloning the strings repo (no connection, no git, etc.).
2024-06-27 08:35:55 -03:00
David Capello
abe872aeb2 Convert the tileset serialization format in its own type
To match the new SerialFormat enum (uint16_t), we now have
TilesetSerialFormat enum (uint8_t).
2024-06-26 11:24:09 -03:00
David Capello
cdea6004bd Refactor app::DocFormat to doc::SerialFormat
This fixes a violation of module layers (circular dependency)
introduced in e6cd13d7e1 where doc-lib
started to depend on app-lib (which cannot happen, as app-lib depends
on doc-lib).

This DocFormat/SerialFormat was used only from app-lib previously, but
when properties were introduced in user data, the serialization format
version was needed to read user properties too. So now it makes sense
to move this type/its values to the doc-lib.

A couple of extra issues were found in this refactor:
1) The recursive call inside read_layer() didn't receive this "serial"
   argument
2) read_grid() doesn't need the setId parameter
2024-06-26 10:42:30 -03:00
David Capello
32a099dcb6 Fix crashes with ill-formed fmt format strings (fix #2274)
There is a third-party translation (and can happen with our own
translations) that a fmt format string is ill-formed in the .ini file
of the translation (this could happen even if the en.ini file was
manually modified/broken by hand).

This patch includes a refactor of the Strings class so we can:

1) Static check at compile-time about the number of required arguments
   to format a string (no need to call fmt::format() directly with
   arbitrary number of args)
2) If a string is not valid for the fmt library, the runtime exception
   is caught and the default (English) string is returned.
2024-06-20 20:49:10 -03:00
David Capello
3d50a85d14 Fix mipmaps options when downsampling (fix #4317) 2024-06-19 20:51:02 -03:00
David Capello
649f444f05 Disable bugprone-narrowing-conversions clang-tidy check 2024-06-19 17:31:36 -03:00
Guilherme Marcondes
db639072f7 Show relative path when exporting sprite (fix #4059)
When exporting a file that was already saved, shows the relative path
to the original path instead of only the filename.
2024-06-19 12:57:51 +01:00
David Capello
9fb0ee620c [x11] Don't use ui::move_region() to move windows on X11
It's quite slow, it's faster just to repaint the background.
2024-06-18 15:24:22 -03:00
David Capello
2e58e70f1c Remove unused header file from ui/widget.cpp 2024-06-18 15:18:23 -03:00
David Capello
f21c9f2dce [x11] Move the user-defined pattern to detect pens to TabletOptions 2024-06-18 15:18:08 -03:00
David Capello
7d63ceb199 Remove System::tabletAPI() function 2024-06-18 14:02:37 -03:00
David Capello
f29ec83c6c [win] Fix sync between mouse cursor <-> stylus cursor (fix #4539)
Added a new option (enabled by default) to set the mouse cursor when a
pen/pointer message is received. This fixes a couple of issues:

1) When we zoom in/out with keys or scrolling the trackpad, the last
   known position will be used (the pen position if we are using the
   pen).

2) If we are recording the stream/live streaming with a software like
   OBS Studio, the cursor position will correctly be in the pen
   position if we're painting with the pen.
2024-06-18 13:44:19 -03:00
David Capello
2827618786 [gpu] Fix outdated os::Surface to show latest changes on the canvas
We have to mark the SkBitmap as modified (new generation ID) in
convert_image_to_surface() so we upload the bitmap changes as a new
texture in the GPU.
2024-06-17 14:11:14 -03:00
David Capello
84942175ca [gpu] Avoid reading pixels from a GPU surface to move a window
On CPU we might try to blit the old content of the window in a new
location, but with a GPU this operation is super slow, it's fast just
to draw everything again.
2024-06-14 21:01:25 -03:00
David Capello
2c7fc767bf Update GPU flag correctly on all display when it's changed 2024-06-14 20:07:05 -03:00
David Capello
533fb778f3 Reorganize compilation flags in CMakeLists.txt files
* Moved flags that only app-lib uses from add_definitions() to
  target_compile_definitions()
* Curl flags for TLS moved from third_party to root CMakeLists.txt (as
  they were defined in both places)
2024-06-12 17:43:43 -03:00
David Capello
8f7bf09263 Fix doc::blend_image() to support different color modes (fix #4530, fix #4531)
The code was refactored moving the BlenderHelper class from "render"
to "doc", and now doc::blend_image() supports blending different color
modes.

Some work is still needed to work with grayscale images correctly.
2024-06-11 21:48:57 -03:00
David Capello
31f3c79566 Update submodules 2024-06-10 19:27:36 -03:00
David Capello
927a24bb18 [ci] Remove workaround for windows-2022 runner and cmake 3.25.0
Reverts 63a9aa67c9
2024-06-10 17:33:59 -03:00
David Capello
6cdf2ae2df [ci] Change jobs matrix
Compile with ENABLE_UI=ON/OFF (gui/cli) and
ENABLE_SCRIPTING=ON/OFF (lua/noscripts) variants on all platforms.
2024-06-10 17:21:17 -03:00
David Capello
2ed584541b [msvc] Use a workaround to fix compiler bug (fix #4526)
Reported in https://developercommunity.visualstudio.com/t/Invalid-optimized-x64-codegen-with-inlin/10678815
possible duplicated of https://developercommunity.visualstudio.com/t/Optimisation-of-right-bit-shift-switches/10453852
not yet available in official VS release.

Here we changed signed ints to unsigned ints to avoid this bug.
2024-06-10 08:59:10 -03:00
David Capello
a41644f6b5 Reword and add more information to the contributing guide 2024-06-07 14:29:38 -03:00
David Capello
9b50f0bbd5 [ci] Change comment-on-pr action to IdanHo/comment-on-pr
This is the exact version that SerenityOS uses, it looks like it can
comment on Aseprite issues, while the original
one (unsplash/comment-on-pr) cannot, giving us the following error:

  Couldn't find an open pull request for branch with head at .
2024-06-07 13:50:14 -03:00
David Capello
ae63c633b4 [ci] Add commit linter action 2024-06-06 16:25:03 -03:00