Now we use the LAF_BACKEND=none/skia to detect if it's going to be the
CLI/GUI version of the program. The ENABLE_UI flag is still defined at
compile-time just to avoid removing all #ifdef/endif conditional
directives right now.
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.
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).
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.
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)
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
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.
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.
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.
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.
* 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)
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.
Before this fix, the "cannot modify sprite/cannot lock sprite" message
was displayed instead of just dropping pixels.
Co-authored-by: David Capello <david@igara.com>
This commit addresses the issue where the Shift+brush tool was not disabling the mouse stabilizer, leading to unintended behavior when previewing a line. This commit adds the necessary implementation to properly disable the stabilizer when Shift+brush tool is used. Additionally, the function DrawingState::disableMouseStabilizer() now calls ToolLoopManager::disableMouseStabilizer() to ensure the stabilizer is disabled correctly.
With https://community.aseprite.org/t/layers-become-empty-when-autosaving/22141
we found a couple of bugs where only 2 backed up versions of stored
objects were added in ObjVersions::add().
Also as ObjVersions has a limited space for 3 versions, it's a good
idea to ignore invalid binary files (files without the magic number
"FINE" as header). So now we only add valid versions to ObjVersions,
previously we could lead to a situation where 3 invalid binary
versions of the same object were added to the ObjVersions and a 4th
valid version were ignored.
Related to: https://github.com/aseprite/aseprite/issues/4481
ENABLE_UPDATER flag now only controls the "check update" portion of
the updater-lib. Probably the user agent string could be moved to the
ver-lib in the future.
Only in debug mode with TEST_BACKUP_INTEGRITY flag, we now don't
detect as a layer diff between the doc in memory and the restore doc
from backup if only some layer flags like visibility/collapse changed.