9902 Commits

Author SHA1 Message Date
David Capello
59ff0d801a Add missing call to Widget::onVisible()
This is not necessary at the moment but just in case if in the future
we add a signal or Widget::onVisible() starts doing something.
2024-11-19 14:16:07 -03:00
Martín Capello
2e17f27237 Fix windows visibility when using multi-displays
Fix #4789
2024-11-19 14:14:53 -03:00
Martín Capello
f76bbcff67 Avoid clipping hidden windows (fix #4546) 2024-11-19 14:14:53 -03:00
David Capello
9eadd740b8 Disable tool changes when we're previewing a filter
In this way the user cannot use Ctrl key to try to move a cel and get
an error that the sprite is locked so we cannot move the cel. Actually
we shouldn't be able to move the cel when we're using the Editor for
preview purposes (FilterWindow / WindowWithHand).

This issue was reported in #4465, and created for the new
Dialog:show{hand=true} API mainly.
2024-11-19 14:05:13 -03:00
David Capello
21565a9349 [lua] Update scripting API version to 30 2024-11-19 13:15:27 -03:00
David Capello
4d7b28bfb6 Refactor removing duplicated code with new WindowWithHand
FilterWindow and DialogWindow (for scripts) share this code to enable
the Hand tool in the active Editor.
2024-11-19 13:04:57 -03:00
David Capello
699342fe9d Add function to copy non-shared properties between cels
At the moment it's the z-index, but if in the future we add new
non-shared properties, we can move those here.
2024-11-19 13:04:47 -03:00
David Capello
03361fdd07 [lua] Add app.editor.zoom / scroll properties (fix #4722) 2024-11-19 12:47:48 -03:00
Gaspar Capello
e269cffc63 Fix regression crash using Dynamics (fix #4788)
Prior to this fix, Aseprite would crash when using
Dynamics + Dithering by simply clicking on the canvas.
The regression has been introduced in b7aa5d5 'Add Diagonal Symmetry'.
2024-11-19 11:36:20 -03:00
David Capello
7ff124d108 Add HD icons 2024-11-15 19:02:57 -03:00
Christian Kaiser
a43841f8b7 Add 'beforesitechange' event (fix #4569) 2024-11-13 15:17:02 -03:00
David Capello
6b85919534 [lua] Fix syntax/formatting and rename Dialog{move} param to "hand" (#4465) 2024-11-13 13:23:06 -03:00
lampysprites
d32fc4c704 [lua] add option to move canvas to foreground dialog 2024-11-13 13:10:07 -03:00
David Capello
a19a844498 Update comment about DocApi class 2024-11-13 10:07:33 -03:00
David Capello
1ec76afeaf Fix bug copying/moving cels with z-index (fix #4779) 2024-11-12 22:05:06 -03:00
Gaspar Capello
21e8e01951 Fix duplicate Sprite or Layer don't duplicate z-indexes (fix #4665)
Prior this fix, duplicating linked cels with different z-order
created linked cels with the same z-order in all linked set.
2024-11-12 12:08:16 -03:00
Christian Kaiser
5df4fb966c Add parameters to the DuplicateSpriteCommand (fix #4755) 2024-11-12 10:08:15 -03:00
David Capello
be17c48324 Fix Timeline operations with ranges using virtual vs real ranges (#3904)
- Now we have a view::RealRange (with real frames, fr_t) and a
  view::VirtualRange (with virtual frames, columns, col_t). The timeline
  uses a virtual range internally and makes the conversion to a real
  range when it's appropiated (e.g. to execute an old DocRange operation
  using ranges with real frames).

- Added Context::range() to access to the real selected range
  instead of accessing directly to the timeline. In this way commands
  that were using the DocRange can access to the real range using the
  context, instead of the timeline's virtual range.

- Added a new ShowTagTimelineAdapter that can show just one tag in the
  timeline filtering out/hiding all other frames/tags.
2024-11-11 19:37:47 -03:00
David Capello
8a2df3b01d Add the TimelineAdapter concept to abstract frames access (#3904)
We need an extra code layer (view::TimelineAdapter) to convert between
old "real frames" (view::fr_t = doc::frame_t) and new "virtual
frames" (view::col_t). These new types are strongly-typed ints (enum
classes).
2024-11-11 19:27:46 -03:00
David Capello
b2c6240a7e Initial refactor to create the view module (#3904)
* Moved app::DocRange to view::Range
* Moved range_utils to view/cels.cpp
* Moved layer_utils to view/layers.cpp
* Created more functions in app::Site to access selected cels
  (they use the functions from view/cels.h)
2024-11-11 19:27:43 -03:00
David Capello
37f55fb635 Minor refactor to support future variable frame width in Timeline 2024-11-11 18:54:29 -03:00
David Capello
10eaec8a87 Merge branch 'import-image-as-new-layer' into beta (fix #131, #4636) 2024-11-11 17:26:39 -03:00
David Capello
b6f7cba09f Check submodules in build.sh 2024-11-11 13:06:42 -03:00
David Capello
a600c00127 Fix several issues with the "overflow" button (#4708, #4720)
* Re-use the ToolStrip widget/logic to show the list of hidden
  tools. This fixes some issues with the size/alignment of the group
  and keep consistent with the current look & feel.
* Simplify ToolStrip logic using a vector of tools inside instead of
  iterating the whole toolbox/filtering the group.
* Fixed the "overflow" button style to be highlighted when we hover
  the mouse on it.
* Don't create one "Show more..." tooltip window for each mouse move
  above the button.
* Show tooltips for tools inside the overflow popup window.
* Clicking the button again closes the group.
2024-11-11 12:57:13 -03:00
David Capello
051954c90e Remove third_party/gtest submodule as we use laf/third_party/googletest 2024-11-11 12:41:30 -03:00
Christian Kaiser
9b90159d1b Handle toolbar in small sizes with overflow button 2024-11-10 13:01:29 -03:00
David Capello
daf97d40a8 Add build scripts 2024-11-07 17:40:52 -03:00
David Capello
69dd28ca9c Replace std::snprintf() with fmt::format in ui::Alert 2024-11-07 17:16:24 -03:00
David Capello
1e5e06580d Update tinyexpr submodule 2024-11-07 17:16:03 -03:00
David Capello
e1652e0585 Fix compilation with new Purpose param in ExtraCel::create() 2024-11-06 18:28:32 -03:00
David Capello
b6fc4ff2d6 Merge branch 'main' into beta 2024-11-06 18:16:45 -03:00
Martín Capello
c1405e0d3a Revert wrapping MouseEnter/Leave messages
Changes reverted to fix #4754
2024-11-06 18:13:06 -03:00
David Capello
a9d795b6df Merge branch 'main' into beta 2024-11-06 18:01:44 -03:00
Martín Capello
cadd766671 Fix scaling of brush type icons (fix #4386) 2024-11-06 16:07:08 -03:00
Gaspar Capello
339221c288 Add support for jpeg image orientation adjustment (fix #2525) 2024-11-06 16:00:16 -03:00
David Capello
d073ecd9d1 Always show transformation preview on Preview window
Fix regression from cd5bf499eab932061b10a8f0a22d6781e099c909
2024-11-06 15:40:39 -03:00
sharkboi
cd5bf499ea Disable Brush Preview in Preview window by default (fix #4721, #4752) 2024-11-06 15:40:29 -03:00
David Capello
5c62fd68de Fix crash clicking "Hide Other Layers" when there is no preview window (fix #4768)
Clicking "View > Preview > Hide Other Layers" would try to access the
Preview editor when it's nullptr.
2024-11-06 09:00:29 -03:00
Christian Kaiser
6056107bd4 Fix tilemaps not getting duplicated with sprites (fix #4759) 2024-11-05 16:12:51 -03:00
David Capello
0ace79f979 Update .gitsubmodule style
GitHub doesn't require this .git at the end of the URL but it's the
URL they gave in the "Clone" button when the HTTPS protocol is
selected. Just to keep all URLs consistent.
2024-11-05 15:25:17 -03:00
David Capello
cd2bb45da3 Update json11 module 2024-11-05 15:17:33 -03:00
David Capello
5a713448da Noisy MSVC warnings are disabled with laf-base flags now 2024-11-05 11:59:18 -03:00
Martín Capello
61515eea1f Fix kMouse(Enter/Leave)Message handling(fix #4753) 2024-11-04 16:08:05 -03:00
Gaspar Capello
bb567444cc Add diagonal and 8-quadrant symmetry tests 2024-11-01 15:19:23 -03:00
Gaspar Capello
b7aa5d5ebe Add diagonal symmetry (fix #1171)
Added symmetry UI buttons, 45 and -45 degrees axis.
Now are possible activate all four symmetries, both
diagonal symmetries, individual diagonal symmetry, and
the old horizontal/vertical combinations.

Also added symmetry to image brushes (prior to this fix:
only the brush position was symmetrical, the image brush
was not flipped).
2024-11-01 15:17:01 -03:00
Gaspar Capello
053a538272 Add image buffers and mask to apply symmetry to image brushes 2024-11-01 11:11:38 -03:00
Martín Capello
9e396227c2 Refactor HAS_MOUSE flag handling
Now each widget is responsible to enable/disable its own HAS_MOUSE flag
in response to the kMouseEnter/Leave message received. Also there is no
need to iterate over the parents since these messages are propagated
to the parent
2024-10-30 10:10:31 -03:00
Martín Capello
f67643a24e Avoid using CallbackMessage for MouseEnter/Leave
Instead of wrapping the MouseEnter and MouseLeave OS events handling
inside a UI CallbackMessage, we now enqueue the corresponding
kMouseEnterMessage and kMouseLeaveMessage
2024-10-30 10:10:31 -03:00
David Capello
6093282ac3 Add pin/unpin icon to font search field (#4617, #4692)
With this we can finally easily save font presets, even references to
external .ttf files.
2024-10-29 09:48:23 -03:00
David Capello
c83dd16a43 Add TinyEXIF submodule 2024-10-28 18:40:23 -03:00