Commit Graph

245 Commits

Author SHA1 Message Date
David Capello 09538f9a1a clang-format all files 2024-12-16 14:52:19 -03:00
David Capello 8fd882d90b Merge branch 'main' into beta 2024-10-08 15:06:57 -03:00
David Capello 4e2488534f Don't show GPU checkbox in preferences dialog
This option is only available in ENABLE_DEVMODE, regression from
31c80a5e0c.
2024-09-23 15:04:11 -03:00
David Capello e700cce987 Merge branch 'main' into beta 2024-09-23 15:03:11 -03:00
Christian Kaiser 96438b789e WebP show_alert reset in options 2024-09-23 13:38:14 -03:00
Christian Kaiser 31c80a5e0c Add reset preferences page (fix #4432, #4620) 2024-09-17 16:09:14 -03:00
Gaspar Capello 3cc1c63274 Add different best fit criteria to compare colors for RgbMaps (fix #2787, #4416) 2024-09-03 13:17:06 -03:00
David Capello 1c1c4593ed Merge branch 'main' into beta 2024-08-22 14:26:18 -03:00
Martín Capello 712d84e44e
Avoid div by zero by preventing entering/returning a grid bounds w/zero width/height (fix #4146, #4597) 2024-08-19 18:07:40 -03:00
David Capello 68d5262c48 Merge branch 'main' into beta 2024-08-09 21:06:57 -03:00
Gaspar Capello 8f3af748b9
Don't allow to install third-party themes that override the default one (fix #4226) (#4335)
This 1) hides user themes whose name is the same as the default,
and are present in the user folders (i.e.  'extensions' and
'data/themes' folders), and 2) doesn't allow to install themes with
the same content/ID of the default aseprite-theme (fix #4226)
2024-07-29 16:02:05 -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
David Capello 6855c1368d Merge branch 'main' into beta 2024-06-19 16:19:16 -03:00
David Capello 7d63ceb199 Remove System::tabletAPI() function 2024-06-18 14:02:37 -03:00
David Capello f29ec83c6c [win] Fix sync between mouse cursor <-> stylus cursor (fix #4539)
Added a new option (enabled by default) to set the mouse cursor when a
pen/pointer message is received. This fixes a couple of issues:

1) When we zoom in/out with keys or scrolling the trackpad, the last
   known position will be used (the pen position if we are using the
   pen).

2) If we are recording the stream/live streaming with a software like
   OBS Studio, the cursor position will correctly be in the pen
   position if we're painting with the pen.
2024-06-18 13:44:19 -03:00
David Capello f27fb00acf Merge branch 'main' into beta 2024-06-14 20:26:25 -03:00
David Capello 2c7fc767bf Update GPU flag correctly on all display when it's changed 2024-06-14 20:07:05 -03:00
David Capello a6d9e5243f Merge branch 'main' into beta 2024-04-08 17:04:45 -03:00
David Capello 6a12c7014d Select "English" if the current language is not found in Preferences
If the user preferences file (aseprite.ini) contained a non-existent
language, the first option of the languages combo box was selected,
which might lead to a confusing situation where just opening the
preferences dialog will change from English to other
language (non-English, the first language in the combobox).
2024-04-08 13:23:38 -03:00
David Capello 56357e68ce Merge branch 'main' into beta 2024-03-11 18:03:17 -03:00
David Capello 7905acf38a Handle some extra CannotWriteDocException cases when ContextWriter is used (#4367)
One fix that this patch includes for #4367 (crash by unhandled
CannotWriteDocException exception) is when we drag-and-drop a tag
border to resize its limits. This is a fix for that case but we don't
know if this include all cases of #4367 crashes (so we cannot close
the issue).

