Motivation: the git pre-commit hook is confused by the mix of 2021 and
2024 in the same workspace...
The only problem this raises is the std::env::set_var("LANGUAGE", lang) in
demos/printerdemo/rust/lib.rs, pre-existing but now explicitly marked as unsafe
because it actually is. Added a TODO there.
They should be in the lines, but the problem is that this causes issues
in the .mdx files.
License header doesn't really make sense for .md files anyway
- Bundle translations for WASM/Android only (not for native builds)
- Load Noto Sans CJK fonts dynamically from GitHub at runtime
- Implement register_font_from_memory() with Result<FontHandle, RegisterFontError>
- Make API automatically available with std feature (no explicit feature flag needed)
- Export load_font_from_bytes() for WASM font loading from JavaScript
- Change from wasm_bindgen(start) to explicit main() call for better control
Fonts are loaded before app initialization to ensure proper CJK text
rendering across all major browsers without bundling font files.
Native builds load translations from lang/ directory at runtime.
WASM/Android builds bundle translations at compile time and detect
browser/system language automatically.
API is now available when std feature is enabled, since we always
have fontique with std. No need for experimental-register-font feature.
This adds an icon that is displayed to the left of the title, and is
also shown for Menus are inside of a parent menu.
Closes#7791
ChangeLog: Added icon property to MenuItem and Menu
... using taplo with default settings
I tried this with 4 spaces indentation, but the patch is almost as
big as this one, so I went with default settings instead as that
is just easier:-)
`ContextMenu` -> `ContextMenuArea`
`ContextMenu` must have a `Menu` child.
`MenuItem` can no longer be put dirrectly in `MenuBar` and can no longer
have children
`Menu` is used now for sub menus
The accessible-delegate-focus property is currently confused by the presence of the label at the top, since it expects an index in the accessible children list. Therefore the focused item would be off by one as far as assistive technologies are concerned.
I also had to move the FocusScope because accessible-delegate-focus is searched for in the ancestors of the element which is focused.
The tablist is now properly reported. Unfortunately these changes raise a more confusing bug: focus changes inside the tablist (using the arrow keys) don't seem to trigger a rebuild of the tree. When a tab is selected it is properly reported though. Even stranger: the focus changes are triggered if the focus is on the sidebar, when the toplevel window gains focus. Tabbing out of the sidebar and back on triggers the bug again though.
* Update examples/gallery/main.cpp
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update examples/gallery/main.cpp
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Avoid conversion to std::string as SharedString also offers a string_view and std::string::find takes a StringViewLike
* Update examples/gallery/main.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>