Commit graph

1676 commits

Author SHA1 Message Date
Olivier Goffart
d0896e6360 Update the README of new demos 2024-09-24 16:51:46 +02:00
Nigel Breslaw
a6ca636d07
SpriteSheet demo
Simple demo showing how to create a SpriteSheet via the Image element.
2024-09-24 15:59:15 +03:00
Simon Hausmann
29804f34de Fix WASM version of OpenGL underlay example
Commit 3cb636169506262d96ec2bc53a617714d5ab068d in femtovg switched to
using WeblGL to (needed for tiling). This means the GraphicsAPI::WebGL
context type needs to be updated, too. Also, the canvas_id was always
empty, but needs to be initialized from the id of the element we're
using.
2024-09-24 10:47:15 +02:00
Enyium
9894eca229 Fixed kebab casing of previous appwindow.slint. 2024-09-20 10:26:49 +02:00
Update Translations Bot
f2dccaa42d Update Translations: extract strings 2024-09-20 03:05:57 +00:00
Simon Hausmann
754922f965 Remove stray debug properties 2024-09-19 08:21:28 +02:00
Update Translations Bot
725b0c9ca1 Update Translations: extract strings 2024-09-19 03:05:47 +00:00
Simon Hausmann
cd2b738c7a Rename SwipeGestureRecognizer to SwipeGestureHandler
The origin of this proposal is the name of the `swipe-left`, etc.
directional, boolean properties. They're missing another verb in their
name. In principle the right choice would be "recognize". That is what
the type name suggests, that's the term the documentation uses, so the
code should read `recognize-swipe-left: true;`. However that is a long
word. "Handle" is a verb that's simpler. It's also more generic (that's
a downside), but it's otherwise short enough to make things look
"right":

```
SwipeGestureHandler {
    handle-swipe-left: true;
    swiped => { something.naviate-left(); }
}
```

