9911 Commits

Author SHA1 Message Date
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
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
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
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
David Capello
f10bc52b6c Use TextBlobs to paint tabs 2024-11-30 12:49:12 -03:00
David Capello
6b7aa371ce Add benchmark for ui::View scroll
This patch includes a new ui::Manager::dontWaitEvents() function to
avoid waiting for any user interaction. The old editor_benchmark now
uses this new function too.
2024-11-30 09:38:04 -03:00
David Capello
a71909d0ca Add a simple ui::Theme impl
Now ui::Theme is not an abstract class anymore and can be used for
simple tests/benchmarks. Some member functions are empty, but can be
implemented later if needed.
2024-11-30 09:38:04 -03:00
David Capello
ab599c5863 Simplify Font ptrs management in ui-lib returning FontRefs
We can return "const text::FontRef&" to avoid adding a new reference
to an existing FontRef just to access a Style/Widget font.
2024-11-30 09:38:04 -03:00
David Capello
7e780bf3bf Move Theme::fontMgr() impl from app-lib to ui-lib 2024-11-30 09:38:04 -03:00
David Capello
3f591aa5df Try to use TextBlobs to paint ui::Style's text layers 2024-11-30 09:34:51 -03:00
David Capello
9e51e04606 [clang-tidy] Disable misc-include-cleaner 2024-11-30 09:34:26 -03:00
David Capello
c586ac5b14 Add ui::Graphics::drawTextBlob() function 2024-11-30 09:11:57 -03:00
David Capello
1e56e7da5a Merge branch 'main' into beta 2024-11-27 15:35:51 -03:00
David Capello
8241e03612 Fix clang-tidy-review action 2024-11-27 15:20:15 -03:00
Martín Capello
58326b1508 Handle null target in DragEvent (fix #4824) 2024-11-26 09:46:47 -03:00
David Capello
bf430fc3b9 Add missing #include to use LOG() when HAVE_CONFIG_H isn't defined 2024-11-25 15:40:47 -03:00
David Capello
ae9e3583a4 Merge branch 'main' into beta v1.3.11-beta2 2024-11-21 19:09:50 -03:00
David Capello
9bc16e9bec Fix FontPopup style after changing theme 2024-11-21 19:02:39 -03:00
David Capello
ad57997482 Fix font preview/thumbnail in dark mode/any theme (fix #3851) 2024-11-21 19:00:57 -03:00
David Capello
ff993f1687 Paint pinned fonts correctly when multiple windows option is off (fix #4815) 2024-11-21 18:11:01 -03:00