7690 Commits

Author SHA1 Message Date
David Capello
4f4f5fee7f Fix tooltips in multi-displays mode when the Preview window is open 2021-03-31 17:10:31 -03:00
David Capello
ff3b14978a Comment ASSERT() that can happen in ButtonSet 2021-03-31 15:34:11 -03:00
Martín Capello
b35cf6c66d Add .vs directory to .gitignore 2021-03-29 16:34:53 -03:00
Martín Capello
734d3bace6 Fix regression: problems in the preferences and theme selection
The mouse cursor dissapears when "Apply" button is pressed or when a
new window appers.
2021-03-29 16:33:47 -03:00
David Capello
0396e80fce Fix popup menu positions when we are not in the main screen 2021-03-29 15:55:56 -03:00
David Capello
dead710213 Fix regression showing the selection feedback above all layers
Without this fix we'll see the selection stroke feedback in the same
level as the active layer. With this patch the preview is displayed at
the top just as in the main branch.
2021-03-29 12:34:19 -03:00
David Capello
9be9b4d5e5 Merge branch 'main' into beta 2021-03-26 12:19:45 -03:00
David Capello
a5c36d0b0f Add possibility to cancel the DrawingState with Undo/Redo/Cancel commands
To match the new MovingCelState behavior.
2021-03-26 12:05:28 -03:00
David Capello
768b69113a Disconnect from BeforeCommandExecution signal onBeforePopState to avoid double backToPreviousState() calls
In some special cases (several key press enqueued?) we can receive a
BeforeCommandExecution signal when we are not part of the Editor state
stack anymore.

Related to 5ba8cecddebb789bf2266a1600ea4c7f56fc34b7
2021-03-26 11:40:10 -03:00
David Capello
5ba8cecdde Fix a crash pressing (and keeping pressed) Ctrl+Z (Command+Z)
This tries to avoid calling onBeforeCommandExecution() after we are
going to the previous state. This might be a problem on all states
that are using a scoped_connection to disconnect from the app::Context
signal in the destructor (instead of in the
onBeforePopState). Something to fix next for all other states.
2021-03-26 10:45:46 -03:00
Gaspar Capello
42201a4783 Fix bug while moving an image in MovingCelState
Original post: https://community.aseprite.org/t/pretty-nasty-bug-specific/8290

Before this fix, if you pressed Cmd Z / Ctrl Z (undo) while moving an image holding Cmd/Ctrl key,
the moved image were gettting stuck on cursor, and console errors were shown on every click.
2021-03-26 10:01:11 -03:00
David Capello
726065164f Fix copying irregular areas of tiles in "tiles mode"
Now we can use the lasso tool in tiles mode, select an
irregular (non-rectangular) area and move that area of tiles
correctly.
2021-03-22 20:20:20 -03:00
David Capello
5cd66b58f1 Fix correct hot region for dynamics dialog 2021-03-22 11:56:02 -03:00
David Capello
103a8087cc Fix bug selecting brush types and dynamics with one click + dragging mouse
Fixed bug offering mouse capture to widgets in other displays when
get_multiple_displays() is on.
2021-03-22 11:54:57 -03:00
David Capello
a9640a28dc Fix several bugs handling the clipboard on X11 2021-03-22 11:27:59 -03:00
David Capello
cf21f78d8d Limit loaded windows frame position with active workarea 2021-03-19 20:20:24 -03:00
David Capello
d93fdfd49e Fix indentation of if statement 2021-03-19 19:32:28 -03:00
David Capello
b015b16da5 Merge branch 'main' into beta 2021-03-19 19:27:29 -03:00
David Capello
bcd69495ce Fix several issues locating windows with multiple UI windows
We've refactored the code to support locating windows (and popups
windows + hot regions) correctly in both modes: with one ui::Display
and with multiple ui::Displays.

