Commit graph

881 commits

Author SHA1 Message Date
Olivier Goffart
1c3eb46752 Fixup dead links to the old tutorial 2024-10-03 10:15:52 +02:00
ArcticLampyrid
132e09130e feat(cpp): evaluate generator expression in the context of target
Link: https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:TARGET_GENEX_EVAL
2024-10-02 11:41:09 +02:00
ArcticLampyrid
c145345827 feat(cpp): support generator expression for SLINT_EMBED_RESOURCES & SLINT_SCALE_FACTOR 2024-10-02 11:41:09 +02:00
U. Bruhin
40811193aa
C++: Add size() method to SharedString (#6417)
The length is an important property of a string and should be available
as a getter. The new size() method is consistent with std::string.

ChangeLog: [C++] Added `SharedString::size()`
2024-10-01 14:51:56 +02:00
Simon Hausmann
7db5024c52
Generate bindings of Image::to_rgb8/to_rgba8/to_rgba8_premultiplied f… (#6405)
ChangeLog: [C++] Add `Image::to_rgb8/to_rgba8/to_rgba8_premultiplied` pixel buffer accessors.

Fixes #6399
2024-10-01 10:55:11 +02:00
Simon Hausmann
43d3cdb6c4 Fix esp-idf nightly builds
After commit 3139171d77, the way of using the nightly is to omit the version.
We just need to add it again for the release.
2024-09-26 10:12:10 +02:00
Olivier Goffart
fc324a4db2 Update MSRV to 1.77 2024-09-26 09:14:58 +02:00
ogoffart
eb273a63ee Bump version number to 1.9.0 2024-09-25 11:49:15 +00:00
Josh Wood
6a131e2648
Added PropertyAnimation.direction property for controlling animation direction (#6261)
Closes #6260

ChangeLog: Added property for controlling animation direction
2024-09-24 19:55:24 +02:00
Simon Hausmann
bb28018c50 doc: fix esp-idf hello world list numbering 2024-09-23 18:10:05 +02:00
Simon Hausmann
fb7472fff8 doc: Remove rust toolchain from esp-idf steps
This is slightly confusing as it's not needed anymore.
2024-09-23 18:08:08 +02:00
Simon Hausmann
b0db6d78fd Prospective fix for downloadling slint-compiler for Slint releases
The GitHub release name has the git tag name, so a v prefix.
2024-09-23 17:23:02 +02:00
Simon Hausmann
3139171d77 Sync FindSlint.cmake
This pulls in
7e6a6a3e2d
to fix build against the release.
2024-09-23 17:23:02 +02:00
Simon Hausmann
0dcbaff886 Generic stm32 docs: Merge the app-window.slint addition to CMakeLists into the common CMakeLists.txt edit
... and introduce the .slint file first then, so that its existence is known when reading the CMakeLists.txt snippet.
2024-09-20 10:30:25 +02:00
Simon Hausmann
bb7355878f Improve comment about SLINT_EMBED_RESOURCES target property use 2024-09-20 10:30:25 +02:00
Simon Hausmann
9534aaa155 stm32 docs: Set SLINT_EMBED_RESOURCES target property instead of DEFAULT_SLINT_EMBED_RESOURCES as global variable 2024-09-20 10:30:25 +02:00
Simon Hausmann
ec4a95f031 Polish the generic STM32 instructions
This includes removal of the SLINT_STYLE setting, as a default is set there for FEATURE_FREESTANDING.
2024-09-20 10:30:25 +02:00
Enyium
9894eca229 Fixed kebab casing of previous appwindow.slint. 2024-09-20 10:26:49 +02:00
Simon Hausmann
024a31bba4 Add "generic" STM32 setup instructions
... these really need screenshots, but it's a start.
2024-09-19 23:36:41 +02:00
Simon Hausmann
00411f622e Remove one outdated section from the esp-idf troubleshooting 2024-09-19 23:36:41 +02:00
Simon Hausmann
f4406f7583 Add missing license tags 2024-09-19 23:36:41 +02:00
Simon Hausmann
7ad2dbbaba Integrating the MCU docs into the C++ docs
- Getting Started is now "Getting Started on Desktop"
- A new "Getting Started on MCU" section combines:
 - ESP-IDF
 - STM32 (for the board templates we provide)
 - Generic (instructions from cmake.md moved here)

The ESP-IDF README is now shortened and links to the C++ esp-idf
section (careful! This might become a dead link if we re-organize
in the future...)
2024-09-19 23:36:41 +02: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
Simon Hausmann
ddfbd1821a For our Rust, C++, and Node.js templates, recommend the use of a zip archive download instead of git
This removes any git history of ours from the download, and removes the need to have git installed.
2024-09-18 10:48:38 +02:00
Olivier Goffart
d2bd5366f4 Timer::set_interval
Don't return an Option, just return 0 when the timer is not started.
As discussed in the API review, the rational is that the interval is
just like a field in a struct and when the struct is default
constructed, it is initialized to 0
2024-09-18 09:24:39 +02:00
Olivier Goffart
2405877591 CI: use "nightly" instead of the version in the filename of the C++ packages 2024-09-13 19:13:04 +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
Simon Hausmann
f0a70bc150 Bump esp-println version
0.9 was yanked :(
2024-09-06 15:54:29 +02:00
Simon Hausmann
9c8b0a613b C++: Strip host suffix from package name if there's no host dependent content 2024-08-30 10:25:49 +02:00
Simon Hausmann
4d585279b0 STM32: Add support for rendering rotation 2024-08-30 08:49:26 +02:00
Olivier Goffart
30c98deecd C++: use PROJECT_VERSION for the CPACK version 2024-08-29 14:12:42 +02:00
Simon Hausmann
069b157143 Unify Slint project version in CMake build 2024-08-29 11:23:09 +02:00
Simon Hausmann
90b2058e49 Make it possible to configure a CMake build with the slint-compiler to be downloaded at app configure time 2024-08-29 11:23:09 +02:00
Simon Hausmann
35de15ce4b Remove stray CMake cache variable setting
The same line exists unconditionally further down in the same file.
2024-08-28 11:16:55 +02:00
Simon Hausmann
5d03d6e1bd Simplify slint-compiler import location logic in SlintConfig.cmake.in
Instead of detecting the suffix, just copy across the corrosion-determined file name.

Amends 13975d9def
2024-08-25 21:05:55 +02:00
Simon Hausmann
13975d9def Fix locating the slint-compiler.exe on cmake cross-compiled packages
When cross-compiling CMAKE_EXECUTABLE_SUFFIX may not be set to .exe even
though the host is Windows, because this variable always refers to the
target. This is a missing feature in cmake, so work around it for now.
See also https://gitlab.kitware.com/cmake/cmake/-/issues/17553 I made a
similar workaround in Corrosion long time ago with commit
b8a6b26a0f2d526e0492df9fd88c0495b0b8a64f

The target prop line is duplicated in favor of introducing a variable,
that would otherwise be at risk of being visible in the user scope.
2024-08-23 18:10:11 +02:00
Simon Hausmann
e488a36487 C++: For freestanding builds, default to the fluent style
Freestanding implies the lack of windowing system presence and therefore the choice of say Cupertino when building on macOS is not good.

Fluent isn't quite a great choice right now either, as it's not very touch friendly, but it's a compromise :)
2024-08-23 13:25:50 +02:00
Simon Hausmann
327e0d8d95
Fix C++ package names when not cross compiling 2024-08-22 20:15:41 +02:00
Simon Hausmann
d413fd5217
Build binary MCU packages as tarballs (#5900)
This includes xtensa for s3, esp riscv targets, as well as thumbv7
for STM32.

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2024-08-22 16:16:55 +02:00
Simon Hausmann
d78354f01b
Initial import of STM32 Platform Integration (#5892)
This is a head-only library for now.
2024-08-22 15:55:01 +02:00
Simon Hausmann
9bdade0105 Compile the multiple-includes test with a header-only build of appwindow.slint 2024-08-20 15:53:24 +02:00
Simon Hausmann
c25a03d6f7 C++: Make it possible to split up the C++ code generated for a .slint file
Add a COMPILATION_UNITS argument to slint_target_sources that defines into how many .cpp files to split up a .slint file. The new default is now one.
2024-08-20 15:53:24 +02:00
Simon Hausmann
e54eedc351 Document how to solve the multiple symbol definition errors that sometimes happen with the xtensa toolchains
Closes #5862
2024-08-20 12:44:30 +02:00
Olivier Goffart
a9f526491a Timer Element
Closes #5724
2024-08-16 16:36:38 +02:00
ogoffart
4dd7d96a28 Bump version number to 1.8.0 2024-08-15 12:44:46 +00:00
Simon Hausmann
a727d87796 CMake: Make it possible to override the scale factor
Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
2024-08-14 11:00:50 +02:00
Simon Hausmann
360f192b91 esp-idf: Adjust touch coordinates to scale factor
Taken from https://github.com/slint-ui/slint/pull/5016/files

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2024-08-14 11:00:50 +02:00
ogoffart
bbf7edc5a3 Bump version number to 1.7.2 2024-08-09 09:52:17 +00:00
Olivier Goffart
0f8246d598
C++: add assert_main_thread to public functions in the Window
Some have it some don't. Just add it everywhere.

See https://github.com/slint-ui/slint/discussions/5762
2024-08-06 22:52:45 +02:00