9862 Commits

Author SHA1 Message Date
David Capello
9bc16e9bec Fix FontPopup style after changing theme 2024-11-21 19:02:39 -03:00
David Capello
ad57997482 Fix font preview/thumbnail in dark mode/any theme (fix #3851) 2024-11-21 19:00:57 -03:00
David Capello
ff993f1687 Paint pinned fonts correctly when multiple windows option is off (fix #4815) 2024-11-21 18:11:01 -03:00
David Capello
3b7f78f41c [win] Move CoInit class to laf-base 2024-11-21 17:49:31 -03:00
David Capello
84f3101681 [win] Use WinTab/tablet pressure only for certain windows (#3358)
Windows that need tablet information are the MainWindow, DynamicsPopup,
and scripts Dialog.
2024-11-21 17:23:50 -03:00
David Capello
dbccf71622 Fix crash clicking canvas w/enabled timeline range + keep selection (fix #4809)
There is a moment inside Timeline::updateUsingEditor() where the
TimelineAdapter is nullptr between detachDocument() and the
updateTimelineAdapter() call, so just using a m_editor->getSite() was
going to ask for the timeline adapter if the selection was kept intact
("Keep selection" option enabled).

With this patch we simplify updateUsingEditor() just avoiding the
getSite() call at all (using the Editor fields directly) and handling
the special case where we already are in the same editor as a fast path.
2024-11-21 14:07:03 -03:00
David Capello
8c55c1db07 Fix crash dragging files on timeline in certain cases (fix #4801)
With the combination of 8b0b1d8d1e2624eaa8433df58b83845902cd7975
(allowing transactions in docs without context) and
be17c4832405be44193a4d24268c38da80369743 (getting the active DocRange
from Doc context), we were getting a crash accessing a nullptr context.
2024-11-21 10:24:39 -03:00
David Capello
b03dffb5cd [lua] Disable 'beforesitechange' event (#4569, #4780, #4785) v1.3.11-beta1 2024-11-19 21:18:21 -03:00
David Capello
41baef2627 Merge branch 'main' into beta 2024-11-19 16:00:11 -03:00
David Capello
a7c8d4cb06 Update laf module v1.3.10 2024-11-19 15:56:32 -03:00
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