Commit Graph

7836 Commits (master)

Author SHA1 Message Date
David Capello c0a872ee51 Update laf submodule to fix #3433 2022-09-02 14:35:23 -03:00
David Capello ae889d4ae3 Remove unused local variable from BmpFormat::onLoad() 2022-08-31 12:29:56 -03:00
David Capello 8d79350b7c Fix minor warning C4468 in MSVC using [[fallthrough]]
This is the warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
2022-08-31 12:28:52 -03:00
David Capello c79fb8b211 Fix compilation when ENABLE_UI is disabled
E.g. We cannot use current_editor/Editor class for the CLI-only
Aseprite version.
2022-08-31 11:48:16 -03:00
David Capello 2a93672c70 [lua] Range:clear() now clears the selection of slices 2022-08-31 11:36:39 -03:00
David Capello 47aae7fc07 [lua] Support expressions like: app.range.slices=app.activeSprite.slices
Using lua_geti() we can iterate the SlicesObj as a table.
2022-08-31 11:28:37 -03:00
David Capello 6dce23540a [lua] Move app.selectedSlices to app.range.slices
The biggest motivation was that the Range object is already used to
get/set selected objects in the UI, and it's the range used in
operations like Edit > Delete command (which is the case for slices).
2022-08-31 11:17:34 -03:00
lampysprites 4d65b5c925 [lua] Add app.selectedSlices field 2022-08-31 10:36:00 -03:00
David Capello 2789e41d48 [lua] New API version 20 2022-08-31 09:36:27 -03:00
David Capello 6da4000e6c Make Enter key to "Agree" loading the animation sequence when we modify the duration field 2022-08-31 09:11:59 -03:00
lampysprites c67902dee3 Request frame duration when opening sequences 2022-08-31 09:06:16 -03:00
Gaspar Capello 277e24c799 Minor refactor on old macros within BMP format 2022-08-30 14:44:47 -03:00
David Capello 877b5e00a3 Add color_scales_tests 2022-08-30 14:14:06 -03:00
Gaspar Capello bdcabdedf3 Add extended support to BMP files (fix #3277, fix #1495)
Before this addition, Aseprite supported following BMP formats:
- Size = 12 (OS/2 BMP 1.0)
- Size = 40 (Windows BMP v3)

Now extended support has been added to the BMP extension:
- Load BMP files with BMP header size:
  - Size = 12 (OS/2 BMP 1.0)
  - Size = 16 (OS/2 BMP 2.0 - size 16)
  - Size = 24 (OS/2 BMP 2.0 - size 24)
  - Size = 40 (Windows BMP v3)
  - Size = 52 (BITMAPV2INFOHEADER)
  - Size = 56 (BITMAPV3INFOHEADER)
  - Size = 60 (OS/2 BMP 2.0 - size 60)
  - Size = 64 (OS/2 BMP 2.0 - size 64)
  - Size = 108 (BITMAPV4INFOHEADER) at the moment colorimetry isn’t supported.
  - Size = 124 (BITMAPV5INFOHEADER) at the moment ICC profiles not supported.
- Load BMP with alpha channel.
- Load BMP 2bit color depth.
- Export BMP files with alpha channel (not palette based).
2022-08-30 13:34:32 -03:00
David Capello 282328d6d6 Remove dependency with stringencoders library 2022-08-24 12:50:30 -03:00
David Capello 8a7f6930d0 Fix minor memory leaks loading palettes using std::unique_ptrs 2022-08-23 15:08:01 -03:00
David Capello ab4088502c Use FileAbstractImage in .fli and .webp file formats (#3008) 2022-08-23 11:33:03 -03:00
David Capello 9f8df8e914 [win] Fix aseprite-thumbnailer with new changes from a66c170ded 2022-08-18 13:53:20 -03:00
David Capello a66c170ded Add render::BgOptions to simplify some code 2022-08-17 22:40:25 -03:00
David Capello 4e12e427ef Rename "checked" -> "checkered" (background, drawing routines, etc.)
Also rename setBgCheckedSize -> setBgStripeSize in case we add new
background patterns (like horizontal/vertical/diagonal stripes, etc.)
2022-08-17 22:19:07 -03:00
David Capello 2367c8526b Replace deprecated macro TYPED_TEST_CASE with TYPED_TEST_SUITE 2022-08-17 21:46:33 -03:00
David Capello c8c92499b2 Include wintab32.dll sha1 information (related to #3358)
This might be useful to pre-filter one specific buggy wintab32.dll
library to avoid crashes.
2022-08-17 12:01:03 -03:00
Gaspar Capello e6c90334f9 Fix scrollbar for the Extensions list in Preferences is missing on the first open (fix #3456) 2022-08-10 12:01:28 -03:00
David Capello 3a917492ee Fix crash showing color selector when GPU is enabled
It looks like the internal surface has a nullptr color space.
2022-08-09 16:11:57 -03:00
Gaspar Capello 19b18d2a63 Fix reference layer scaled incorrectly after Sprite > Sprite Size (fix #3461) 2022-08-09 15:30:20 -03:00
Gaspar Capello add1128248 Fix RotSprite transparency bug (fix #3444) 2022-08-08 10:37:32 -03:00
David Capello da636253ee Fix scale factor when using the "Export for Twitter" (fix #3465)
Regression introduced in b7d5d4a2c9
2022-08-08 10:29:36 -03:00
David Capello c62aa571aa Possible fix rendering reference layers in nonreproducible scenario (fix #3460)
This is a patch, but we don't know why this can happen, so it's highly
probable that other kind of crashes might appear in the near
future (or this doesn't fix the original bug).
2022-08-05 10:30:17 -03:00
David Capello 1f24e0be9f Fix finding webp from Skia on Windows, macOS, and Linux 2022-08-02 20:20:13 -03:00
David Capello ccb32562ad Link with libwebp from Skia if possible 2022-08-02 18:56:34 -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 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 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