Commit graph

1001 commits

Author SHA1 Message Date
Olivier Goffart
a1f7115ca4 Fix the fancy demo because of its use of @children
Commit 53090ab489 forbid the use of
@children in repeater and conditional elements because it can cause
problem in the cases where the element is referenced (which is not the
case in the fancy demo)

We could try to still allow this case, but it is easier to just fix the
demo.
2022-11-22 17:09:25 +01:00
Olivier Goffart
51933b99bb New syntax for transitions, within the state 2022-11-22 15:16:54 +01:00
Simon Hausmann
809255ea56 Remove the hard-coded USB port from the sample command line
This way the command line can be copied and pasted into a terminal, even
when the USB port differs (for example on macOS). Instead, this now
defaults to a command line that makes espflash prompt, but the added
text explains how to shortcut that.
2022-11-21 15:29:49 +01:00
Simon Hausmann
9c7cb54b34 mcu: Add support for the ESP32-S3 box
This is a work-in-progress.

Similar to the S2 Kaluga board, this provides the basic support for
showing pixels on the screen of the S3 Box. There is no support for
touch input yet, or any of the button peripherals. There is also a bug
somewhere that causes the printerdemo_mcu to raise an uncaught
exception. Only a content-reduced version of the printer demo shows on
the screen.
2022-11-21 15:29:49 +01:00
Simon Hausmann
f3b3519278 Fix typo 2022-11-21 15:29:49 +01:00
Simon Hausmann
85df47966e Remove stray whitespace 2022-11-18 19:42:29 +01:00
Florian Blasius
e125fae9f5 carousel: fix run with simulator 2022-11-16 09:53:21 +01:00
Simon Hausmann
3ca1fbde88 janitor: remove duplicate crate dependency 2022-11-15 12:08:48 +01:00
Florian Blasius
61c39b5fa1 Add support for dispatching key events through the public platform API
This change adds `KeyPress` and `KeyRelease` variants to the
`WindowEvent` enum, along with the new `slint::Key` enum, that allows
encoding keys.
2022-11-15 10:34:17 +01:00
Florian Blasius
575f093baf
Fixed: md TextEdit text not displayed (#1854) 2022-11-14 13:40:32 +01:00
Florian Blasius
ae2ec82263
Fix: unload old window in wasm gallery now correctly (#1838) 2022-11-11 09:59:02 +01:00
Olivier Goffart
2b92d4b4a3
gallery demo: update the instructions in index.html
it now needs to be build twice for the two styles
2022-11-10 07:56:49 +01:00
Florian Blasius
a3e1f9f246
Design refresh of the gallery example (#1820)
* Visual refresh of the gallery example
* Add new Navigation
* Improve layout
* Fix layout behavior of material GroupBox
2022-11-09 14:39:16 +01:00
Florian Blasius
a2838bb6ce
Add style selection to gallery (#1826)
Add a style selection drop down for fluent and material to the gallery web export
2022-11-09 12:52:18 +01:00
ogoffart
2171773a3e Bump version number to 0.3.2 2022-10-28 09:30:14 +00:00
Simon Hausmann
620ab47430 Fix the iot-dashboard rendering in dark mode 2022-10-27 11:41:26 +02:00
Olivier Goffart
8fa6bbb244 MCU: use a git version of the whole rp-pico crate instead of a patch of rp2040-hal
Since rp-pico and rp2040-hal are in the same repo now, that works.
This will prevent warnings when building things with the example
disabled

```
Patch `rp2040-hal v0.6.0 (https://github.com/slint-ui/rp-hal/?branch=dma-0.6#49af1f92)` was not used in the crate graph.
```
2022-10-26 14:43:02 +02:00
Florian Blasius
a4313c3e32
API changes for SortModel and FilterModel (rust and cpp) (#1768)
* Rust SortModel: Rename parameter `S` to `F`
* Rust SortModel: Rename parameter `apply_sorting` to `reset`
* Rust FilterModel: Rename parameter `apply_filter` to `reset`
* C++ SortModel: Rename parameter `sort_fn` to `comp`
* C++ SortModel: Add pub reset function
* C++ FilterModel: Rename parameter `apply_filter` to `reset`
2022-10-26 11:16:12 +02:00
Olivier Goffart
580b1375cb carousel: use "mcu-board-support" as feature name, so it is easier to use
then we just enable the support for the pico with --features=mcu-board-support/pico-st7789
2022-10-20 08:01:34 +02:00
Olivier Goffart
4bceea333d Fix compile of the STM32h7 port, and outdated feature in the MCU readme 2022-10-19 15:34:04 +02:00
Florian Blasius
b87705aa56
Add mcu support to the carousel example (#1744)
The carousel example can be now also run on the supported mcu devices
2022-10-19 14:54:39 +02:00
Florian Blasius
e5bf4c05de
Add example for custom carousel widget (#1739)
Add a new example that contains a custom carousel widget
2022-10-18 14:01:17 +02:00
Olivier Goffart
9f312102b1 Update stm32h7xx-hal 2022-10-17 16:47:36 +02:00
Olivier Goffart
34024de8ee Update esp32s2-hal
btw, with the new toolchain, the artifacts (bad size of images) are gone
2022-10-17 15:58:59 +02:00
Florian Blasius
129ee0acae
Florian/sort todo (#1721)
Implement `set_row_data` for `SortModel` and `FilterModel` (rust and cpp). Add sort and filter example to the todo example.
2022-10-11 18:58:00 +02:00
Be
ecb6fd5309 switch to yeslogic-fontconfig-sys from servo-fontconfig
This allows setting the RUST_FONTCONFIG_DLOPEN environment variable
to dlopen fontconfig at runtime rather than linking it at build
time. This is helpful for cross compiling to Linux, particularly
because fontconfig has lots of C dependencies. Building a vendored
copy of fontconfig does not work as expected:
https://github.com/slint-ui/slint/issues/88
2022-10-05 15:21:54 +02:00
Simon Hausmann
7f0b68b224 Rephrase the flash section for the pico
Separate installation and usage:

1. Install elf2uf2-rs
2. Linux: unmount
3. Run elf2uf2-rs to flash
2022-09-29 09:20:16 +02:00
Simon Hausmann
afa63bbb9c
Fix command line for deploying to the pico with elf2uf2-rs 2022-09-28 13:22:23 +02:00
Simon Hausmann
1581b22042
Fix typo 2022-09-28 13:20:46 +02:00
ogoffart
261614b914 Bump version number to 0.3.1 2022-09-15 14:39:51 +02:00
Olivier Goffart
419016a356 Rename the compat feature again
crates.io won't let us upload a feature with dots in it:

```
Uploading slint-interpreter v0.3.0 (/home/olivier/slint/internal/interpreter)
error: failed to publish to registry at https://crates.io

Caused by:
  the remote server responded with an error: invalid upload request: invalid value: string "compat-0.3.0", expected a valid feature name at line 1 column 2254
```
2022-09-14 15:55:57 +02:00
Olivier Goffart
cda0f99689 mcu_printerdemo: remove the chrono feature
It is not working on MCUs anyway, so this just simplifies the code
2022-09-14 09:12:32 +02:00
Olivier Goffart
29d05bac66 printerdemo_mcu: tweak the features
- rename the mcu-simulator feature to just "simulator" (the mcu is
   redundent)
 - Don't forward other feature than the simulator from the board support
   crate. (i don't want to have to forward all features from all
   examples)
 - default to the simulator (doesn't compile without any feature
   otherwise, leads to error in rust-analyzer)
2022-09-14 09:12:32 +02:00
Olivier Goffart
9bef6f519a Update to next version of st7789 2022-09-12 16:02:10 +02:00
Simon Hausmann
8ee88a53c1
MCU Doc fixes (#1615)
Various edits to the introduction of how to use Slint on MCUs.
2022-09-09 08:35:01 +02:00
Simon Hausmann
2b59523a38 Fix markdown link syntax 2022-09-08 11:27:35 +02:00
Olivier Goffart
abbf1edd91 Better error message when using the software renderer with a .slint file not compiled for it 2022-09-07 17:11:57 +02:00
Olivier Goffart
8850959a2c Rename the backend feature flags 2022-09-07 17:11:57 +02:00
Olivier Goffart
15fa69ef55 Rename the compat-0-2-0 feature to compat-0.3.0
But keep a compat-0-2-0 fome compatibility anyway
2022-09-07 14:09:07 +02:00
Olivier Goffart
6ede77436b api: Return an error from invoke_from_event_loop and quit_event_loop 2022-09-07 10:13:58 +02:00
Tobias Hunger
639dcaf702 api: Rename module swrenderer to software_renderer
Also rename the `swrenderer` feature to `software-renderer`.
2022-09-07 10:11:11 +02:00
ogoffart
05a49da906 Bump version number to 0.3.0 2022-09-06 13:00:22 +02:00
Olivier Goffart
8ebcfd81b8 Gallery example: move the checkbox on another line 2022-09-05 13:08:27 +02:00
Olivier Goffart
0085145d10 MCU documentation 2022-09-04 18:31:26 +02:00
Simon Hausmann
f648f152f9 Improve debug_log interface in the Platform
Pass Arguments and let the caller decide how/when to convert to a string.
2022-09-02 20:13:41 +02:00
Simon Hausmann
437218db70 Replace the built-in defmt debug logging to the platform trait
This way we don't have to add defmt, esp32-println and others as features to corelib and the slint api crate
(which would also expose them as public dependencies),
but instead this can be simply delegated to the Platform trait.
2022-09-02 20:13:41 +02:00
Olivier Goffart
ab5fcfd234
Update link in the printerdemo_mcu README 2022-09-02 14:12:36 +02:00
Olivier Goffart
ed8fba7041 Add license header to make reuse happy 2022-09-02 11:57:27 +02:00
Olivier Goffart
7d3c47cff2 esp32: implement duration_since_start 2022-09-02 11:57:27 +02:00
Olivier Goffart
f1964e75bd WIP: initial support of the ESP32-S2-Kaluga-1 2022-09-02 11:57:27 +02:00