For this we've added a new ui::fit_bounds() function that works in
both modes.
2021-03-19 18:57:56 -03:00
David Capello
ed8446ca0b Run CI on PRs 2021-03-18 10:02:09 -03:00
David Capello
7079801697 Avoid leaks running "gen" when memory sanitizer is enabled 2021-03-15 21:05:33 -03:00
David Capello
6b89075b26 Don't send paint messages when we are closing the app 2021-03-09 16:43:22 -03:00
Gaspar Capello
1193bf18fc Fix lua error crash (fix #2635)
Prevents crashes from uncaught exceptions generated from Lua errors
when running aseprite from the console with -script param.
2021-03-09 16:40:24 -03:00
David Capello
2dccb6d646 Add GitHub actions 2021-03-08 11:38:04 -03:00
David Capello
246b52b086 Update laf module 2021-03-08 11:16:57 -03:00
David Capello
35bb3af6e2 Replace all base::Bind() with lambda functions 2021-03-05 20:09:42 -03:00
David Capello
ddbbf12bfc Update main branch 2021-03-05 18:39:36 -03:00
David Capello
e50ea46c91 Minor change in CMakeLists.txt 2021-03-05 18:27:31 -03:00
David Capello
9189b8b9dc Fix indentation 2021-03-03 10:49:04 -03:00
David Capello
777a0f132a Don't send paint messages when we are closing the app 2021-03-03 09:54:20 -03:00
David Capello
d7e154b726 Update laf module 2021-03-02 14:29:30 -03:00
David Capello
8034b0cbcc Add support for multiple native windows (#139, #250, #962, etc.)
Each ui::Window now can have a related native os::Window. This
connection is done through the ui::Display class added recently in
c3d52f0bbe5242923c9e38495e1be1135ca0934f.
2021-03-02 13:50:49 -03:00
David Capello
74961f58c0 Missing std::cout -> TRACEARGS from b163b7be485aefb6ebd40c4ec6cbc76c671514f7 2021-03-02 12:26:42 -03:00
David Capello
f70e8d3ae7 Add ui::expandWindow() to change the size of a window dynamically 2021-03-02 08:44:35 -03:00
David Capello
b163b7be48 Simplify REPORT_EVENTS code in ui::Manager 2021-02-26 14:08:40 -03:00
David Capello
4a17ab7ef4 Merge branch 'master' into beta 2021-02-26 09:29:50 -03:00
David Capello
5d6aa3ff11 [win] Fix leak of GDI objects (HRGNs) 2021-02-26 09:26:38 -03:00
David Capello
4c9c35bdfd Update laf module 2021-02-25 17:17:29 -03:00
David Capello
49d5787737 Merge branch 'master' into beta 2021-02-25 17:12:53 -03:00
David Capello
ef4f691459 Generate a native cursor for the crosshair on the sprite
In this way we can get pixel from the window surface and put pixels in
the new cursor surface which will represent the crosshair on the
mouse/screen position. In this way we avoid an effect of a slow mouse
response on high refresh rates.

Maybe related to: https://community.aseprite.org/t/3354
2021-02-25 16:56:33 -03:00
David Capello
a24f271e3a Remove unused vars from BrushPreview 2021-02-25 14:44:07 -03:00
David Capello
74ee4dced4 Fix DEBUG_PAINT_EVENTS on Windows 2021-02-25 13:14:39 -03:00
David Capello
a28b8ad5f8 Update laf module to improve Windows performance 2021-02-25 12:51:27 -03:00
David Capello
9dedb41e0f Fix compilation when ENABLE_DEVMODE is defined 2021-02-24 09:26:24 -03:00
David Capello
ddcc53469d Add possibility to pick colors from the desktop (fix #594)
Requested several times (e.g. https://community.aseprite.org/t/2431)

Added support only for Windows and macOS at the moment.
2021-02-23 18:25:28 -03:00
David Capello
44437e0d1f Add new ConvertLayer command ("Layer > Convert To" menu item)
Now we have an easy way to convert between:
  Background <-> Layers <-> Tilemaps

Deprecated (they are kept only for backward compatibility):
  BackgroundFromLayer
  LayerFromBackground
2021-02-23 11:32:08 -03:00
David Capello
b6987a0262 New "Layer > Convert" submenu
This will be a place to put new options to convert images to tilemaps
and viceversa.
2021-02-22 16:50:31 -03:00
David Capello
7e732b3223 Don't use cmd::TrimCel() on tiles when manual mode is enabled
Applied the fix from e1402381a8f89f390e75a1e2720a2dccac467c9a to all
places where cmd::TrimCel() is used.
2021-02-22 16:39:40 -03:00
David Capello
e83ed244b8 Fix bug loading the correct mask color for tilesets 2021-02-22 16:21:18 -03:00
Gaspar Capello
e1402381a8 Fix undo when working on tilemap layer in tilemap mode Pixels and tileset mode Manual.
Before this fix working the next context:
- Active layer is a tilemap layer.
- TilemapMode == Pixels.
- TilesetMode == Manual.
- At least a border of the tilemap cel bounds is made of noTiles and tiles with index ’X’ (or a border is made all of tile ‘X’).
- With the marquee tool select a rectangle which matchs or exceeds the bounds of tile ‘X’.
Then when you delete the selected pixels (with the ‘delete’ key), automatically Trim command was executed, and the trimmed border is lost in the undo information.

Now, we skip the trim command in the context:
- Active layer is a tilemap layer.
- TilemapMode == Pixels.
- TilesetMode == Manual.
2021-02-18 12:52:49 -03:00