Anyway we have added some try { } catch in cases where it's better to
avoid propagating the exception, e.g. in
MovingSelectionState::onLeaveState() to avoid throwing exceptions in
Editor::backToPreviousState() which might be problematic in several
cases. (Maybe related to #2829?)
2024-03-11 17:15:13 -03:00
David Capello 571b4ec9f2 Update to new laf API (os::System::instance()/make()) 2024-03-05 18:50:24 -03:00
Martín Capello d331195c4c Add "Alpha & Opacity" section to Preferences > Color (fix #1544) 2024-01-12 14:38:04 -03:00
David Capello 8722c8ec16 Lock document in Tx() ctor (part of #2430)
This already fixes a lot of possible problems that can happen when a
script is running and modifying some part of a sprite that is being
backed up in a background thread.

We still need some work to being able to lock a sprite two or more
times in the same thread to write it. E.g. an app.transaction() should
lock the sprite for write access, but the script transaction function
could call a command, and that command could use a ContextWriter to
lock the sprite again. At the moment this is not possible because we
need a re-entrant RWLock implementation.
2023-12-27 11:05:15 -03:00
David Capello ae3b2dd144 Revert timeline behavior to the v1.2 default (#4024)
This change was introduced in dd7e27a098
as a possible fix for #4024, but the change is too disruptive to be
introduced at this stage, we need some extra UI elements to make the
drag & drop accessible in both modes: the default v1.2 behavior, and
a possible new selection mode, e.g. #1498
2023-10-25 08:36:54 -03:00
David Capello 3f101d48d4 Add more accessible option to re-enable the Aseprite file dialog (fix #4051)
As now the native file selector is the default one, we moved the
option to re-enable the previous file selector to Edit > Preferences >
General > Show Aseprite file dialog option.

Related to #3615 and added as a simple alternative to #2745 which
require native widgets on each native file dialog.
2023-10-04 16:57:11 -03:00
David Capello d8814fa2f9 Add option to avoid drag & drop timeline range from edges
Related to #1498 in some way to start enabling new selection modes in
the timeline.
2023-09-19 12:07:14 -03:00
David Capello e2d8ffab54 Add reset buttons + tooltips to timeline range options (#4024) 2023-09-18 17:33:38 -03:00
David Capello 00b75a76a8 Add displayName property for language extensions (fix #3964)
The default language (en.ini) has a new "display_name" property, but
probably we should remove it and transform the English language in an
extension (just as the default Aseprite theme).
2023-07-12 12:25:30 -03:00
David Capello da0a8b7916 Show GPU option only in DEVMODE
We've update the label "GPU acceleration" to avoid confusion between
developers so they know that this option is not enabled in the final
release.
2023-04-03 16:09:26 -03:00
David Capello 298981732e Don't change grid settings from Preferences if they aren't modified (fix #3479) 2023-03-16 18:08:40 -03:00
Martín Capello d88eb80fe6 Fix theme initialization for theme variants widget 2023-02-27 11:59:20 -03:00
David Capello c900327675 Add switch for "multiple windows" in Edit > Preferences > General
As the "multiple windows" feature is still buggy (#3556) and we've
disabled it by default, it's nice to make this option more visible (in
the General section) so users reliant on this will find the switch
quickly.
2023-02-24 17:11:51 -03:00
David Capello c910efe2f4 Fix compilation on Windows, now Button::Click doesn't receive an Event& 2023-01-12 13:01:56 -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
Joshua Ogunyinka bbfae36d8f Add missing language strings for preference window 2022-10-12 13:20:41 -03:00
David Capello 83857ea600 Merge branch 'main' into beta 2022-08-17 22:58:12 -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
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 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 684d06ede8 Merge branch 'main' into beta 2022-05-23 18:04:55 -03:00
David Capello 1366a6948c Fix performance issues adding/deleting widgets (related to #3281) 2022-05-20 11:03:12 -03:00
David Capello ff5afba6ae Merge branch 'main' into beta 2022-05-19 16:55:30 -03:00
David Capello 0a3644dfbb Update laf module with initial GPU support (#960)
Anyway this is incomplete and Aseprite is not yet ready to support GPU
acceleration (as the rendering phase is CPU intensive).
2022-05-13 11:41:44 -03:00
David Capello 2a59076f49 Merge branch 'main' into beta 2022-04-25 11:45:31 -03:00
David Capello 319824021b Keep plugin preferences when re-installing an extension (fix #3259) 2022-04-22 09:09:10 -03:00
David Capello 46626bb5ce Merge branch 'main' into beta 2022-04-13 23:01:12 -03:00
David Capello e4c2995326 Extensions now support defining keyboard shortcuts (#1403, #3239) 2022-04-13 22:46:48 -03:00
David Capello 721e401052 Fix some memory leaks & simplify code sending UI messages 2022-04-13 21:04:54 -03:00