Commit Graph

230 Commits

Author SHA1 Message Date
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
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 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
David Capello f318a42f19 Merge branch 'main' into beta 2021-09-29 10:16:02 -03:00
David Capello 0c604ca4ba Ask for consent to share crash data 2021-09-23 15:22:26 -03:00
David Capello 22a5c4c324 Merge branch 'main' into beta 2021-07-09 10:47:16 -03:00
David Capello 5a6bd465f5 Cache mouse cursors to avoid re-generating them on each setCursor()
This should improve the mouse movement, where a new mouse cursor was
created on each mouse movement with black & white pixels. It's a
regression introduced in ef4f691459
(which was originally introduced to improve the mouse movement
perception in a 100Hz monitor).

This might be a possible fix for:
https://github.com/aseprite/aseprite/issues/2713
2021-07-09 10:21:16 -03:00
David Capello c42c5e1453 Backport new laf API to main branch of aseprite
Some features from the beta branch of aseprite & laf were backported
to the main branch of aseprite.

Related commits:
- New memory handling (db4504e816)
- New get event with timeout (e6ec13cc31)
- Convert os::NativeCursor to an enum (06a5b4f3ae)
- Adapt code to the new os::Display -> os::Window refactor (5d31314cdb)
- Save/load main window layout correctly and limit to current workarea (d6acb9e20f)
- Redraw window immediately on "live resizing" (d0b39ebade)
2021-07-05 17:51:29 -03:00
David Capello fb88a5c1f1 Message::setPropagateToChildren() receives a bool argument 2021-06-07 17:17:18 -03:00
David Capello eec9ed0bcc Fix a couple of minor leaked ui::Messages 2021-06-07 15:20:45 -03:00
David Capello a3f9143cbe Don't ask to adjust the Screen Scaling
For the default theme it makes sense (and maybe for most theme
variants it will make sense to avoid adjusting the screen
scaling). But maybe other themes will want to adjust the scale
automatically when choosing the variant.
2021-05-22 00:46:01 -03:00
David Capello c99000a2c3 Add theme variants to switch easily between Light/Dark themes 2021-05-22 00:42:36 -03:00
David Capello e7f0832ff3 Fix setting color space of all os::Windows 2021-05-21 21:44:30 -03:00
David Capello 69a7faefa2 New default RgbMapAlgorithm to select what could works better at a given time 2021-05-09 20:53:09 -03:00