9832 Commits

Author SHA1 Message Date
Christian Kaiser
a43841f8b7 Add 'beforesitechange' event (fix #4569) 2024-11-13 15:17:02 -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
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
Christian Kaiser
9b90159d1b Handle toolbar in small sizes with overflow button 2024-11-10 13:01:29 -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
David Capello
77dd92c679 Don't overlap search icon with text in SearchEntry 2024-10-28 15:32:41 -03:00
David Capello
b547b96835 Paint caret in ui::Entry even when there is no text 2024-10-28 15:28:01 -03:00
David Capello
35fcd94f04 Update laf (fix #4740) 2024-10-28 12:11:54 -03:00
David Capello
aed7c6a3b1 Merge branch 'main' into beta 2024-10-23 23:10:45 -03:00
Martín Capello
9667def753 Move kCallbackMessage logic to Widget 2024-10-23 23:09:28 -03:00
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