Commit Graph

255 Commits

Author SHA1 Message Date
David Capello c904c41b39 Don't show stroke/fill option for theme fonts
build / build (Debug, macos-latest, lua, cli) (push) Has been cancelled Details
build / build (Debug, macos-latest, noscripts, cli) (push) Has been cancelled Details
build / build (Debug, ubuntu-latest, lua, cli) (push) Has been cancelled Details
build / build (Debug, ubuntu-latest, noscripts, cli) (push) Has been cancelled Details
build / build (Debug, windows-latest, lua, cli) (push) Has been cancelled Details
build / build (Debug, windows-latest, noscripts, cli) (push) Has been cancelled Details
build / build (RelWithDebInfo, macos-latest, lua, gui) (push) Has been cancelled Details
build / build (RelWithDebInfo, ubuntu-latest, lua, gui) (push) Has been cancelled Details
build / build (RelWithDebInfo, windows-latest, lua, gui) (push) Has been cancelled Details
2025-07-18 18:48:35 -03:00
David Capello 5c4daff128 Add options to stroke/fill text (fix #5271)
build-auto / build-auto (Debug, macos-latest) (push) Has been cancelled Details
build-auto / build-auto (Debug, ubuntu-latest) (push) Has been cancelled Details
build-auto / build-auto (Debug, windows-latest) (push) Has been cancelled Details
build-auto / build-auto (RelWithDebInfo, macos-latest) (push) Has been cancelled Details
build-auto / build-auto (RelWithDebInfo, ubuntu-latest) (push) Has been cancelled Details
build-auto / build-auto (RelWithDebInfo, windows-latest) (push) Has been cancelled Details
build / build (Debug, macos-latest, lua, cli) (push) Has been cancelled Details
build / build (Debug, macos-latest, noscripts, cli) (push) Has been cancelled Details
build / build (Debug, ubuntu-latest, lua, cli) (push) Has been cancelled Details
build / build (Debug, ubuntu-latest, noscripts, cli) (push) Has been cancelled Details
build / build (Debug, windows-latest, lua, cli) (push) Has been cancelled Details
build / build (Debug, windows-latest, noscripts, cli) (push) Has been cancelled Details
build / build (RelWithDebInfo, macos-latest, lua, gui) (push) Has been cancelled Details
build / build (RelWithDebInfo, ubuntu-latest, lua, gui) (push) Has been cancelled Details
build / build (RelWithDebInfo, windows-latest, lua, gui) (push) Has been cancelled Details
2025-07-14 23:17:25 -03:00
Gaspar Capello fdc9b2f000 Fix symmetry button is kept pressed when we didn't pressed (fix #4760)
This fix removes the 'non sense symmetry filter' to prevent
some buttons from being unintentionally held down.

Moved the drawing process for symmetry axes from
'Editor::drawSpriteUnclippedRect' to
'Editor::drawOneSpriteUnclippedRect' to allow semi-transparent axes.
This also produces axes on every tile in tile mode.

Pixel ratios other than 1:1 are now considered in the drawing logic of
diagonal axes.
2025-04-21 19:20:43 -03:00
David Capello 09538f9a1a clang-format all files 2024-12-16 14:52:19 -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 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
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
David Capello e700cce987 Merge branch 'main' into beta 2024-09-23 15:03:11 -03:00
David Capello 12e253d1ef Revert [symmetry]reset_position string name
This was changed to reset_position_to_center in
d4c9a2fb36 but it's better if we keep
the string ID as it is so we can use the existent i18n.
2024-09-16 09:32:07 -03:00
David Czekalla d4c9a2fb36 Add "Reset Symmetry to View Center" option (fix #4638, #4640)
Added an option in the ContextBar to reset the symmetry options to the
current view center.
2024-09-13 16:55:36 -03:00
Martín Capello 7dc01bcdf7 Fix initial state of transform checkbox 2024-08-29 15:24:48 -03:00
Martín Capello ead2023cfd Add "Transform" checkbox to slices and introduce moving slice content 2024-08-29 15:24:48 -03:00
David Capello 0bf9353a02 Add new Text tool (fix #28)
This is the first (not yet production-ready) version of the
interactive Text tool. The text input is done with a transparent
ui::Entry, and on each text modification an ExtraCel is rendered with
this same ui::Entry's TextBlob to be displayed in the canvas with the
active zoom level.

The ui::Entry is being painted along the text in the canvas (just for
testing), but this is something to be fixed. Probably it will not be
the case in the future and a fully customized rendering (onPaint())
process will be required.
2024-08-26 11:47:57 -03:00
David Capello e87f6df72b Avoid loading current dithering matrix on each mouse move (related to #4174)
With this change we are reusing the cached/loaded matrix on each
DitheringMatrixInfo struct, calling the
load_dithering_matrix_from_sprite() function just one time (not on
each brush preview/mouse movement).
2024-08-21 19:49:55 -03:00
David Capello 9da10605d3 Remove duplicate code with new sort_slices_by_name() function 2024-07-19 16:47:13 -03:00
David Capello 32a099dcb6 Fix crashes with ill-formed fmt format strings (fix #2274)
There is a third-party translation (and can happen with our own
translations) that a fmt format string is ill-formed in the .ini file
of the translation (this could happen even if the en.ini file was
manually modified/broken by hand).

This patch includes a refactor of the Strings class so we can:

1) Static check at compile-time about the number of required arguments
   to format a string (no need to call fmt::format() directly with
   arbitrary number of args)
2) If a string is not valid for the fmt library, the runtime exception
   is caught and the default (English) string is returned.
2024-06-20 20:49:10 -03:00
Martín Capello f4b8effd52 Use ui::Style* instead of strings in ButtonSet::addItem() (fix #4188) 2024-05-28 09:30:54 -03:00
David Capello 4d5bf53be8 Fix crash accessing empty list of sprites updating ContextBar fields (fix #4407)
Not sure if this will be the final solution for this crash, as a Doc
shouldn't have an empty list of sprites.
2024-04-08 10:44:44 -03:00
David Capello 434c262489 Merge branch 'intuitive-opacity-values' (#1544, #4262) 2024-02-08 15:22:58 -03:00
Martín Capello b10390625f Introduce AlphaEntry class and make InkOpacityField extend from it (fix #1544) 2024-02-07 13:33:09 -03:00
Gaspar Capello 024c266231 Fix deleting the "Pixel-perfect" checkbox from the "Spray Tool" (fix #4220) 2024-02-06 13:13:43 -03:00
David Capello e87fdbb3af [i18n] Add some hardcoded strings to en.ini (fix #4237) 2023-12-22 15:03:07 -03:00
David Capello 046b68061a Highlight dynamics button when some sensor is being used 2023-11-30 21:24:48 -03:00
David Capello 10738b32c3 Use dynamics for brush preview only for freehand tools (fix #4178)
This fixes a problem where the smaller brush size of the dynamics was
used for tools like line/rectangle/etc. where the dynamics option
aren't used.

We've added some comments for a possible future #4186 too,
implementing dynamics for the contour tool (which is freehand, but the
result is filled).
2023-11-30 12:56:46 -03:00
David Capello 60b4524e41 Fix dithering matrix selection in Gradient tool (fix #4184)
Regression introduced in 8d435e02d8
2023-11-30 11:04:32 -03:00
David Capello 8d435e02d8 Fix performance regression drawing/showing brush preview (fix #4174)
We were loading the whole list of dithering matrices on each mouse
move now just by chance. As a future refactor we should improve the
handling of dynamics options, e.g. avoid accessing preferences/
rebuilding the tools::DynamicsOptions object on each mouse movement.
2023-11-28 12:47:24 -03:00
David Capello 8af4747635 Use configured dynamics of active tool w/o opening dynamics popup (fix #4151) 2023-11-20 14:50:52 -03:00
Martín Capello 4a22518c3d Show custom pattern brushes for Paint Bucket (fix #4053) 2023-11-02 12:30:52 -03:00
David Capello 63fb39e0e8 Fix sprintf() warnings using snprintf() or fmt::format() 2023-09-27 19:57:41 -03:00
Gaspar Capello 5968440f90 Add memorization of tool-shared dynamics options (fix #4007) 2023-09-19 14:27:24 -03:00
Gaspar Capello 572cdf2b0e Add check box "Same in all tools" in the Dynamics options window (fix #4003)
Now each tool has independent 'dynamic options'. A global configuration
for all tools is also possible via the 'Same in all tools' option.

ALso this fix, solves a regression inserted in:
2cc15cda9e
(bug inserted: stabilizer is always active)
2023-08-18 15:35:15 -03:00
Gaspar Capello 2cc15cda9e Add save dynamics options between sessions (fix #3933) 2023-08-14 18:07:46 -03:00
David Capello b28550faf5 Use new ScopedValue w/o old arg + C++17 class template argument deduction (CTAD) 2023-04-14 13:43:36 -03:00
Martín Capello b2365b557d Fix theme initialization for paint bucket settings menu 2023-02-27 11:04:07 -03:00
Martín Capello 029e520f81 Add styles for ink type and dynamics buttons 2023-02-27 09:44:42 -03:00
Martín Capello ea43c5f6c8 Adjust styles to make them work with the new buttonset 2023-02-27 09:44:42 -03:00
David Capello 39d1fb56d4 Remove ui::Event& args from ui::Button::Click signal
This is to simplify code and to match ui::MenuItem::Click and
ui::Button::Click signals (so then we can write some generic code
using Button::Click or MenuItem::Click).
2023-01-12 11:00:16 -03:00
David Capello e78e1e9a54 Remove current_editor, replace with Editor::activeEditor()
Finally removed src/app/modules/editors.h file.
2022-10-20 12:31:22 -03:00
Joshua Ogunyinka 3c815ac1bd Add missing language strings for the timeline/context bar 2022-10-12 13:19:20 -03:00
David Capello 1912053f33 Merge branch 'main' into beta 2022-07-15 17:30:39 -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 8f44b521b6 Merge branch 'main' into beta 2022-06-10 10:31:13 -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 1630416991 Fix a crash when a script generates a Fg/BgColor change when closing the app
If a script Dialog changes the app.fgColor/bgColor in its onclose
callback, it will notify all fgColor/bgColor preference
observers (ContextBar is one of them), if we don't disconnect from
these signals when we're deleting ContextBar, the signals will call a
deleted slot/connection from app::script::close_all_dialogs().
2022-06-08 16:24:36 -03:00
David Capello 04fa9a47ab Merge branch 'main' into beta 2022-02-24 16:42:05 -03:00
David Capello b212a24479 Add sampling options to Edit > Preferences dialog too (#3183) 2022-02-21 16:21:07 -03:00
David Capello 5ccf414183 Add options to change the downsampling algorithm (fix #3183)
Also we've restored the default algorithm to bilinear + mipmapping,
which was the default on the Aseprite before we switched to Skia m96.
This was requested by some users.
2022-02-21 15:30:09 -03:00
David Capello 7e76d81fcc Merge branch 'main' into beta 2022-02-18 19:32:33 -03:00
David Capello 2d3de1728c Add SkinTheme::get() to avoid using SkinTheme::instance() as much as possible
This was done to avoid some nullptr references using
SkinTheme::instance() (mainly from
StatusBar::IndicatorsGeneration::add()) when the application is being
closed because an exception was thrown. This might be useful to detect
certain kind of crashes from Sentry.
2022-02-18 19:01:46 -03:00