Commit graph

11675 commits

Author SHA1 Message Date
Justyna Hudziak
67b8515267 Weather-demo: fix no persistent data on desktop
Ensure directories for saving persistent data are
available. Otherwise data are never saved.
2024-07-26 13:34:30 +02:00
Simon Hausmann
ed7eda0286 Revert "Prepare for 1.7.1 release"
This reverts commit 74763b5b87.
2024-07-26 08:49:33 +02:00
Olivier Goffart
8b38825734 LSP completion: don't auto-complete function or private properties for bindings 2024-07-25 22:40:30 +02:00
Olivier Goffart
cf88676a18 LSP: fix renning the tests without the preview feature 2024-07-25 22:40:30 +02:00
Simon Hausmann
b8c8bff2b1
Fix 1.7.1 release date 2024-07-25 16:53:04 +02:00
Simon Hausmann
74763b5b87 Prepare for 1.7.1 release 2024-07-25 15:50:49 +02:00
Simon Hausmann
9a34789070 Revert "Fix conversion to from float to int"
This reverts commit f5d003d1e2.

We decided to postpone this change until a later release, in maybe a
different shape.
2024-07-25 15:25:00 +02:00
Simon Hausmann
dafa559a55 Fix unguarded unwrap when attempting to embed the same default font multiple times in the software renderer glyph embedding pass
Fixes #5684
2024-07-25 15:10:38 +02:00
Simon Hausmann
c8a85b9dd9 Preliminary 1.7.1 changelog 2024-07-25 14:10:30 +02:00
Update Translations Bot
9c30cdaf3b Update Translations: extract strings 2024-07-25 03:06:11 +00:00
Olivier Goffart
5f78b599cf esp-idf README: fix compilation of the code sample
- `touch_handle` can't be initialized with an optional anymore, it is a
   pointer.
 - Take the opportunity to actually initialize the touch handle.
 - `bsp/display.h` for the box3 fails to compiled if it is included
   before `bsp/esp-bsp.h`
2024-07-24 22:57:57 +02:00
Olivier Goffart
f5d003d1e2 Fix conversion to from float to int
Round the value.

The previous behavior is that

 - For the interpreter, we were rounding (same as new behavior)
 - for Rust and C++ we were truncating, unless the properties were
   inlinined and then we were keeping it as float
2024-07-23 17:32:57 +02:00
Simon Hausmann
ef92c1a161 Python: reset alpha version tag 2024-07-23 15:16:30 +02:00
Olivier Goffart
4c0bfa269d LSP: refactor send_notification to use the Notification trait
This ensure there is no typo in the method name
2024-07-23 14:18:39 +02:00
Olivier Goffart
f36fed2252 Combobox: Fix ComboBox having a too big popup when it has less than 6 items
Fix #5646

Qt is a bit more involved since it always put scrollbar if there is a ScrollArea and we can't
easily know the size to which make the popup. That's why it needs two popups
2024-07-23 14:18:16 +02:00
ogoffart
aa25e3cd44 Bump version number to 1.7.1 2024-07-23 12:05:34 +00:00
Simon Hausmann
11ce002314 macOS: Fix windows not resizing/redrawing correctly when showing again after calling hide
Don't assume that any pending redraw request will be delivered when the window his shown/hidden.

Amends 9113b877bd

Fixes #5658
2024-07-23 13:35:35 +02:00
Olivier Goffart
a957b7fd98 Rust: Ignore dead code warning for unused enums
Strangely I wasn't able to reproduce the problem in a test, and we already have tests
that have enums which are not fully used.

Fix #5661
2024-07-23 13:33:51 +02:00
Matheus Castello
d1f5b536c0 internal: interpreter: fix typo in ComponentCompiler deprecation message
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
2024-07-23 07:04:19 +02:00
Olivier Goffart
ebc5193647 LSP: properties: filter accessible-action-* callbacks from the property list
Callbacks can't be in the property list anyway, and setting their values assert
later in the checking code.

Fix #5652
2024-07-22 15:24:01 +02:00
Olivier Goffart
8eb1543832 Android: create output directory for .class
According to https://github.com/slint-ui/slint/discussions/5662 , this might be necessary
2024-07-22 15:23:46 +02:00
Simon Hausmann
44b3117d98 Fix reuse check 2024-07-22 15:10:15 +02:00
Simon Hausmann
5cf30431e7 weather-demo: move index.html into the directory where the CI expects it 2024-07-22 14:57:53 +02:00
Simon Hausmann
28f7ee7c7d winit: Prefer X11 over Wayland when running in WSL
This is a workaround for the compositor on WSL tending to crash.
Unfortunately we can't just try to create an event loop with x11 first
and then re-try with wayland, winit doesn't allow that. So just avoid
wayland for now.

The long term solution #5667

