Commit Graph

7802 Commits

Author SHA1 Message Date
David Capello
504fb7b7f8 Fix crash showing user data dialog (revert regression from dd0c296209)
Restored the tooltip_face style as it's used in the user_data.xml popup.
2022-07-20 12:02:07 -03:00
David Capello
da58670dd0 Revert "Add '{title}' and '{layer}' functionality to the Export dialog (fix aseprite/aseprite#3363)"
Fix crash reported on v1.2.36/v1.3-beta17, ctx->activeDocument() can
be nullptr.

This reverts commit 1f5e4cfc4f to fix #3431
2022-07-19 10:29:16 -03:00
David Capello
f920e9dcb8 New shorter domain for Igara Studio: https://igara.com 2022-07-18 16:01:31 -03:00
David Capello
dd0c296209 Use tooltip_text style & color to paint tooltip windows (fix #2554) 2022-07-18 16:00:13 -03:00
David Capello
7c8153b5ec Use selection bounds if they're visible on ImportSpriteSheet by default 2022-07-18 12:47:54 -03:00
David Capello
df33744c85 Improve color selector shaders
* Removed conversion from RGB -> HSV/HSL for each pixel (we just pass
  the HSV/HSL values directly to the shader). In this way we don't
  lost some hue information for some special cases like white/black
  colors (probably related to: https://community.aseprite.org/t/14904)
* Now Tint/Shade/Tone selector changes the aspect of the Hue slider
  depending on the current saturation/value (this was changed in the
  non-shader version too)
2022-07-18 12:01:12 -03:00
David Capello
4389788a1d The document associated w/SpriteEvents can be nullptr in special cases
SpriteEvents can be re-created just when we're closing the sprite if
we access Sprite.events property in app 'sitechange' event. When this
second instance of SpriteEvents is deleted after the sprite was
closed, the document cannot be found (as it was already destroyed).

Associated test:
02a2f1f933
2022-07-16 13:14:24 -03:00
David Capello
f4e83371b8 Several minor improvements to the status bar
* Remove "%3d" for integers (just use "%d"), this is a legacy format
  when the text was a monospace font (it was present from the very
  beginning of the times, when we used the Allegro font)
* New :delta: icon (before :offset: which didn't exist in the theme)
* Show useful info for MovingCelState: mainly cel bounds
2022-07-15 17:03:18 -03:00
David Capello
7e19592470 Preview the modified image for brush slots that don't save image colors
This is to show the brush image with the new fg color in the brush
popup instead of the original image when image colors shouldn't be
preserved for that specific slot.
2022-07-15 12:49:48 -03:00
David Capello
c6e3ca0d8b Fix memory leak with IntEntry popups 2022-07-15 12:46:54 -03:00
David Capello
60a4ebf8f6 Minor change in StatusBar::showColor() to use std::string/fmt::format 2022-07-15 12:30:15 -03:00
David Capello
44bb1c4e48 Fix bug losing original image colors from custom brushes (fix #3375) 2022-07-15 10:05:50 -03:00
David Capello
51132a8e84 Update laf submodule 2022-07-14 14:16:24 -03:00
David Capello
1621973298 Merge branch 'issue-3417' into main 2022-07-14 14:11:13 -03:00
David Capello
57064e6d16 Update submodules (laf, clip) 2022-07-13 18:16:23 -03:00
David Capello
f14fad77eb Fix std::clamp() assert fail when scrollbars are too small 2022-07-13 16:47:20 -03:00
Joseph-Eugene Winzer
da81c0266d Fix empty undo history crash (fix #3417)
m_undoHistory is not valid for tabs other than sprites. For example
opening the README or Home tab does not initialize the undo history,
thus aseprite will segfault when it tries to get its first entry.
2022-07-13 05:18:04 +02:00
David Capello
9a3958278b Fix bug moving a cel, flattening all layers, and then undoing (fix #3416)
The m_boundsF position read from doc::read_celdata() was overwritting
the position of the cel when it was restored from the undo
information.
2022-07-11 10:24:43 -03:00
David Capello
62c052dd40 Use a std::unique_ptr for m_boundsF in doc::CelData 2022-07-11 10:21:38 -03:00
David Capello
d46724329f Minor improvement in FlattenLayers to avoid some cmds
Instead of creating cmd::SetLayerName and cmd::MoveLayer, we can add
the layer with its name and in the correct place directly.
2022-07-11 10:10:36 -03:00
David Capello
7ca66790c5 [win] Fix rounded corners on Windows 11 when some windows appear for first time 2022-07-10 22:22:57 -03:00
David Capello
6e0394b7dc Fix using MoveMask command without visible selection
Issue found testing #2796 without selection/without calling SelectTile
command.
2022-07-07 16:33:39 -03:00
David Capello
daa7cc837a Minor change: Add const to some pointers in write_layer() 2022-07-07 16:10:51 -03:00
David Capello
8fe88606c6 Fix possible std::clamp() assert fail 2022-07-07 16:08:40 -03:00
David Capello
1b76076c52 Fix clicking a menuitem that is above another parent menubox/bar (fix #3386) 2022-07-07 16:07:22 -03:00
David Capello
59c6c06fa0 Add missing libc++abi-10-dev dependency on Linux (#3382) 2022-07-03 12:41:02 -03:00
David Capello
4f2eae6b77 Use C++17 [[fallthrough]] if needed 2022-06-29 20:14:03 -03:00
David Capello
b01c28c48d Add missing override modifier 2022-06-29 20:05:58 -03:00
David Capello
7aa90db770 [lua] Add undo information in Sprite:newSlice() (fix #3393) 2022-06-29 19:46:37 -03:00
Martín Capello
c00f4b0d26 Comment m_overlap->setImmutable() to avoid crashing when moving tabs while debugging on windows 2022-06-29 15:02:21 -03:00
Martín Capello
306e13dfad Clear the exported images with its mask color instead of 0 (fix #3391) 2022-06-28 18:43:23 -03:00
Gaspar Capello
1f5e4cfc4f Add '{title}' and '{layer}' functionality to the Export dialog (fix aseprite/aseprite#3363)
Also Add '{title}' functionality to CLI dialog on sprite-sheet file name
2022-06-28 18:42:33 -03:00
David Capello
3d0b5d809c Fix bug in move_or_copy_palette_colors() accessing out-of-range index 2022-06-28 15:17:29 -03:00
David Capello
3adfe13b7e Add RelWithDebInfo and Debug build types to GitHub actions 2022-06-28 14:55:36 -03:00
David Capello
0aeacd46de Disable ccache on Windows (fix #3404) 2022-06-28 14:33:12 -03:00
David Capello
aaf779e399 Update laf module 2022-06-28 14:02:33 -03:00
David Capello
6d30f274f4 [msvc] Fix problem using invalid min/max bounds in std::clamp
There is an assert() in the std::clamp() impl on MSVC that checks if
the min/max values are valid.
2022-06-28 14:02:18 -03:00
David Capello
b7d5d4a2c9 Editable resize factor in File > Export (fix #3007)
Related to #3008
2022-06-15 12:25:43 -03:00
David Capello
af74f8bc84 Fix memory leak when the created cel is not used in ExpandCelCanvas 2022-06-14 23:25:10 -03:00
David Capello
4aa5fedfec New "on the fly" resize when saving/exporting image (fix #1112)
Implemented using a new FileAbstractImage interface to get scanlines
for each frame automatically resized (without modifying the original
sprite/without using SpriteSize command/adding new undo information).

Related to #3008
2022-06-14 23:19:39 -03:00
David Capello
c58dae51fa Fix crash using a deleted surface in Overlay::restoreOverlappedArea()
Can happen when a resize event is received and m_captured stores the
surface with the old window size.

This was found opening a file from the CLI on Linux/X11.
2022-06-14 21:39:38 -03:00
David Capello
e2798bc849 Fix crash creating the "No Recent File" w/AppMenuItem() (fix #3371) 2022-06-14 14:01:28 -03:00
David Capello
30b61e501e [lua] New Image(Image, Rectangle) ctor 2022-06-14 10:04:54 -03:00
David Capello
82cd244a6e Add support to use SaveFile commands from CLI (without UI) 2022-06-13 19:19:44 -03:00
David Capello
ddc1b76214 Convert SaveFileBaseCommand to CommandWithNewParams
With this patch we fixed some use cases:
* We can show the ui with a default filename { filename=..., ui=true }
* We can specify fromFrame/toFrame for SaveFileCopyAs
2022-06-13 17:04:12 -03:00
David Capello
d160fb8b91 Minor changes in SaveFileCommand to use enums instead of bool params 2022-06-13 12:46:11 -03:00
David Capello
25fbe786f8 [osx] Compile for macOS 10.9 in GitHub Actions 2022-06-09 19:10:31 -03:00
David Capello
4471dab289 [osx] We cannot use std::optional::value() if we want to support macOS 10.9
It looks like value() member was introduced in macOS 10.13 (error
detected because we use CMAKE_OSX_DEPLOYMENT_TARGET=10.9).
2022-06-09 19:07:08 -03:00
David Capello
71d885d2a0 Replace base::clamp -> std::clamp as now we use C++17 2022-06-09 19:05:48 -03:00
David Capello
b2d46bf10b Use std::unique_ptr/optional in more App objects 2022-06-09 17:29:40 -03:00