Commit Graph

8797 Commits

Author SHA1 Message Date
David Capello
1f24e0be9f Fix finding webp from Skia on Windows, macOS, and Linux 2022-08-02 20:20:13 -03:00
David Capello
207c1c518c Merge branch 'main' into beta 2022-08-02 19:08:36 -03:00
David Capello
ccb32562ad Link with libwebp from Skia if possible 2022-08-02 18:56:34 -03:00
David Capello
05bf34f084 Merge branch 'main' into beta 2022-08-02 16:48:32 -03:00
Gaspar Capello
55885ee266 Fix regression: TextBox isn't rendering text (doesn't update the bounds area of the text box)
Regression in dd0c296209 (Use
tooltip_text style & color to paint tooltip windows #2554).

Prior this fix, text box does not update its bounds area because it
has not a style assigned.

Fix #3442, fix #3443
2022-08-02 16:39:18 -03:00
David Capello
3e6360d024 Fix crash using deleted os::Surface (fix #3451)
It looks like processing a specific kPaintMessage with
ui::Widget::sendMessage() might re-create the os::Surface and destroy
the previous one, so we need to keep a reference to the previous
surface just in case to keep it alive.

We aren't able to reproduce this crash, but we've received several
Sentry reports about it, only on Windows and since v1.2.34.1 (not sure
if it's related to that). We'll see if this does fix the crashes or we
have some kind of regression in the future.
2022-08-02 16:22:13 -03:00
David Capello
db38a56558 Merge branch 'main' into beta 2022-07-20 16:10:40 -03:00
David Capello
52b1899e9d Fix crash Ctrl+clicking an ill-formed reference layer cel with width/height < 1.0
The width/height of a reference layer cel cannot be < 1.0, but in the
extreme case where this happens, Ctrl+clicking the reference layer
shouldn't crash the program.
2022-07-20 15:18:49 -03:00
David Capello
571134c1b4 Add option to apply Saturation/Value to Hue slider in Tint/Shade/Tone optionally
This was changed in df33744c85, but now
we're adding an option to switch between both behaviors. We prefer to
keep the old behavior as the default one and the new one as an
optional preference.

Related to: https://community.aseprite.org/t/15065
2022-07-20 12:47:50 -03:00
David Capello
463e6d2c58 Merge branch 'main' into beta
The tooltip_face style is not used in the beta version anymore, so
the problem in 504fb7b7f8 is not present
in beta branch.
2022-07-20 12:09:21 -03:00
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
Martín Capello
22de483fc7 Remove "Enter license" menu item when DRM feature is not enabled 2022-07-19 15:43:31 -03:00
David Capello
3db8267270 Merge branch 'main' into beta 2022-07-19 10:35:13 -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
5ec88ad659 Merge branch 'main' into beta 2022-07-18 16:05:37 -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
db1faf8f7b Merge branch 'main' into beta 2022-07-18 15:32:27 -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
02a2f1f933 Test when Sprite.events are created just when the sprite is being closed
As app 'sitechange' event is generated when we close a sprite,
accessing Sprite.events on that event will re-create the
app::script::SpriteEvents instance associated with the sprite.
2022-07-16 13:11:05 -03:00
David Capello
f7dee88901 Fix uninitialized rgbmap (found w/MSVC debug, GitHub actions failed)
Regression from 2785a9fef7
2022-07-16 11:47:52 -03:00
David Capello
1912053f33 Merge branch 'main' into beta 2022-07-15 17:30:39 -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
a4d730a734 Merge branch 'main' into beta 2022-07-14 15:19:41 -03:00
Gaspar Capello
f7b6674680 Fix Marqueed selection gets some rows duplicated when moved left and right over left canvas edge with Ctrl still pressed #2891
Prior to this fix, moving a marquee selection while holding down the Ctrl key outside the left/top area of the canvas results in a 1px distortion of the marquee image. This distortion is due to a false transformation when it is required to get the corner bounds, due to rounding the float coordinates towards 0 instead of the nearest left/top integer. The discrepancy occurs within the `getDraggedImageCopy`, `redrawExtraImage`, `drawImage` and `drawMask` functions.
2022-07-14 14:41:01 -03:00
Gaspar Capello
1f5d89a427 Tests for issue aseprite/aseprite#3207
Before the fix the conversion from RGB to INDEXED color mode, in
transparent layers, always picked index 0 as transparent color, even
if the mask color was present in the palette.
2022-07-14 14:35:34 -03:00
Gaspar Capello
2785a9fef7 Remove fillOrphansNodes(), now new colors are added to the octree color arragement
This gives more accuracy in the color picking criteria on new images
pasted into an INDEXED sprite.

Also, added findMaskColor to fix the behavior reported in #3207

Both issues are related when RGBMAP is created. The 'mask color' and
'mask index' must be defined correctly to include/exclude during the
table/octree map color search.

To do: Converting sprite to INDEXED should add 'mask color' to the
palette when color count < 256 and transparent color isn't in the
palette.
2022-07-14 14:27:20 -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
Gaspar Capello
54443ad20d Add other color comparison criteria to findBestfit (first step to #2787) 2022-07-14 14:08:39 -03:00
David Capello
f8f925c634 Merge branch 'main' into beta 2022-07-13 19:49:03 -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