Fixes #5657
2024-07-22 14:12:14 +02:00
Simon Hausmann
6c2fefc837 CI: fix syntax
Oops
2024-07-22 13:37:44 +02:00
Simon Hausmann
7211409b6e CI: add the weather demo to the demos for the website publishing 2024-07-22 13:37:15 +02:00
Justyna Hudziak
33c84b67b4 weather-demo: initial commit 2024-07-22 13:34:35 +02:00
Tobias Hunger
dacc57648b live-preview: Unbreak layout detection
Return the element's "layoutness" when no child insertion point was found in
the element. This fixes droping elements into normal layouts.
2024-07-22 13:07:12 +02:00
Olivier Goffart
5acc7dd42a Live-preview: Prospective fix for panic when moving a component
We were trying to convert a node to a wrong kind of node.
Then of course it didn't have the expected children

In debug mode you'd have
```
assertion `left == right` failed
  left: SubElement
 right: Component
```
from the debug_assert! in `$Node::from`

I changed the call to `.into` to a call to `$Node::new` that return an
option.

Also made the debug_assert into an assert and added track_caller so such
problem are easier to debug in the future. (Retrospectively, we probably
shouldn't have derived From for $Node)

Fix #5642

The change contains no tests because the is_recursive_inclusion function
is currently not tested and would need some effort to create a test
2024-07-20 01:17:53 +02:00
Bedis Nbiba
62c55dd188
js: show diagnostics when erroring (#5651)
before
```
error: Uncaught (in promise) Error: Could not compile ui/appwindow.slint
    at loadSlint (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:464:19)
    at Module.loadFile (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:644:12)
    at file:///home/mrcool/dev/deno/lab/memory/src/main.ts:3:23
```

after
```
error: Uncaught (in promise) Error: Could not compile ui/appwindow.slint
Diagnostics:
[ui/appwindow.slint:4:5] Unknown type MemoryTile
    at loadSlint (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:468:19)
    at Module.loadFile (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:648:12)
    at file:///home/mrcool/dev/deno/lab/memory/src/main.ts:3:23
```
2024-07-19 16:58:56 +02:00
Simon Hausmann
8644048d19 Prospective fix for failing external pull requests
Run the doc stuff only when building for the master branch
2024-07-19 16:52:00 +02:00
Tobias Hunger
daae440da7 live-preview: Prettify showing of library components in library view 2024-07-19 12:25:10 +02:00
Tobias Hunger
63e0a9cc2a live-preview: Allow for dropping library components 2024-07-19 12:25:10 +02:00
Tobias Hunger
ce1ff534ba live-preview: Improve how libraries are shown in the component list 2024-07-19 12:25:10 +02:00
Tobias Hunger
7bbe2a949a live-preview: Recognize GridLayouts as layouts and find layouts in components
... when deciding whether or not we are dropping into a layout or not.
Components that take @children (like a GroupBox) were misrecognized before.

This is a bit tricky as the optimized Elements do not allow to find out whether
something had a child insertion point. So I need to convert over to the
unoptimized Element found in my `document_cache`.

Unfortunately there the lowering pass for the layouts has not been done yet,
so my "normal" approach to figuring out whether something is a layout or not
does not work anymore:-/

I ended up duplicating the logic of the layout lowering step: Match specific
type names for Builtin types. That's not nice and should be cleaned up at
some point.
2024-07-19 11:48:28 +02:00
Simon Hausmann
97ac7138c1 Clarify the use of file vs. directory references in library paths 2024-07-19 11:45:40 +02:00
Simon Hausmann
167ca4bc3b Library Docs: Mention how to add library paths with C++/CMake 2024-07-19 11:45:40 +02:00
Tobias Hunger
2c4d4e89b7 lsp: Remove Popups, Dialogs and PopupWindow from list of components
I do not expect those to be dragged onto the canvas with meaningful results.
2024-07-19 10:23:58 +02:00
Danut Enachioiu
7d00f0a80b
Clarify that init callback can't be used from backend code and why (#5645) 2024-07-18 21:55:01 +02:00
Simon Hausmann
d4340e00be
Preserve package.json in Slintpad 2024-07-18 21:26:26 +02:00
Simon Hausmann
a58a0a1851 Prospective fix for PR runs outside the repo
Run the www copy steps only if the PR originates from within the slint repo.
2024-07-18 16:54:49 +02:00
Simon Hausmann
e36eb6aba6 Document behaviour of globals when exporting multiple components
Fixes #5467
2024-07-18 13:43:13 +02:00
Simon Hausmann
1811832495 Revert "Prepare for 1.7.0 release"
This reverts commit c0683ecfa1.
2024-07-18 13:28:24 +02:00
Simon Hausmann
7536a6df06 Attempt to fix testing publishing 2024-07-18 12:11:21 +02:00
Simon Hausmann
592ecc2f08 Permit publishing of testing crate 2024-07-18 12:06:35 +02:00
Simon Hausmann
50b9b60447 Downgrade clap to a version that works with our MSRV 2024-07-18 11:03:19 +02:00
Simon Hausmann
c0683ecfa1 Prepare for 1.7.0 release 2024-07-18 10:49:13 +02:00
Simon Hausmann
26296c86a2 Bump version in docs 2024-07-18 10:45:48 +02:00
Simon Hausmann
29fdac89ab Node.js: Don't use deprecated syntax 2024-07-18 10:37:05 +02:00
Simon Hausmann
5a93bbcf7e Aim for release today 2024-07-18 10:19:23 +02:00