Therefore this patch proposes to rename the type to SwipeGestureHandler
and prefixes the boolean directional properties with "handle".
2024-09-18 16:37:27 +02:00
crai0
3f3ac7e347
common: add support for back and forward pointing-device buttons (#6149)
Closes #6043

ChangeLog: add support for back and forward pointing-device buttons
2024-09-18 07:48:30 +02:00
Nigel Breslaw
a9c04f13e9
Simplify dial to use atan2 2024-09-17 09:05:38 +02:00
Arnold Loubriat
d790150735 Use AccessibleRole::ListItem inside examples 2024-09-16 09:15:39 +02:00
Olivier Goffart
890e63d352 dial example: move the files one directory down
There is only one directory alled "ui", so there isn't really need to have
this level of directory.
This aligns with other demo that don't have any source files

Also rename appwindow.slint to dial.slint
2024-09-14 18:37:17 +02:00
Olivier Goffart
58db7cabc1 examples: Fix links in READMEs 2024-09-14 14:44:41 +02:00
Olivier Goffart
8d9c041aa4
dial demo: add links to online preview/editor 2024-09-12 15:50:55 +02:00
Nigel Breslaw
d6dd8343e3
Dial example
Shows off how to use some basic math to create an interactive dial and place visual elements around a circle dynamically.
2024-09-12 15:14:30 +02:00
Simon Hausmann
4d43d02b03 esp-idf: Add support for using pre-built binaries
Run the nightly esp-idf test against the esp-idf slint nightly
binaries, after creating them. The snapshot is run earlier as well
then, so that the tests don't "leak" into the morning working hours.
2024-09-11 19:27:41 +02:00
Olivier Goffart
5663ddd9cc
SwipeGestureRecognizer (#6005) 2024-09-09 14:40:55 +02:00
Olivier Goffart
0feb674612
unmark changed callback as experimental
Closes #112
2024-09-09 14:40:16 +02:00
Simon Hausmann
f0a70bc150 Bump esp-println version
0.9 was yanked :(
2024-09-06 15:54:29 +02:00
Update Translations Bot
11e2da17be Update Translations: extract strings 2024-09-04 03:04:08 +00:00
Olivier Goffart
73505e017e Fix warning with nightly rust
```
 error: elided lifetime has a name
  --> examples/7guis/cells.rs:29:68
   |
29 |     pub fn dependents<'a>(&'a self, a: &A) -> impl Iterator<Item = &B> + 'a {
   |                       -- lifetime `'a` declared here               ^ this elided lifetime gets resolved as `'a`
   |
   = note: `-D elided-named-lifetimes` implied by `-D warnings`
```
2024-09-02 07:34:49 +02:00
FloVanGH
5b8f68f43b
visual clamp slider (#5967) 2024-08-28 10:41:24 +00:00
Simon Hausmann
b81e4e1bd2 Remove unnecesary esp-idf component dependency
Depending on just the bsp in the yaml file is sufficient for linkage.
(we use the same in the other esp-idf projects)
2024-08-23 11:34:26 +02:00
Simon Hausmann
10fcc321a9 Improve accessible-label values for the todo mvc example
Use more elaborate label text.
2024-08-20 21:34:22 +02:00
Florian Blasius
12098c8d42 TodoMVC: first step to improve accessibility 2024-08-20 21:34:22 +02:00
Olivier Goffart
29debabaec 7guis: modernier the timer example
- Use the new Timer element
 - Use the ProgressIndicator instead of a home-made one.
 - Fixup the paddings.
2024-08-16 17:27:51 +02:00
ogoffart
4dd7d96a28 Bump version number to 1.8.0 2024-08-15 12:44:46 +00:00
Olivier Goffart
08009199b9 mcu-board-support: Update dependencies 2024-08-13 23:39:13 +02:00
Simon Hausmann
1e3f05c983 Python: Expose Slint structs
Structs declared and exported in Slint are now available in the module namespace
with a constructor.

Fixes #5708
2024-08-13 12:04:04 +02:00
Nigel Breslaw
048c0eaf08
Update example readmes
Tidy up the main examples/README.md.
All the main examples now live in a table with a thumbnail and description.
Then each project has it's own README.md with more details.
2024-08-13 11:35:39 +02:00
Miłosz Kosobucki
bcc5327052 Fix typo in example
Qt platform example.
2024-08-09 22:07:27 +02:00
ogoffart
bbf7edc5a3 Bump version number to 1.7.2 2024-08-09 09:52:17 +00:00
Update Translations Bot
2050414cbd Update Translations: extract strings 2024-08-09 03:04:23 +00:00
Nigel Breslaw
f271502d43
Simplify the printerdemo home page (#5803)
Items are auto centered these days so no need for extra bindings.
The buttons also look after themselves and don't need logic in the loop to resize them.
2024-08-08 17:48:18 +02:00
Nigel Breslaw
e4cb55bb4f
Give printerdemo a clear palette (#5789)
This cleans up the light and dark mode palette.
It reduces the number of duplicate colors and also uses the system default color scheme.
2024-08-08 12:35:30 +02:00
Simon Hausmann
9543a26201 Fix printer demo coming up too small in live-preview
There's an issue that the live-preview doesn't respect the preferred size when actively choosing to preview a new component, but regardless it makes sense to avoid shrinking the printer demo.

Amends ccc795beb8
2024-08-08 11:04:16 +02:00
Update Translations Bot
3d6cea4072 Update Translations: extract strings 2024-08-08 03:04:10 +00:00
Olivier Goffart
c40819b45c Rename the weather-demo library name
The reason why we need to have a `_lib` prefix in the printerdemo and
the too example is because the binary name must be different from the
library name. But in the case of the weather-demo, since there is a
dash, it doesn't need the _lib suffix to be different.

Having a different name than the package name doesn't work with the
`xbuild` tool: fixes #5731
(we use cargo apk for our own build which doesn't have this limitation
anyway)
2024-08-07 16:08:12 +02:00
Nathan Collins
5e49d7f687 Zephyr: move the demo to examples/printerdemo
Given that the Zephyr demo now uses this UI instead of the "_mcu"
version it makes sense to relocate the code too.
2024-08-07 15:26:32 +02:00
Nathan Collins
8feaf7ffe2 Zephyr: make zephyr_process_input_event comments clearer
Prefer "logical coordinate" over "rendered position" which could also
have been interpretted as the screen position.
2024-08-07 15:26:32 +02:00
Nathan Collins
4eb78f7f0b Zephyr: use the non-mcu printerdemo UI
Set the native simulator display size to 1280x720 to match the
hardware.

On the hardware we rotate the screen using the display driver pixel
processing pipeline API. We can tell slint the rotated size via the
window adapter and everything is rendered as expected.

Input still needs rotating, so the software renderer RotationInfo struct and
`transformed` functions are "copied" here. However, we must specify the
opposite orientation in order to get the expected input coordinates.
2024-08-07 15:26:32 +02:00
Nathan Collins
ccc795beb8 Printerdemo window uses preferred width
On full-screen platforms (e.g. the Zephyr demo) it will expand to fill
the screen. Otherwise, the window is the preferred size.
2024-08-07 15:26:32 +02:00
Nathan Collins
5dc74d55a5 Zephyr: enable the PXP for the display driver
The display driver (display_mcux_elcdif) for the test hardware can use
a Pixel Processing Pipeline (PXP) which utilises DMA instead of copying
the framebuffer using `memcpy`. Enabling PXP is the first step to using
it to rotate the display output.
2024-08-07 15:26:32 +02:00
Nigel Breslaw
0fd9bf4b99
UX enhance the Printerdemo primary screen (#5782)
* The general page change animation is more subtle. It's now a combo of fade in and move. As opposed to a full page slide.
* The SVG also has been tweaked to make it symmetrical and remove the lopsided bulge it had.
* The sidebar buttons touch area covers the whole space they represent, as opposed to just being the same size as the icon.
* The code has been simplified a bit. Layout values are moved to DemoPalette and animation values are based on reusable variables to make changing the timings easier.
2024-08-07 14:52:58 +02:00
Olivier Goffart
046b64afec Revert "ESP32: Fix flashing examples such as printerdemo_mcu with espflash"
This reverts commit 2c06ed697b.

This doesn't work for me, the application crashes at start.
Also the espflash tool edits the file to add the device in it which
causes dirty files in git.

Instead, document to use CARGO_PROFILE_RELEASE_OPT_LEVEL=s in the readme
2024-08-06 14:27:23 +02:00
Update Translations Bot
531da6ac51 Update Translations: extract strings 2024-08-03 03:03:57 +00:00
Simon Hausmann
b1dab29366 Fix Node.js example instructions 2024-08-01 13:37:20 +02:00
Nathan Collins
045cd0c154 Zephyr: active animations only cause a sleep on the native simulator
The Zephyr POSIX architecture used by the native simulator is unable
to interrupt a busy thread [1]. Therefore we must sleep even when
there are active animations to allow other threads to progress,
otherwise we end up in an infinite loop. This limitation does not
apply to real hardware, where we can simply continue the event loop.

[1] https://docs.zephyrproject.org/3.7.0/boards/native/doc/arch_soc.html#important-limitations
2024-07-31 16:38:55 +02:00
Justyna Hudziak
ed00552b3f Weather-demo: unify directory and package names
Rename every possible entity from rusty-weather to
weather-demo to avoid confusions.
2024-07-29 13:39:20 +02:00
Justyna Hudziak
58a483a613 Weather-demo: fix crashing apk from nightly builds
Add "lib" as a target crate-type beside "cdylib".

Remove platform settings from the Cargo.toml file
to match with other examples.
2024-07-29 13:39:20 +02:00