9874 Commits

Author SHA1 Message Date
David Capello
ab599c5863 Simplify Font ptrs management in ui-lib returning FontRefs
We can return "const text::FontRef&" to avoid adding a new reference
to an existing FontRef just to access a Style/Widget font.
2024-11-30 09:38:04 -03:00
David Capello
7e780bf3bf Move Theme::fontMgr() impl from app-lib to ui-lib 2024-11-30 09:38:04 -03:00
David Capello
3f591aa5df Try to use TextBlobs to paint ui::Style's text layers 2024-11-30 09:34:51 -03:00
David Capello
9e51e04606 [clang-tidy] Disable misc-include-cleaner 2024-11-30 09:34:26 -03:00
David Capello
c586ac5b14 Add ui::Graphics::drawTextBlob() function 2024-11-30 09:11:57 -03:00
David Capello
1e56e7da5a Merge branch 'main' into beta 2024-11-27 15:35:51 -03:00
David Capello
8241e03612 Fix clang-tidy-review action 2024-11-27 15:20:15 -03:00
Martín Capello
58326b1508 Handle null target in DragEvent (fix #4824) 2024-11-26 09:46:47 -03:00
David Capello
bf430fc3b9 Add missing #include to use LOG() when HAVE_CONFIG_H isn't defined 2024-11-25 15:40:47 -03:00
David Capello
ae9e3583a4 Merge branch 'main' into beta v1.3.11-beta2 2024-11-21 19:09:50 -03:00
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
Martín Capello
45c2a59504 Change window visibility only when owns display
Before this the visibility was changed if the window pointed to a
display without taking into account that it might not own it. Fix #4805
v1.3.10.1
2024-11-21 17:32:37 -03:00
Martín Capello
7038ab501e Call onOpen on parent class to fire Open signal
Fixes this issue:
https://community.aseprite.org/t/dialog-show-bounds-rectangle-is-broken-in-1-3-10/23917/1
2024-11-21 17:32:13 -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