Commit Graph

9939 Commits

Author SHA1 Message Date
David Capello
9a7ce8604b Merge branch 'main' into beta 2024-12-11 08:34:33 -03:00
David Capello
6cc0bbd0bf [precommit] Add GitHub action 2024-12-11 08:30:16 -03:00
David Capello
df19b09c23 Avoid using tabs in run-tests.sh expected output 2024-12-10 22:42:22 -03:00
David Capello
a154faf3f9 [precommit] Default EOL as LF (and CRLF for .cmd and .ps1 files) 2024-12-10 22:38:57 -03:00
David Capello
67a971618d [precommit] Allow tabs in .gpl files and .gitmodules 2024-12-10 22:15:30 -03:00
David Capello
f62b5eafb1 Merge branch 'main' into beta 2024-12-10 16:16:16 -03:00
David Capello
e47148a360 [pre-commit] Autoupdate packages 2024-12-10 14:06:43 -03:00
David Capello
db7c4658be [pre-commit] Remove codespell 2024-12-10 14:00:21 -03:00
Christian Kaiser
102624cad3 Add pre-commit configuration and documentation. 2024-12-10 13:52:39 -03:00
David Capello
f5f3cc03b9 Update laf module 2024-12-10 13:51:35 -03:00
David Capello
70f2cd9559 Remove duplicated code checking if mnemonic+modifiers are pressed 2024-12-10 10:16:20 -03:00
David Capello
cfc92e7cdb Add { } in switch-case to define vars inside
This is required if a new case is added below in the future to avoid
compiler errors. It's better to always use { } if we're going to
define local variables for the case.
2024-12-10 09:31:32 -03:00
Martín Capello
0edc4e16ed Disable and reset columns/rows according to type 2024-12-10 09:30:29 -03:00
Martín Capello
26a750108c Break long line 2024-12-10 09:30:29 -03:00
Martín Capello
a0e8f8653c Add columns and rows parameters 2024-12-10 09:30:29 -03:00
Martín Capello
9ca6368088 Fix button's kKeyUpMessage handling
Now the checkbox button skips the kKeyUpMessage when the key being
depressed is not the space key and is not the associated mnemonic key.
Before this change, for instance, if a checkbox received the focus by
using the Tab key, the kKeyUpMessage (of the Tab key) was intercepted by
the checkbox and triggered the onClick() event.
2024-12-10 09:30:29 -03:00
Martín Capello
8a8a324651 Add columns and rows fields to Import Sprite Sheet 2024-12-10 09:30:29 -03:00
Martín Capello
a99161a2d2 Add MaskByColor command lua tests 2024-12-09 19:26:46 -03:00
Martín Capello
ad0d30b2df Set appropriate default parameters values
Take the default values for the command parameters from the UI when the
UI is available and ui=false
2024-12-09 19:26:46 -03:00
Martín Capello
8d7e6e3f5b Remove MSVC warning deactivation
This is because now it is disabled by using laf-base flags
2024-12-09 19:26:46 -03:00
Martín Capello
2596af548a Add "ui" param to MaskByColorCommand (fix #2774) 2024-12-09 19:26:46 -03:00
Martín Capello
4dc7ba6dc0 Move code into a MaskByColorWindow class
Refactor code to separate responsibilities, now the UI related code is
in its own class and the command class looks cleaner
2024-12-09 19:26:46 -03:00
Martín Capello
153b1a8e0a Refresh editor after apply with preview disabled 2024-12-09 15:50:02 -03:00
Martín Capello
dcc3f9e8e1 Fix indentation 2024-12-09 15:50:02 -03:00
Martín Capello
3987412826 Change position of Apply button 2024-12-09 15:50:02 -03:00
Martín Capello
6c714bfc05 Add "Apply" button (fix #4678) 2024-12-09 15:50:02 -03:00
Martín Capello
4dd2b1877d Refactor to remove filter_worker.h 2024-12-09 15:50:02 -03:00
David Capello
5464c4a3c2 Minor fixes for the new "tile index" in status bar (#2082)
* Only show when we are inside the grid bounds or tilemap layer
  bounds (don't show it for negative tile positions)
* Count final "partial column" for the tile index
2024-12-09 15:26:16 -03:00
Liebranca
ebd17b0ced Show grid cell index in status bar (#2082) 2024-12-09 15:11:06 -03:00
Gaspar Capello
951c2d0de9 Fix 'cel.image = nil' is not allowed (fix #4514)
Now 'cel.image = nil' results in the cel remotion.
2024-12-09 12:05:40 -03:00
David Capello
08b3e76719 Move Palette::initBestfit() initialization to palettes module 2024-12-09 10:22:35 -03:00
David Capello
4ba88ce49c Fix failing assert in ui::details::::removeWidget()
When running multiple UI tests, if the mouse was moved on a created
window, it made the ui::details::removeWidget() fail because the
widget was still ui::Manager::widgetAssociatedToManager().
2024-12-07 14:34:45 -03:00
David Capello
0e775bf06d Simplify creation of AppMenus adding the instance to App
In this way we can recreate the AppMenus when running multiple tests.
2024-12-07 14:34:45 -03:00
David Capello
6830e0ce94 Fix using a deleted theme when running another test
The pointer to and old theme was being used in update_mouse_cursor().
2024-12-07 14:34:45 -03:00
David Capello
d5d5894df6 Allow re-creating the ui::Manager multiple times 2024-12-07 14:34:45 -03:00
David Capello
60eee6e809 Move Strings initialization to App instance creation
This removes Strings::createInstance() and we can check with ASSERT()
the singleton in the Strings class ctor/dtor.
2024-12-07 14:34:45 -03:00
David Capello
9b82e1aac9 Show warning if the GUI is not available
Only for compiled versions without Skia. Useful to let users know that
they have compile with LAF_BACKEND=skia
2024-12-07 14:34:45 -03:00
David Capello
24ad3e36a8 Add tests to initialize/finish the app::App instance 2024-12-07 14:34:45 -03:00
David Capello
b6f27a2718 Destroy the MainWindow at the end of run()/close() functions
This explicit reset() was included for the editor_benchmark in
19037a2e69 but it should be at the end
of the close() function.

This fixes a failing ASSERT() in ~DocObserverWidget when we destroy
the ContextBar.
2024-12-07 14:31:25 -03:00
David Capello
99dad9f349 Remove unused variable 2024-12-07 13:35:45 -03:00
David Capello
4f0335f887 Fix initialization order warning 2024-12-07 12:30:22 -03:00
Gaspar Capello
f7a9f44cec Fix Magic Wand doesn't work correctly in Tiled Mode (fix #4659) 2024-12-06 09:45:30 -03:00
David Capello
b1314436c1 Use the new laf-dlgs library 2024-12-06 09:28:11 -03:00
David Capello
0df7ed0ef2 Merge branch 'main' into beta 2024-12-05 23:37:45 -03:00
David Capello
6ff046685a Set the simple style for scrollbar thumbs 2024-12-05 22:45:58 -03:00
David Capello
04a6758ed8 Fix invalid std::clamp(layer, 0, -1) usage in timeline
This can happen in certain benchmarks that don't create a layer. We've
added a return value to getDrawableLayers() to know if the returned
range is valid.
2024-12-05 22:18:43 -03:00
David Capello
19037a2e69 Close/destroy MainWindow in case we didn't call App::run()
This can happen in some benchmarks like editor_benchmark, were the App
is created, but App::run() never called.
2024-12-05 20:31:20 -03:00
David Capello
731e982a53 Update benchmark library
1) In benchmark docs it says that a range-based loop is preferred
instead of KeepRunning() call:

  https://github.com/google/benchmark/blob/main/docs/user_guide.md#a-faster-keeprunning-loop

2) Now we call benchmark::Shutdown() in editor/view benchmarks exit
2024-12-05 20:13:37 -03:00
David Capello
890e27b0a1 Fix UI tests
Fixed a crash accessing a nullptr native window running UI tests from CLI.
Regression from 2e13559bbb
2024-12-05 10:30:25 -03:00
David Capello
77e0944baa Add more instructions about how to solve an incomplete cloned repo
Related to issues commented in #4562 and #4866
2024-12-05 10:16:55 -03:00