Commit graph

99 commits

Author SHA1 Message Date
Olivier Goffart
109878cd81 WIP: attempt to update the usecase demo for the P4 2025-02-17 14:48:54 +01:00
autofix-ci[bot]
650e0ef775 [autofix.ci] apply automated fixes 2025-02-16 14:04:13 +00:00
Simon Hausmann
607d70b3fa Python: run mypy on the tests 2025-02-16 08:58:47 +00:00
FloVanGH
d3c56e1f1f
added usecases demo (#7603)
* [autofix.ci] apply automated fixes

* Update demos/usecases/esp-idf/README.md

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>

* Update demos/usecases/esp-idf/rust-toolchain.toml

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2025-02-12 08:59:33 +00:00
Simon Hausmann
39f25adb55 Fix running Python examples
Match the python version requirement with Slint, otherwise uv complains.
2025-02-10 08:05:44 +01:00
Simon Hausmann
c46846b3cb
Switch Python tooling over from pipenv to uv (#7574)
It's faster and easier to use.
2025-02-09 12:09:23 +01:00
Yuri Astrakhan
9621cae218 Auto-fixed clippy::needless_lifetimes
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.

See https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes

```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::needless_lifetimes

cargo fmt --all
```
2025-02-07 09:20:49 +01:00
Yuri Astrakhan
6324b35e94 Auto-fixed clippy::needless_borrow
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.

See https://rust-lang.github.io/rust-clippy/master/index.html#/needless_borrow

```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::needless_borrow

cargo fmt --all
```
2025-02-07 09:02:45 +01:00
Yuri Astrakhan
4ae2627ade A few more format arg inlining
Used these commands and some manual searching

```
cargo clippy --fix  --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --all-targets -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2025-02-07 06:43:19 +01:00
Tasuku Suzuki
ad61d029e5 Demo: fix documentation link to mcu-board-support 2025-01-28 06:25:22 +01:00
Simon Hausmann
7ba44271af CI: Fix esp-idf build
Pin espressif/button to a version that compiles.
2025-01-24 15:07:19 +01:00
Olivier Goffart
8a5df27469
Update to Image 0.25 (#7365)
Added image-default-formats with all the format supported by image by
default, and enable that feature by default.
Also put that feature in compat-1-2 for compatibility with user that
have used image 0.24 with enabled features.
Make a new compat-1-10 feature that does not enable default format by
default

ChangeLog: upgraded image crate to 0.25, added a new cargo feature
to enable all image formats. (that feature is enabled by default with
compat-1-2, added compat-1-10 to disable it

Fixes https://github.com/slint-ui/slint/issues/7251
2025-01-14 16:31:05 +01:00
Olivier Goffart
c1bab16d6d Janitor: dependencies update 2025-01-14 10:48:46 +01:00
ogoffart
c83af3ca5c Bump version number to 1.10.0 2025-01-13 13:38:41 +00:00
Simon Hausmann
f5909807ea esp-idf: Rename SlintPlatformConfiguration's color_swap to byte_swap and deprecate color_swap_16 2025-01-13 14:27:37 +01:00
Tasuku Suzuki
346d1c2df3 Fix typos
Ran `typos .` and fixed all typos that do make sense.
https://crates.io/crates/typos
2025-01-13 08:35:20 +01:00
Olivier Goffart
3e94bd2167 Janitor: Remove trailing whitespaces from all files
`git grep -I -l -O'sed -i "s/[[:space:]]*$//"' -e ''`
2025-01-10 13:23:22 +01:00
Nathan Collins
4e709e192a Increase the printer demo back button TouchArea size
Make the back button easier to hit on embedded touch devices.
2025-01-09 19:42:12 +01:00
Nathan Collins
43ed37e5bb Make the printer demo dark mode button easier to hit
Previously, the dark mode button was especially hard to hit on
embedded devices.

The TouchArea of the SideBarIcon used for this button was much smaller
than the others. By exposing a new property on the SideBarIcon:
icon-colorize, we can customize the colorize behaviour of the Image,
as well as the source. This allows us to re-use the internal Image for
the dark mode button. This allows us to use the default width, height
and x position of the icon. The touch areas of the sidebar buttons are
now uniform.
2025-01-09 19:42:12 +01:00
Nathan Collins
d1be6f69fd printerdemo_mcu PrinterQueueItem uses a status string
Use a string instead of the JobStatus enum.

This makes the PrinterQueue code compatible with the printerdemo code,
allowing us to switch between mcu and non-mcu versions of this demo,
depending on what will fit on a device.

A string is used, rather than porting the non-mcu demo to an enum,
because the non-mcu demo needs to work with the cpp_interpreted demo.
2025-01-02 13:54:53 +01:00
Nathan Collins
878b12a377 Use the zephyr,touch device tree entry for input handling
Zephyr have recently added this device tree entry to provide a common
interface for input handlers.

This means we can remove the overlay required for the i.MX RT1170
shield, and remove our modifications some of our modifications for the
native sim. It also means that we don't have to make device tree
modifications to support other boards in the future.
2025-01-02 13:52:18 +01:00
Nathan Collins
30d10667a4 Upgrade to Zephyr v4.0.0
This gives us access to the new `zephyr,touch` device tree entry,
which will allow us to produce a more generic touch input handler.

INPUT_CALLBACK_DEFINE and the input callback now require `void *`
argument for user data. For now we leave this unused.
2025-01-02 13:52:18 +01:00
ogoffart
f309a551b5 Bump version number to 1.9.2 2024-12-30 10:18:16 +00:00
Nathan Collins
33dbdbc0ed Zephyr: improve render performance when using the NXP ELCDIF driver
When this driver is using the DMA API, we cannot do partial updates.
Previously, this code would then perform a full-screen DMA transfer for
each region the renderer changes. Now we make modifications to the pixel
data of the dirty regions, if required, and then do one fill-scren DMA
transfer of the final render buffer.
2024-12-19 16:08:08 +01:00
aurindam
dc3f29b6da Bump version number to 1.9.1 2024-12-19 12:57:19 +00:00
Olivier Goffart
fff19b329b Add explicit width and height to demo svg
Workaround for #6715
In the wasm interpreted, we use an `<img>` tag to load images, but that
cannot get the default svg size without an explicit width and height
2024-12-16 19:05:44 +01:00
szecket
bf66b9756f
hack to keep focus as hover steals it (#7093) 2024-12-13 16:59:15 -05:00
Olivier Goffart
a3dad45f0b Accessibility: rename a few properties after API review:
- Rename `accessible-selectable` and `accessible-selected` to `accessible-item-{selectable,selected}`.
   Because the property is for items in list rather than eg Text
 - Rename `accessible-position-in-set` to `accessible-item-index`.
 - Rename `accessible-size-of-set` to `accessible-item-count` and move
   the property to the container element rather than the item itself
2024-12-07 08:25:42 +01:00
Nigel Breslaw
92534a8a27
1.9 Organise docs folder. (#7005)
Move astro files to docs/astro
2024-12-05 15:40:04 +02:00
Nigel Breslaw
4c1ececc67
1.9 docs: Flesh out docs guide 2024-12-05 00:19:37 +02:00
Simon Hausmann
fd34bab425 Fix French translation not working in WASM build of printer demo
(For me this was also reproducible on desktop, but oddly not for
Olivier)

Letters like é were stripped from the noto sans font used by the demo,
and with FemtoVG we assume that presense of a character in the common
script implies full coverage (to avoid having to check every character).

Fix this by fixing the font itself. We wouldn't want those letters to
come from DejaVu :)
2024-12-02 14:46:57 +01:00
Simon Hausmann
a7461956ab Speed up the home automation's lock screen
Don't redraw the entire scene underneath every time the LEDs are
animated. Instead, cache it into one large layer. The scene is
reasonabley complex that this justifies the expense of the additional
memory throughput.
2024-11-28 10:39:16 +01:00
dependabot[bot]
ad8a23571a
build(deps): bump @biomejs/biome from 1.9.3 to 1.9.4 (#6863)
* build(deps): bump @biomejs/biome from 1.9.3 to 1.9.4

Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.9.3 to 1.9.4.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/cli/v1.9.4/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* format:fix

* Ignore lint item

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nigel Breslaw <nigel.breslaw@slint.dev>
2024-11-21 00:28:19 +02:00
Nigel Breslaw
108e851802
Stop Home Automation demo showing a keyboard on a phone 2024-11-20 21:19:25 +02: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
Olivier Goffart
014b58c81a
C++: allow to configure bundled translation 2024-11-18 15:57:08 +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
Update Translations Bot
74e23881b5 Update Translations: extract strings 2024-11-18 03:16:35 +00:00
Olivier Goffart
d68b84a3f1
Change API to set the language with bundle translation
* Change API to set the language with bundle translation

Part of #6793
2024-11-17 11:40:02 +01:00
Simon Hausmann
65fb9d84b4 Correct and simplify Node demo/examples instructions 2024-11-14 14:10:02 +01:00
Simon Hausmann
9f7e407eff Fix fallback to source builds
Continue to run build-on-demand.mjs to permit a fallback to a
from-source build for users who run `npm install slint-ui` on a platform
where we don't provide binaries for (such as linux-armv7/64). However,
this is only done when run from the installed package, not from git.
From git, the prestart trick remains in use.
2024-11-14 12:25:42 +01:00
Nigel Breslaw
0461abfc73 Avoid building Rust on pnpm install 2024-11-14 12:25:42 +01:00
Nigel Breslaw
892471205e
Home Automation fixes
Fix for incorrect sized SVG on web.
Fix for incorrect gradient on HVAC for web.
Fix for opacity animation not being triggered.
Fix for README having incorrect copy paste info.
2024-11-12 17:05:11 +02:00
Nigel Breslaw
5bd6c4b951
Improve the resolution the Home Automation demo runs at 2024-10-30 20:01:21 +02:00
Simon Hausmann
e01a121165 Move weather demo to demos/ sub-folder 2024-10-26 09:39:52 +02:00
Simon Hausmann
1eb30a484a Fix home-automation wasm loading 2024-10-25 17:15:46 +02:00
Nigel Breslaw
8ba87950ae
Add fonts back to Home Auto demo 2024-10-25 18:07:36 +03:00
Nigel Breslaw
e0557536a6
Add new home-automation demo (#6654) 2024-10-25 15:55:03 +02:00
Simon Hausmann
a98d4709be Move printer demo and energy-monitor into new top-level demos/ folder
These are showing off use-cases for Slint, but they're not examples showing individual Slint features.

Also removed the old printerdemo while at it.
2024-10-25 12:09:32 +02:00