9897 Commits

Author SHA1 Message Date
Martín Capello
cbac6f98a7 Fix MouseEnter and MouseLeave (fix #4240)
Callback messages were not being handled and since MouseEnter and
MouseLeave events were wrapped into CallbackMessages they were lost
and so never got called
2024-10-23 23:09:28 -03:00
David Capello
ed39f40efc Fix crash/assert fail rendering UTF-8 file names w/CHARWRAP (fix #4624)
This could happen when painting text with CHARWRAP, where we removed
byte by byte from the end of the string, instead of removing (or
adding) well-formed UTF-8 string spans.
2024-10-22 16:05:03 -03:00
David Capello
4c06fbdaf3 Improve font search/selection from the context bar (#4692)
Improves the way we can write text to search a font, use up/down keys
to navigate through the font list, and use Enter/Esc keys to select
the font and go back to the text box.
2024-10-22 14:51:23 -03:00
دانتي باولا
85eb64ca35
Fix slice tool for tiles mode (fix #4306, #4705) 2024-10-21 14:58:54 -03:00
David Capello
b90807f3e3 Merge branch 'main' into beta 2024-10-21 11:09:01 -03:00
David Capello
a7799b76fc Add more tracing options to debug UI messages
Added REPORT_MOUSE/PAINT/TIMER_MESSAGES macros, and change _EVENTS to
_MESSAGES to avoid confusion with the current terminology.

The output string for each message was also simplified.
2024-10-17 19:23:52 -03:00
David Capello
71f6dbad28 Assert that we're in the UI thread in some ui::Manager functions
Simplify code removing DEBUG_UI_THREADS.
2024-10-17 15:30:18 -03:00
Martín Capello
dee6cd7d0d Refactored to simplify code and avoid duplication 2024-10-16 17:10:26 -03:00
Martín Capello
6f9b10f9fb Fix LayerImage::getMemSize
Now it doesn't count more than once the memory used by the layer's cels
2024-10-16 15:35:19 -03:00
Martín Capello
9560650867 Add support to dropping images into the timeline 2024-10-16 10:43:25 -03:00
Martín Capello
114a18bc4f Move static funcs from Layer class to layer_utils
Also refactor the code to make these functions use the current
copyLayerContent function in app::Doc and make an actual copy of the
specified layer
2024-10-16 10:42:56 -03:00
Martín Capello
da60d14b11 Fix function to use surface format data
In Windows and macOs the underlying surfaces have different color
components order without this fix images are displayed with incorrect
colors
2024-10-15 16:24:41 -03:00
Martín Capello
0bf62c4545 Fix use of WebPGetFeatures's returned status 2024-10-15 16:24:41 -03:00
Martín Capello
ac1024f5d3 Relocate global webp decoder initilization 2024-10-15 16:24:41 -03:00
Martín Capello
765cf43f69 Update laf sumodule 2024-10-15 16:24:41 -03:00
Martín Capello
94202a51c8 Avoid trying to convert a null surface 2024-10-15 16:24:41 -03:00
Martín Capello
b1d1265450 Add support to webp encoded dragged images 2024-10-15 16:24:41 -03:00
Martín Capello
16f3e53ce9 Add flag to avoid creating backround layers
Now callers can force loading a file without creating any background
layer in the doc. This is because for drag and drop operations we don't
want to generate background layers
2024-10-15 16:24:41 -03:00
Martín Capello
abbbe11fe7 Fix drop of image files on Windows 2024-10-15 16:24:41 -03:00
Martín Capello
96ed89db8a Propagate drop events to ancestors
When a drop event is not handled by a drag & drop enabled widget then
look for the next drag & drop enabled ancestor to propagate the drop
2024-10-15 16:24:41 -03:00
Martín Capello
365bad61d5 Support drag and drop images as new documents 2024-10-15 16:24:41 -03:00
Martín Capello
573822d9f1 Propagate drag & drop events to ancestors 2024-10-15 16:24:41 -03:00
Martín Capello
9ae0416627 Add support to drop a file into a timeline's cel 2024-10-15 16:24:41 -03:00
Martín Capello
84b56f4b2d Add support to drop file sequences 2024-10-15 16:24:41 -03:00
Martín Capello
5523d3f366 Handle dropping on cels 2024-10-15 16:24:41 -03:00
Martín Capello
368d4cc143 Determine insertion point at layer 2024-10-15 16:24:41 -03:00
Martín Capello
718d15ad01 Add check to avoid undefined behavior 2024-10-15 16:24:41 -03:00
Martín Capello
8b0b1d8d1e Allow executing transactions on contextless docs 2024-10-15 16:24:41 -03:00
Martín Capello
e5bf9cb253 Add LayerGroup::insertLayerBefore 2024-10-15 16:24:41 -03:00
Martín Capello
722c74189c Allow dropping files into the timeline 2024-10-15 16:24:41 -03:00
Martín Capello
f7eed69d7c Move OpenFileJob to its own header 2024-10-15 16:24:41 -03:00
Martín Capello
b110078a8b Add static methods to copy a layer 2024-10-15 16:24:41 -03:00
Martín Capello
220254158f Add UI feedback when dragging over the timeline 2024-10-15 16:24:41 -03:00
Martín Capello
65ec2bd7b7 Introduce drag & drop events to widgets 2024-10-15 16:24:41 -03:00
Martín Capello
2cf880eaf9 Delete duplicated include 2024-10-15 16:24:41 -03:00
David Capello
8b7370a77a Improve click behavior to cancel Text box tool (#4692)
We've moved the logic to interpret "a single click" from DrawingState to
DelayedMouseMove.
2024-10-14 13:32:43 -03:00
David Capello
5b88ea8532 Merge branch 'main' into beta 2024-10-11 15:16:32 -03:00
David Capello
a49bfe7f0a Lua was still being compiled as C (instead of C++) when generating Visual Studio solutions
We're compiling Lua as C++, but it seems that target_compile_options()
doesn't work for Visual Studio solutions (only for Ninja/makefiles).
The proper cmake solution to this issue is using
set_source_files_properties() to specify C++ as the language to use to
compile all Lua C files. This generates a valid Visual Studio solution.
2024-10-11 15:05:18 -03:00
David Capello
11883a51ff Disable Curl tests in compilation
This avoid creating a lot of testNNN projects inside the Visual Studio
solution generated by cmake.
2024-10-11 14:59:37 -03:00
David Capello
e900f2dfd9 Fix blending of rendered text into semi-transparent pixels (#4692) 2024-10-10 16:48:51 -03:00
Liebranca
0a45319e06 Fix cursor alignment and implement pivot point 2024-10-09 21:49:35 -03:00
Liebranca
dca06a53c0 Cap scaling to grid size 2024-10-09 21:49:35 -03:00
Liebranca
d6ddaa7a27 Snap cels to grid on moving cel action (fix #4027) 2024-10-09 21:49:35 -03:00
David Capello
8fd882d90b Merge branch 'main' into beta 2024-10-08 15:06:57 -03:00
David Capello
384813421c [lua] Update scripting API version to 29
This should have been changed for v1.3.9.
2024-10-06 20:41:08 -03:00
Gaspar Capello
ff520c14d2 Fix transparency issue with new color criterias (fix #4686)
Prior to this fix, the following particular conditions caused
an incorrect conversion of an opaque color to a transparent color
during RGBA->Indexed conversion:
- RGBA image with black color (#000000 a=255) painted on the canvas
- The black color is absent from the palette.
- The mask color is present in the palette
- Converts the sprite to indexed color mode using
  Sprite > Color Mode > More Options
- Select Advanced Options, select a Color Best Fit Criteria other than
  Default (for example CIELAB) and press OK
- The original black color becomes the mask color.
v1.3.9.1
2024-10-04 10:37:28 -03:00
David Capello
e5faac07b5 Fix regression breaking linked cels on "Merge Down" (fix #4685) 2024-10-03 12:43:26 -03:00
David Capello
08d9101b62 Fix mouse capture being lost when scrolling list of fonts
As font thumbnails are generated on-demand, each time a new thumbnail
is generated, the viewport will be updated (updateView() called). This
viewport update will remove the scroll bars temporarily which will
remove the mouse capture from them, but we'd like to preserve that
capture so the mouse can continue dragging the mouse/scrolling.
2024-09-27 19:01:51 -03:00
David Capello
ec3f8617f0 Update laf module 2024-09-27 18:10:06 -03:00
David Capello
5c7a3a41f6 Add ligatures button to Text tool (#4679)
Doesn't fully fix the issue as we cannot move the cursor between the
ligature clusters, but at least we can disable the ligatures now.
2024-09-25 16:37:41 -03:00