Commit graph

12541 commits

Author SHA1 Message Date
Aurindam Jana
dcef70b0c2
Tweak docs (#6857)
* Collapse Platforms in sidebar

* Add back Lang IntegrationLinkCard

* Style Hero section

* Get in Touch: Use LinkCard
2024-11-20 21:58:30 +01:00
Nigel Breslaw
108e851802
Stop Home Automation demo showing a keyboard on a phone 2024-11-20 21:19:25 +02:00
Nigel Breslaw
0bbe8e7a53
Fix docs build (#6853)
* Fix docs build

* Tweak docs ci to also lint and format
2024-11-20 19:51:21 +01:00
Olivier Goffart
ac2f21a88e docs: translations: Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-11-20 17:26:13 +01:00
Olivier Goffart
900f742d2c Document the bundled translation 2024-11-20 17:26:13 +01:00
Olivier Goffart
eeaf1ba70f Bundled translation: pick the translation from the locale 2024-11-20 17:26:13 +01:00
Olivier Goffart
e67f8007f3
Update feature_request.yaml 2024-11-20 17:24:26 +01:00
Nigel Breslaw
d48b2c3dd7
Fix web projects linting and formatting 2024-11-20 17:05:17 +02:00
Aurindam Jana
0898a5f641
Tweak Docs (#6834)
---------

Co-authored-by: Nigel Breslaw <nigel.breslaw@slint.dev>
2024-11-20 14:27:37 +01:00
Olivier Goffart
f195892376 Fix calling init to all the items on a ListView
This also fix changed event not working as they rely on the init to the setup

Fixes #6836

ChangeLog: fix init and changed callback not always being called in ListView
2024-11-20 14:24:58 +01:00
FloVanGH
bad71b7a13
rust: added ToSharedString trait (#6845) 2024-11-20 13:17:26 +00:00
FloVanGH
2200a64471
added min/max support for rem (#6842) 2024-11-20 10:19:28 +00:00
Olivier Goffart
5bd20def0e Experimental support for MenuBar
Introduces `MenuBar{ ... }` that can be put in a Window
2024-11-20 09:25:37 +01:00
Olivier Goffart
20443ec0df interpreter: add TryInto/From conversion between Value and model
We'll need that to have property of type model in native items
2024-11-20 09:25:37 +01:00
Olivier Goffart
766aa8d95b Prospective CI fix for warnings about unexpected cfg
```
error: unexpected `cfg` condition value: `noop`
  --> api/node/rust/lib.rs:17:1
   |
17 | #[napi]
   | ^^^^^^^
   |
   = note: expected values for `feature` are: `accessibility`, `backend-linuxkms`, `backend-linuxkms-noseat`, `backend-qt`, `backend-winit`, `backend-winit-wayland`, `backend-winit-x11`, `default`, `renderer-femtovg`, `renderer-skia`, `renderer-skia-opengl`, `renderer-skia-vulkan`, `renderer-software`, and `testing`
   = help: consider adding `noop` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `-D unexpected-cfgs` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`
   = note: this error originates in the attribute macro `napi` (in Nightly builds, run with -Z macro-backtrace for more info)

error: unexpected `cfg` condition value: `used_linker`
  --> api/node/rust/lib.rs:17:1
   |
17 | #[napi]
   | ^^^^^^^
   |
   = note: expected values for `feature` are: `accessibility`, `backend-linuxkms`, `backend-linuxkms-noseat`, `backend-qt`, `backend-winit`, `backend-winit-wayland`, `backend-winit-x11`, `default`, `renderer-femtovg`, `renderer-skia`, `renderer-skia-opengl`, `renderer-skia-vulkan`, `renderer-software`, and `testing`
   = help: consider adding `used_linker` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: this error originates in the attribute macro `napi::bindgen_prelude::ctor` (in Nightly builds, run with -Z macro-backtrace for more info)a

...
```
2024-11-20 09:24:55 +01:00
Simon Hausmann
6bd043aede Skia: Remove unnecessary RefCell 2024-11-20 07:25:51 +01:00
Olivier Goffart
73b549a42c bundled translation: Better error reporting
forward the error up the stack instead of panicking while producing the llr
2024-11-19 21:34:42 +01:00
Simon Hausmann
3f8084cdc0 When using Skia with softbuffer and partial rendering, report damages to softbuffer
Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-19 21:31:04 +01:00
Simon Hausmann
a7e04b7d59 Move the partial rendering state into core
... and use from skia as well as the software renderer.
2024-11-19 21:31:04 +01:00
Simon Hausmann
d706f81773 Add support for partial rendering with Skia behind an environment variable 2024-11-19 21:31:04 +01:00
Simon Hausmann
bdb0be64dd Skia: Reduce indentation and fix rustfmt application
Move the closure passed to `WindowInner::draw_contents()` into a
separate function, so that rustfmt works again.
2024-11-19 21:31:04 +01:00
Simon Hausmann
9fdb420d96 Skia: clean up background drawing
Do gradient and solid color fills in one place, instead of two.
2024-11-19 21:31:04 +01:00
Simon Hausmann
e8f319bd77 Implement translation() 2024-11-19 21:31:04 +01:00
Simon Hausmann
9b7de3f806 Pass the buffer age to the Skia software renderer 2024-11-19 21:31:04 +01:00
szecket
db83921f1d hover change and position of window 2024-11-19 20:20:14 +01:00
szecket
0aed233f55 live-preview: move filename and lock height 2024-11-19 20:20:14 +01:00
Tobias Hunger
11169ef149 live-preview: Prettify file names in Selection Popup 2024-11-19 20:20:14 +01:00
Tobias Hunger
defe76649b live-preview: Show hint for right click 2024-11-19 20:20:14 +01:00
Tobias Hunger
f5682ea2e8 live-preview: Fix height calculation 2024-11-19 20:20:14 +01:00
Tobias Hunger
828385b918 live-preview: Sort some properties 2024-11-19 20:20:14 +01:00
Tobias Hunger
004ade9d44 live-preview: Implement a UI for the selection stack 2024-11-19 20:20:14 +01:00
Tobias Hunger
9d5b9fb46a live-preview: Implement a selection stack
... that provides a model containing all the elements
at a position sorted from "front" to "back" with extra
information so that we can present the data in a nice UI
in the next step.

The selection code now filters out builtins and ignore nodes
when collecting nodes. So the following filter step does not
need to take those into account anymore.

Whether a selection candidate is actually a part of the root
component or not is now handled by looking at whether the
elements text range is inside the root component's text
range. This is closer to what users expect to happen I think.
2024-11-19 20:20:14 +01:00
Olivier Goffart
c9de4d94dd printerdemo: Don't use cfg! in the build script
That is compiled on the host. Use the TARGET env variable instead
2024-11-19 17:23:52 +01:00
Aurindam Jana
9d851b7942
fix typo 2024-11-19 13:09:48 +01:00
Aurindam Jana
0f15dc8c55
slint/editors/README.md - Add TOC 2024-11-19 13:09:07 +01:00
dependabot[bot]
f1cf20e212
Bump zephyrproject-rtos/action-zephyr-setup in the github-actions group (#6814)
Bumps the github-actions group with 1 update: [zephyrproject-rtos/action-zephyr-setup](https://github.com/zephyrproject-rtos/action-zephyr-setup).


Updates `zephyrproject-rtos/action-zephyr-setup` from 1.0.3 to 1.0.4
- [Commits](https://github.com/zephyrproject-rtos/action-zephyr-setup/compare/v1.0.3...v1.0.4)

---
updated-dependencies:
- dependency-name: zephyrproject-rtos/action-zephyr-setup
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 13:13:17 +02:00
Nigel Breslaw
bcbf461043
1.9 docs fix types table 2024-11-19 13:11:38 +02:00
Aurindam Jana
3c23187ebf Docs: Update custom.css 2024-11-19 11:04:16 +01:00
Aurindam Jana
873509127d Update Logo for Slint docs
Use the small version of the logo
2024-11-19 10:25:24 +01:00
Tobias Hunger
c514286122 interpreter: Add test for element_node_at_source_position 2024-11-19 10:13:22 +01:00
Milian Wolff
f6da161dbb
Reduce SmolStr <-> &str conversions and copies (#6688)
SmolStr has an Arc internally for large strings. This allows
cheap copies of large strings, but we lose that ability
when we convert the SmolStr to a &str and then reconstruct a
SmolStr from that slice.

I was hoping for some larger gains here, considering the impact
of this code change, but it only removes ~50k allocations,
while the impact on the runtime is not noticeable at all.

Still, I believe this is the right thing to do.

Before:
```
        allocations:            2338981

  Time (mean ± σ):     988.3 ms ±  17.9 ms    [User: 690.2 ms, System: 206.4 ms]
  Range (min … max):   956.4 ms … 1016.3 ms    10 runs
```

After:
```
        allocations:            2287723

  Time (mean ± σ):     989.8 ms ±  23.2 ms    [User: 699.2 ms, System: 197.6 ms]
  Range (min … max):   945.3 ms … 1021.4 ms    10 runs
```
2024-11-19 10:07:16 +01:00
Simon Hausmann
f860c6014d docs: Fix comic sans installation 2024-11-19 09:09:20 +01:00
SuchAFuriousDeath
1b112c9cfc
Implements AsRef<Path>, AsRef<OsStr> for SharedString
Closes #6810
2024-11-19 08:08:09 +01:00
Olivier Goffart
014b58c81a
C++: allow to configure bundled translation 2024-11-18 15:57:08 +01:00
Olivier Goffart
fb6ab7a1b8
Improve github issue templates 2024-11-18 15:56:41 +01:00
szecket
418f279abd
Sub attributes2 (#6749)
* spacing correction

* converted all property value blocks to widgets

* added secondary controls for color and string

* added secondary visuals to make hierarchy more visible

* live-preview: Wire up color widget with the backend

It lets you select colors based on the sliders, but it will
*only* apply the color when you hit enter on the text field
with the color string...

Not nice, but at least it does not keep losing state as it
round-trips the change through the code and compiler and
gets the state reset all the time.

* more dummy data

* cleanup of property sheet based on new controls

* added secondary visuals to make hierarchy more visible

correct extraneous changes

---------

Co-authored-by: Tobias Hunger <tobias.hunger@slint.dev>
2024-11-19 02:55:30 +13:00
Olivier Goffart
e7cf28531d slint-compiler: Don't use signed distance fields by default 2024-11-18 13:24:59 +01:00
Simon Hausmann
179f657a50
Show the exact feature condition around feature-gated types/functions… (#6820) 2024-11-18 13:21:58 +01:00
Olivier Goffart
0dbc029cdc slint-build: Add config option to set the path for bundled translations
Part of #6793
2024-11-18 13:17:18 +01:00
Simon Hausmann
46151e6908 Try to install comic sans via MS corefonts for the docs build 2024-11-18 11:50:22 +01:00