Commit graph

1040 commits

Author SHA1 Message Date
Florian Blasius
6f3dfc992f
energy_mng: weather page and bar tiles (#2225)
* weather page
* bar tiles
2023-02-14 06:47:08 +01:00
Olivier Goffart
e557ba5eed Exaples: Use the new syntax for the iot-dashboard and imagefilter 2023-02-13 17:53:23 +01:00
Olivier Goffart
ca7b2e0bb8 Harmonize style properties 2023-02-10 16:49:25 +01:00
Olivier Goffart
6889dfa5f5 Rust: Make new(), run() and show() report errors from the backend
Fixes #2198
2023-02-10 05:00:03 +01:00
Olivier Goffart
a19efc30db
Replace the MAX_BUFFER_AGE const generic with a runtime enum
Having a const generic for that didn't turn to be a good API.
Also made the C++ side more difficult

(Also renamed buffer_stride to pixel_stride)

Closes #2135
2023-02-08 14:44:01 +01:00
Olivier Goffart
eaa9db4911 C++: use size_t everywhere as index in our models
cc #2024
2023-02-07 15:25:44 +01:00
Florian Blasius
0db47a0b75
energy_mng demo: usage (#2178)
* usage page
* bar chart
2023-02-06 06:53:20 +01:00
Olivier Goffart
9c20369653 Fluent style: cleanup unwanted properties
Don't make our widgets inherit element that we didn't want to expose in the API

The other styles will be synchronized with later
2023-02-03 20:29:26 +01:00
Florian Blasius
930a127220
energy_mng: overview (#2176)
* Overview page
* ValueDisplay widget
* GroupBox widget

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>

---------

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-02-03 12:01:02 +01:00
ogoffart
e7f48512ee Bump version number to 1.0.0 2023-02-03 11:07:15 +01:00
Olivier Goffart
9fdfa840b8 MCU: Remove the alloc_error_handler feature
`default_alloc_error_handler` is being stabilized in Rust 1.68, so current
nightly don't need any unstable features anymore
2023-02-02 17:23:42 +01:00
Florian Blasius
b9edb9ddd4
energy_mng: initial setup (#2171)
* Navigation
* Menu
* Dummy Pages
2023-02-02 07:10:57 +01:00
Simon Hausmann
d1a56cb609 Fix example instructions for running the node examples
Make sure to install slint-node first.

Closes #2150
2023-02-01 09:11:40 +01:00
Simon Hausmann
32d2ba70ca
Change WindowEvent::KeyPressed/Released to use a SharedString instead of a char (#2148)
Also, `WindowEvent` is not `Copy` anymore.

Closes #1749
2023-01-31 15:44:54 +01:00
Olivier Goffart
6e3610da93 Remove AboutSixtyFPS 2023-01-31 09:38:56 +01:00
Olivier Goffart
a0fb8bc771 Remove support of old SIXTYFPS_ env variable, and sixtyfps_widgets.60 2023-01-26 13:36:38 +01:00
Simon Hausmann
52fb1ab9fe Fix signature of get_proc_address in Rust GraphicsAPI
Use a CStr instead of str, to avoid an extra CString allocation. The underlying operating system API for
this expects a zero terminated C String.

Fixes #1943
2023-01-26 11:55:10 +01:00
Olivier Goffart
4f3d0954fe Online code editor: add a "load_demo" url argument
that loads the demo based on the current version of the editor
2023-01-25 11:11:57 +01:00
Simon Hausmann
3c6ff552cd Fix slide puzzle not scaling to the browser viewport
With commit b55ec6894a the preferred size
of the background image of the slide puzzle demo propagates to the
Window, which causes the web build of the winit backend to use the
window's preferred size instead of the 100% viewport width/height set
via CSS.

Work around it via manual positioning.
2023-01-24 16:26:06 +01:00
Simon Hausmann
2be91d580b janitor: Remove outdated comment
Oops :-)
2023-01-24 09:36:44 +01:00
Simon Hausmann
d5ca021485 janitor: Update glow dependency 2023-01-24 09:35:18 +01:00
Olivier Goffart
a0fdf94fb1 StandardTableView: Remove the editable feature for now
This commit can be reverted when we want to introduce it again.
There is a few bugs with the editable property:
 - The text is not in sync with the model if the model changes after an
   edit. (can be seen by making an edit and then sort)
 - The highlight of the current row doesn't work properly
 - We should probably only edit on double click or some shortcut instead
   of just clicking
 - The editable field exist but does nothing for the StandardListView
2023-01-24 07:31:29 +01:00
Olivier Goffart
27498cd1f7 Gallery demo: fix the dummy model for the table view
shown when opening the gallery with the viewer
2023-01-23 16:35:40 +01:00
Simon Hausmann
ac75cb02f9 Fix warning about implicit export 2023-01-23 16:22:04 +01:00
Simon Hausmann
755218aa1c Fix warning about implicit export 2023-01-23 15:21:47 +01:00
Simon Hausmann
24dcef5fed
First stage of cleaning up the export handling of the slint root component (#2095)
We implicitly export the last component of a .slint file to the generator.
Issue a warning when that happens and suggest to export it explicitly.
2023-01-23 15:19:49 +01:00
Florian Blasius
520df46998
Update examples to new syntax (#2067)
* run slint-updater on examples
* manual syntax updates
2023-01-16 12:11:25 +00:00
Florian Blasius
ac5eaf495f
move cpp StandardListViewItem from private to public namespace (#2062)
* move cpp StandardListViewItem to public namespace
* Fix missing C++ docs for StandardListViewItem

The struct is originally defined in Rust in model.rs and cbindgen creates the
compatible C++ declaration. For doxygen
to see it, it needs to be emitted into slint_generated_public.h.

* Improve the StandardListViewItem docs a little bit
* move cpp StandardListViewItem to public namespace

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-01-16 09:06:36 +01:00
Simon Hausmann
1701352177 Fix descending sort in the table view in the C++ gallery build 2023-01-13 10:35:00 +01:00
Florian Blasius
f2aab576f4
Add StandardTableView widget (#2032)
* Text only StandardTableView with column and rows
* Text editing of cells
* Sort by column ascending and descending
* Variants of the TableView for native, fluent and material
2023-01-12 19:41:12 +01:00
Olivier Goffart
1cbd61145e WIP: pure qualifier for callback and functions 2022-12-22 00:26:27 -08:00
ogoffart
ce07d078ce Bump version number to 0.3.4 2022-12-16 09:36:15 +00:00
Olivier Goffart
91dabcbddf Use functions in our examples, instead of callback 2022-12-06 14:56:25 +01:00
Simon Hausmann
11f46906a2 Centralize rust-version in Cargo.toml
Require 1.64 in the workspace and inherit the setting in package
Cargo.toml files.
2022-12-05 12:39:14 +01:00
Olivier Goffart
1aaab99666 Upgrade to rp-hal 0.6.1 to fix the CI
Note that this is actually using a marge of v0.6.1 and the branch in https://github.com/rp-rs/rp-hal/pull/457
2022-11-30 14:07:44 +01:00
Simon Hausmann
a1808a175c janitor: Don't use deprecated types 2022-11-30 11:43:41 +01:00
Simon Hausmann
14a954f57c janitor: Don't use deprecated types 2022-11-30 11:37:10 +01:00
ogoffart
fb02b4118b Bump version number to 0.3.3 2022-11-28 13:11:11 +00:00
Simon Hausmann
fcd59fb0c1 Fix debug build of the gallery on Windows with Fluent style
The object file became too big, so
add /bigobj to the command line as
recommended by MSVC itself. Same as commit c6ec1e644a.
2022-11-23 17:18:52 +01:00
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