Commit graph

1,792 commits

Author SHA1 Message Date
Admin
b6c45297f4 fix 2026-03-01 10:28:49 +01:00
Admin
1632445402 fix 2026-03-01 10:24:21 +01:00
Admin
01a4985e86 backend proto splitoff 2026-03-01 10:12:00 +01:00
Admin
6712047ece fixes 2026-02-28 23:41:15 +01:00
Admin
9c4dcebdc6 fix better errors 2026-02-28 23:19:25 +01:00
Admin
79ac8d834f makepad studio old 2026-02-28 22:42:57 +01:00
Admin
051557c569 studio2 2026-02-28 22:30:21 +01:00
Admin
084c3df5bc better vfs threading 2026-02-28 22:29:48 +01:00
Admin
0bffb98f28 studio2 otw 2026-02-28 21:27:26 +01:00
Admin
52ed7f698b studio2 otw 2026-02-28 17:22:50 +01:00
Admin
a8599a4b22 fix 2026-02-28 12:48:06 +01:00
Admin
6c8716a121 add cx module 2026-02-28 12:35:13 +01:00
Admin
952e6134a9 plaintext error 2026-02-28 11:40:11 +01:00
offline-ant
0ce6ec05e8
Apple metal and compile updates (#903)
Merge actool partial Info.plist into main plist for iOS 15 icon support.

Co-authored-by: ant <ant@offline.click>
2026-02-28 11:36:48 +01:00
offline-ant
d544b7335b
ios: use CVPixelBuffer-first GL/Metal bridge path (#904)
Co-authored-by: ant <ant@offline.click>
2026-02-28 11:17:48 +01:00
offline-ant
3b2e5730ae
trigger redraw on Screenshot request in windowed mode (#905)
dispatch_studio_msg pushed to screenshot_requests but never
triggered a redraw. The GL readback that captures the screenshot
only runs during the render path, so the request was never
serviced in windowed backends (Wayland, X11, macOS).

Co-authored-by: ant <ant@offline.click>
2026-02-28 11:17:35 +01:00
offline-ant
445e74de24
platform: add custom studio app message events (#906)
Co-authored-by: ant <ant@offline.click>
2026-02-28 11:17:10 +01:00
offline-ant
f0907d6782
Fix missing app icons on iOS 15 by adding classic idiom entries to asset catalog (#902)
The Contents.json only had a single universal+platform entry, which is
only recognized by iOS 16+. Add classic per-idiom entries (iphone, ipad,
ios-marketing) so actool compiles both sets into Assets.car. iOS 15
falls back to the idiom-based entries.

Co-authored-by: ant <ant@offline.click>
2026-02-28 11:16:59 +01:00
offline-ant
975e766c1a
Font loading: defer registration to draw-time, add fast-path completeness check (#901)
Move font family registration out of on_custom_apply (script apply time)
and into ensure_fonts_loaded (draw time). This avoids redundant work when
the same FontFamily is applied to hundreds of widgets during a frame.

ensure_fonts_loaded now has a fast path that checks is_font_family_complete()
and returns immediately when all expected members are already registered.
The slow path calls load_all_script_resources() to progress pending loads
before falling back to update_font_definitions().

Other changes:
- FontFamilyDefinition gains expected_member_count to distinguish partial
  from complete registrations.
- set_font_family_definition skips cache eviction when the definition or
  cached family is already equivalent.
- load_font_family now clones the definition instead of removing it,
  allowing re-loads after cache eviction without losing the definition.
- Loader::font_family_definitions and Layouter::loader are now pub(crate)
  to support the completeness query from Fonts.

---

Review observations (not yet addressed):

1. STALE FAMILY ON RE-APPLY (medium risk): If a FontFamily is re-applied
   with different members but the same object index (same family_id), the
   fast path in ensure_fonts_loaded will see the old definition as
   "complete" and never call update_font_definitions with the new members.
   Fix: compare current member handles against stored definition, or set a
   dirty flag in on_custom_apply that forces one refresh.

2. UNNECESSARY LAYOUT CACHE FLUSH (medium risk): Layouter::set_font_family_definition
   unconditionally clears cached_params and cached_results even when
   Loader::set_font_family_definition short-circuits as unchanged. During
   partial-load states ensure_fonts_loaded may call update repeatedly with
   identical partial definitions, flushing the text layout cache each time.
   Fix: propagate a changed bool from Loader and only clear when true.

3. COMPLETENESS IGNORES CACHE-ONLY STATE (low risk): is_font_family_complete
   only checks font_family_definitions, not font_family_cache. If a family
   was already loaded into cache and its definition consumed, completeness
   returns false. The new early-return in set_font_family_definition for
   cache-match mitigates this in practice but the invariant is fragile.
   Fix: also check font_family_cache in is_font_family_complete, or ensure
   definitions are always retained (which this diff partly does by switching
   from remove to get+clone in load_font_family).

Co-authored-by: ant <ant@offline.click>
2026-02-28 10:29:36 +01:00
Julián Montes de Oca
ecb5e7ffae
Video Widget: Support on More Platforms (#867)
* Add support for Video widget on WASM

* Add support for Video widget on Linux

* Linux video:  GStreamer appsink pipeline, GL texture upload, accurate seeking

* Add support for Video widget on Windows

* Harden cross-platform video playback and error handling

* Cleanup video playback logs

* Restore wasm builds

* Restore linux builds

* Restore linux builds

* Remove unused import
2026-02-27 18:52:49 +01:00
Admin
8b6ccc0d85 centralised resource cache 2026-02-27 16:55:05 +01:00
offline-ant
e1d3653de2
iOS: app icons, fullscreen, iOS 15 support, GL texture fix, NSLog logging (#897)
Co-authored-by: ant <ant@offline.click>
2026-02-27 16:42:47 +01:00
offline-ant
af684756c9
Font optimization: reduce atlas 64MB→4MB, use static data for builtins (#898)
Co-authored-by: ant <ant@offline.click>
2026-02-27 16:39:38 +01:00
offline-ant
855f52f5cc
deduplicate script resources by file path (#899)
file_resource and crate_resource now check if a resource with the same
abs_path already exists before creating a new entry. Returns the existing
handle instead of reading the same file multiple times.

Before: 54 resource entries, same font files loaded up to 15 times each
(427MB of duplicate heap data). After: ~10 unique entries, each file
loaded once (~50MB).

Co-authored-by: ant <ant@offline.click>
2026-02-27 16:38:00 +01:00
Admin
82fb692b05 override play 2026-02-27 10:28:00 +01:00
Admin
dd4c79b1e1 add get_color to draw_glyph 2026-02-27 09:39:21 +01:00
offline-ant
fdc918a890
iOS: GL render bridge (EAGL+IOSurface) and ios build command (#894)
* iOS: add GL render bridge (EAGL+IOSurface), fix linking, fix warnings

- Add EaglRenderBridge for iOS (GLES 3.0 context sharing textures with
  Metal via IOSurface), mirroring macOS CglRenderBridge
- Add iOS GlRenderBridge inner field and Cx methods
  (create_gl_render_bridge, create_gl_render_bridge_texture, restore_gl_context)
- Widen IOSurface support from macos-only to macos/ios/tvos in apple_sys
  and metal.rs (CxOsTexture fields, update_shared_texture, etc.)
- Expose metal_device() accessor on IosApp
- Replace removed SSLSetEnableCertVerify with SSLSetSessionOption
  (kSSLSessionOptionBreakOnServerAuth) to fix iOS linker error
- Remove unused apple_util::* imports in ios.rs and ios_app.rs
- Fix iOS deployment target from 26.0 to 17.0 in cargo_makepad

* cargo-makepad: add apple ios build command, expose IosBuildResult fields

---------

Co-authored-by: ant <ant@offline.click>
2026-02-27 08:40:41 +01:00
offline-ant
f71bdf48f7
android: add launch splash themes to cargo-makepad manifests (#895)
Co-authored-by: ant <ant@offline.click>
2026-02-27 08:40:26 +01:00
offline-ant
4f34bce7ee
cargo-makepad: isolate android/apple target dirs from desktop builds (#896)
Android defaults to target/android/, apple to target/apple/.
Prevents cross-platform builds from invalidating each other's caches.

Co-authored-by: ant <ant@offline.click>
2026-02-27 08:40:14 +01:00
Admin
04e4c51ab8 implicit io markers 2026-02-27 08:36:46 +01:00
Admin
deaf6303d7 studio2 otw 2026-02-26 21:07:27 +01:00
offline-ant
b3cec2dd2d
cargo-makepad android: use crate name for Rust .so lookup (#893)
Co-authored-by: ant <ant@offline.click>
2026-02-26 20:00:04 +01:00
Admin
8ac86f0666 fix up voice build on non tahoe 2026-02-26 15:22:40 +01:00
Julián Montes de Oca
0675c98cc8
Restore StackNavigation widget, add examples to ui-zoo (#892) 2026-02-26 13:54:36 +01:00
alanpoon
7bee85bb3e
agent_acp (#888) 2026-02-26 11:36:12 +01:00
offline-ant
8549e70668
gl_render_bridge: fix Android EGL wiring and reset GL state on restore (#889)
Fix EGL context initialization on Android to properly wire up the GL
render bridge display/context/surface.

Add GL state reset in restore_gl_context on Linux/Android to prevent
state leakage from external GL consumers (e.g. Servo) back into the
Makepad render pipeline.

Co-authored-by: ant <ant@offline.click>
2026-02-26 11:35:54 +01:00
offline-ant
31f2a41038
cargo-makepad: cross-platform icon build pipeline and desktop packaging (#890)
Refactor app icon handling into a unified app_icon module that replaces
the old window_icon.rs. Build-time icon generation produces platform-
native formats (ICO with multiple sizes for Windows, ICNS for macOS,
multi-resolution PNGs for Linux/Wayland/X11).

Add `cargo makepad desktop` subcommand for desktop packaging with
automatic icon detection from MAKEPAD_APP_ICON_PATH env var, or from
Cargo package metadata.

Resolve binary names from [[bin]] targets in Cargo.toml so .app bundles,
.exe outputs, and APK labels use the correct name instead of defaulting
to the package name.

Use llvm-rc for Windows .res generation (cross-compilation compatible)
with absolute link paths for reliable resource embedding.

Co-authored-by: ant <ant@offline.click>
2026-02-26 11:33:26 +01:00
offline-ant
a00db2bf04
FOOTGUN FIX: panic on nil return from script_mod! in from_script_mod (#891)
When script_mod! is used with 'let app = startup() do ...' but the
block omits the final 'app' expression, the module returns nil. This
silently creates an App with an empty WidgetRef -- no window, no UI,
no error. The app runs indefinitely doing nothing.

Panic with an actionable message instead of silently succeeding.

Co-authored-by: ant <ant@offline.click>
2026-02-26 11:32:47 +01:00
Admin
8b42b20198 restore merge script 2026-02-26 10:09:28 +01:00
Admin
9cf7fbb8b7 new merge script 2026-02-26 10:08:25 +01:00
Admin
813844becc counter splash example 2026-02-26 10:08:25 +01:00
Admin
22ebf59337 text layout
\
2026-02-26 10:08:22 +01:00
offline-ant
690be7c85d
widgets: add Label visible live property support (#885)
Co-authored-by: ant <ant@offline.click>
2026-02-26 08:24:29 +01:00
Kevin Boos
3db5766d33
Fix circle view (#887)
* Fix `CircleView` shader, support true circle shader behavior

Add CircleView examples w/ variety to `uizoo`

* splash example: fix popup notification behavior
2026-02-26 08:17:49 +01:00
admin
ddca609ad8 api 2026-02-25 17:14:39 +01:00
Kevin Boos
d1737883da
FIx Icon, improve to support IconRotated, expose geom in draw_svg (#883)
* Fix draw_svg to support a rotated Icon. Add `IconRotated` widget.

Fix icon resource paths in `splash` example

* Expose geometry in draw_svg to make icon/svg rotation more efficient

simplifies the code too
2026-02-25 13:05:14 +01:00
offline-ant
8f3451c5cb
restore set_window_icon lost during rebase of #877 (#880)
The rebase squash into 26318769 used the early draft of window_icon.rs,
dropping the OnceLock-based global setter added in the fixup commit.

Restore from pre-rebase commit 83bf5d62:
- add static GLOBAL_ICON: OnceLock<WindowIcon>
- add pub fn set_window_icon(icon: WindowIcon)
- refactor default_window_icon() to check global override first
- re-export set_window_icon from platform lib.rs

Co-authored-by: ant <ant@offline.click>
2026-02-25 13:05:00 +01:00
Sabin Regmi
ec983c982a
Remove left margin from window caption label (#884)
* Remove left margin from window caption label

Delete the hardcoded Inset{left: 100} margin on the caption Label in widgets/src/window.rs so the label can be centered by the parent layout. This cleans up alignment and removes an unnecessary offset in the window header.

* Use window title in caption; format button click

Apply the configured window title to the window caption and make a small UI code cleanup.

- examples/splash: set window.title to "Splash Example" and reformat the tooltip button click check to a multiline expression for readability.
- widgets/src/window.rs: import label::* and update ensure_initialized to copy cx.windows[window_id].create_title into the caption_label when non-empty so the window chrome shows the configured title.
2026-02-25 13:04:46 +01:00
Admin
33eeb0d244 little glitches in script engine 2026-02-24 23:32:56 +01:00
Admin
8aab18f4d9 warnings 2026-02-24 21:43:35 +01:00