9977 Commits

Author SHA1 Message Date
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
19037a2e69ef1aa9303eea5af8a200b403fdeba4 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 2e13559bbb211e79f5a031daa7b241a98b75895d
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
David Capello
2e13559bbb Fix crash displaying the Preview window in multiple windows (fix #4864)
We were using a backLayer with a nullptr surface.
2024-12-04 15:52:39 -03:00
David Capello
97dc9c8988 [osx] Fix showing the native window back when the app is hidden (fix #4857) 2024-12-03 22:25:12 -03:00
David Capello
c6a1a6868a Add some style for selected items in the simple theme 2024-12-03 15:52:47 -03:00
David Capello
969dd68490 Move default handleWindowResize handler to ui-lib 2024-12-03 15:52:26 -03:00
Martín Capello
cf82d6d65e Avoid endless loop when dropping some files
When unsupported files where dropped on the timeline the DropOnTimeline
command got stuck trying to process the unsupported file forever
2024-12-03 15:26:32 -03:00
Christian Kaiser
de7d8684ff Add a helper to View to standardize scrolling behavior 2024-12-03 13:41:05 -03:00
Ryan Carsten Schmidt
2b97e44dfd Set ZLIB_FOUND ON rather than unset it
Fixes #4854
2024-12-03 07:27:41 -06:00
David Capello
f710603f99 Update SDK dirs of all CMakeFiles/*/*.cmake files too (#4773) 2024-12-02 00:19:24 -03:00
David Capello
0905e974cd Add option to update the MSVC cl.exe dir for all builds (#4773)
CMakeCache.txt and other files (rules.ninja, other .cmake files) save
the full path to the cl.exe binary, including the specific MSVC
version. We've added an option to update that specific version to
continue using all builds/configurations with the new updated path to
cl.exe.
2024-12-02 00:07:30 -03:00
David Capello
9b5920eef3 Better handling of auto-scroll cases with BrushPreview boundaries
When auto-scroll is disabled, we can even paint moving the mouse
outside the editor viewport bounds, we should keep moving the brush
preview cursor anyway.

When we touch the editor viewport bounds, this patch:
1) Avoids flickering the cursor in auto-scroll mode, and
2) keeps the cursor moving when auto-scroll move is disabled
2024-12-01 22:49:35 -03:00
David Capello
db56bb9657 Remove ui::hide/show_mouse_cursor() functions
Unused functions as now we always use native custom cursors (or in
case we require this in the future, we could just use an UILayer to
show the mouse cursor).
2024-12-01 22:47:11 -03:00
David Capello
60bd3378fc New UILayers to composite floating elements (fix #4825)
* Replaced ui::Overlays with ui::UILayer
* Refactored BrushPreview to use its own UILayer (+ new blender shader
  for the negative black & white effect).
* Add a default back UILayer to each ui::Display
* Use ui::move_region() in this "back layer" when GPU is disabled.

Although we should completely remove ui::move_region in a future, for
CPU rendering sometimes it's faster to just move memory instead of
redrawing the widgets.
2024-12-01 22:46:37 -03:00
David Capello
fd5ba19e2f Fix compilation error now that Widget::font() returns a FontRef 2024-11-30 12:57:15 -03:00