Commit graph

11531 commits

Author SHA1 Message Date
Florian Blasius
2b129b87c4 Merge branch 'master' of github.com:slint-ui/slint 2024-07-12 06:28:57 +02:00
Florian Blasius
ca5ac29665 Editor: increase group header min height 2024-07-12 06:28:46 +02:00
Simon Hausmann
e3aab79fdb Python: Improve Struct mapping
When reading, create the local equivalent of a dataclass, so that access
doesn't require ["foo"] key syntax.

Also implement the copy protocol, so that we can safely make clones of
the references returned by the ListModel.
2024-07-11 22:08:10 +02:00
Simon Hausmann
0b6381d012 Python: Fix access to globals when there's more than one
The getter for the global didn't capture the correct global_class,
just the last iteration.

This fixes the broken printer demo.
2024-07-11 22:00:39 +02:00
Florian Blasius
86cde942b7 editor: fixed different bar heights 2024-07-11 20:07:47 +02:00
Tobias Hunger
10ca3de1ed compiler: Add a really simple snapshot test 2024-07-11 19:09:26 +02:00
Tobias Hunger
34c9351c31 live-preview: List more components in the components list
* Show all file-local componanets (check is-exported)
* Parse all known files before generating the file list

Keep the document_cache with all the extra documents loaded around,
2024-07-11 18:54:40 +02:00
Simon Hausmann
6b6fb71afc Fix docs build when run via nightly job
Sadly, input type boolean doesn't really work for workflow calls,
as they're strings :(. But it's okay, we treat it as a string anyway.
2024-07-11 18:45:01 +02:00
Simon Hausmann
daac320fa8 Speed up regular CI runs
Build only the printer demo for WASM for the CI, to fan out wasm related issues.
Build the remaining demos (especially the rebuild of the gallery with all styles)
and artefacts in the nightly snapshot.
2024-07-11 17:58:34 +02:00
Simon Hausmann
0802d157bd Prospective fix for releaes doc builds
Use the right input variable...
2024-07-11 17:57:34 +02:00
Florian Blasius
f32bec395b
Editor: Design Review fixes for library, properties and preview (#5604) 2024-07-11 16:36:57 +02:00
Simon Hausmann
c74872ab86 Fix dynamic accessibility tree updates not working in the interpreter
It turns out that for repeated elements, we set root_weak to self_weak, instead of the root we obtain from the parent instance. Fix this by moving the code to initialize parent_item_tree_offset to before we try to use it (via parent_instance) to initialize root_weak.
2024-07-11 16:25:39 +02:00
Simon Hausmann
a80f7f86ab Move the uefi build also to the slower nightly tests 2024-07-11 16:04:23 +02:00
Simon Hausmann
441695c130 Split slow tests from nightly artefact builds
Move the zephyr, yocto, and esp-idf tests into nightly_tests.yaml, from nightly_snapshot.yaml and ci.yaml. The zephyr builds take ~6 minutes each but are rather similar to the esp-idf build (C++ CMake build for MCU environment), so it should suffice to do them nightly.
2024-07-11 16:04:23 +02:00
Olivier Goffart
b9dc73bc6a Android: Print a warning when there is an error from the build script JDK 21
It doesn't compile:
```
Dex conversion failed: Error in ...\out\java\dev\slint\android-activity\SlintAndroidJavaHelper$1.class:
java.lang.NullPointerException: Cannot invoke "String.length()" because "" is null
```

I don't know how to solve the error, but i can giv an informative
message telling them to downgrade Java

CC: #4973
2024-07-11 13:30:13 +02:00
Simon Hausmann
bda89c25da Document that availability of slint::testing is conditional to enabling the feature and experimental features. 2024-07-11 11:47:09 +02:00
Simon Hausmann
2be4b320b9 C++: Include AccessibleRole in the slint::testing namespace docs 2024-07-11 11:47:09 +02:00
Simon Hausmann
c76f9fe795 Include experimental API in the C++ snapshot docs 2024-07-11 11:42:18 +02:00
Tobias Hunger
1e7b3a6958 slintpad/vscode: Remove the TS-based Property Editor
The one in the Preview is better already, so remove the two copies of a property
editor we used to have.
2024-07-11 10:40:46 +02:00
Simon Hausmann
27dc6e53c0
API review: enable all features in the C++ docs (#5592)
And make sure that functions excluded when freestanding is enabled are included in the docs.
2024-07-11 08:29:51 +02:00
Update Translations Bot
4de9cae583 Update Translations: extract strings 2024-07-11 03:05:01 +00:00
Simon Hausmann
bc1ada20bd Revert "C++: Enable software renderer by default"
This reverts commit 42571bbddb.

The line-by-line renderer doesn't compile with xcode 15.4,
and TestWindowAdapter doesn't compile with gcc 10 in the linux CI.
2024-07-10 22:39:20 +02:00
Simon Hausmann
42571bbddb
C++: Enable software renderer by default
It's also enabled by default in the rust crates and the tools.
2024-07-10 22:19:20 +02:00
Florian Blasius
4bedeb5489 lsp: switch interact and edit on header 2024-07-10 21:09:57 +02:00
Florian Blasius
dada059801 Fixed import in lsp ui 2024-07-10 21:09:57 +02:00
Florian Blasius
ef14d1a4a5 Remove unused header bar 2024-07-10 21:09:57 +02:00
Florian Blasius
b573f1c7d8 Design Review: refactored lsp header 2024-07-10 21:09:57 +02:00
Olivier Goffart
e67e46ab47 LLR: merge the popup's x and y property access in one expression 2024-07-10 17:54:03 +02:00
Tobias Hunger
821d8a893c lsp: Clippy fixes and other small cleanups
... suggested by @ogoffart.
2024-07-10 17:17:33 +02:00
Tobias Hunger
489d6c6a5b live-preview: Update categories displayed in the library
* Show all builtin elements under "Builtin Elements"
 * Show all std-widgets under "Widgets"
 * Show everything else under its file name.
2024-07-10 17:17:17 +02:00
Simon Hausmann
36bef5a483 API review: clean up Time/Date struct docs
- Remove `struct Date` and `struct Time` from the widgets side bar
- Move it to the bottom of each page
- Link to it from the respective properties
2024-07-10 15:54:11 +02:00
Simon Hausmann
25dbba7053 doc: Rename DatePicker and TimePicker to DatePickerPopup and TimePickerPopup 2024-07-10 15:38:44 +02:00
Olivier Goffart
b96390cd75 Fix double click within a Flicakble
Fixes #5586
2024-07-10 15:22:17 +02:00
Chris Chinchilla
da0769ade6
Audit language concepts (#5497)
* Draft

* Feedback
2024-07-10 14:48:54 +02:00
Chris Chinchilla
d2d4417ae8 Updates 2024-07-10 13:52:11 +02:00
Chris Chinchilla
4339476d4f Update docs/_templates/embedded-tutorials.md
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-10 13:52:11 +02:00
Chris Chinchilla
30880a1d88 Start a draft of an embedded tutorial template 2024-07-10 13:52:11 +02:00
Simon Hausmann
5f0d0937f0 Simplify popup coordinate handling
Instead of replacing the existing x/y properties with "invisible" ones, let's just keep those that we have and merely zero out the geometry x/y.

This has the bonus that access to x/y within the PopupWindow will provide the right value, i.e.

    popup := PopupWindow {
        x: 42px;
        Text { text: popup.text / 1px; }
    }

will show "42" instead of zero.

Since x/y are now merely referenced via the NamedReferences in PopupWindow, this patch also fixes the property materialization pass to use
visit_all_named_references(component) to also visit the x/y named refs,
instead of visit_all_named_references_in_element() that skips them.
2024-07-10 13:43:41 +02:00
Simon Hausmann
c81ab5cd6d Remove hard-coded sizes from date and time picker popups
Use the layout and position the popup centered relative to its parent.
2024-07-10 13:43:41 +02:00
Simon Hausmann
419042f476 Add support for using own properties in PopupWindow's x and y properties
This allows positioning popup windows in a way that takes their width/height into account.
2024-07-10 13:43:41 +02:00
Tobias Hunger
ec87f555e9 live-preview: Use drop-down in property editor for enums 2024-07-10 11:47:06 +02:00
Tobias Hunger
2c546fc35f live-preview: Add function icon for complex mode in property editor 2024-07-10 11:47:06 +02:00
Tobias Hunger
05e0b4dc68 live-preview: Have a simple mode for bools and strings
The property editor built into the live-preview now comes with the
concept of a "simple/complex mode". There is a "K" (for complex, obviously;-)
or a "S" (for simple, just as obvious) beween the property name and property
value. you can click on the letter to switch from simple to complex mode,
but you can only switch back to simple mode if there are no complex expressions
in the line edit.

This implements a "simple" mode for bools.

# Todo

 * [ ] Find icons for simple/complex mode:-)
 * [ ] Figure out how to decide whether other types are "simple"
 * [ ] Define more UIs for simple types

live-preview: Move simple property code into rust

... and handle simple strings in addition to bool.
2024-07-10 11:47:06 +02:00
Olivier Goffart
42d7661ec6 C++: make the PhysicalRegion::rectangles non-overlapping 2024-07-10 10:58:27 +02:00
Olivier Goffart
256ff1a5f5 software renderer: PhysicalRegion::iter to be non-overlapping rectangles 2024-07-10 10:58:27 +02:00
Florian Blasius
6e2013e4ff
API Review: DatePicker and TimePicker (#5582) 2024-07-09 22:16:54 +02:00
Olivier Goffart
c089bcef00
Update crater.yaml 2024-07-09 10:49:54 +02:00
Olivier Goffart
e8f22c84d2
Update crater.yaml 2024-07-09 10:47:09 +02:00
Olivier Goffart
f9739b3ab8 Crater updates 2024-07-09 10:25:36 +02:00
Simon Hausmann
7734430cd5 Fix esp-idf carousel build 2024-07-09 08:56:45 +02:00