Nigel Breslaw
482308f5da
Add Math.atan2 to the inbuilt math function
...
Math.atan2(y, x) -> angle
2024-08-30 09:55:10 +02:00
Simon Hausmann
4d585279b0
STM32: Add support for rendering rotation
2024-08-30 08:49:26 +02:00
Tobias Hunger
a7c0ae30e8
live-preview: Report property values with units to UI
2024-08-29 17:08:26 +02:00
Tobias Hunger
82fad654a4
live-preview: Parse Color in property data
2024-08-29 17:08:26 +02:00
Tobias Hunger
4bb823830b
live-preview: Parse Int32 in property data
2024-08-29 17:08:26 +02:00
Tobias Hunger
fae9b09d86
live-preview: Parse Float32 in property values
2024-08-29 17:08:26 +02:00
Olivier Goffart
30c98deecd
C++: use PROJECT_VERSION for the CPACK version
2024-08-29 14:12:42 +02:00
Olivier Goffart
9a7bf43c9f
Revert "CI: disable rust nightly jobs"
...
This reverts commit 01b2b7b712 .
Nightly was fixed
2024-08-29 13:19:59 +02:00
Olivier Goffart
1d3e9120d8
Avid reporting further error when an element is misspelled
...
eg, don't report an error for each callback or animation or changed
event that the the property doesn't exist or such.
Also reword the message when an element doesn't exist. Use "element"
rather than "type" as it is more accurate.
2024-08-29 13:10:35 +02:00
Enyium
5a796e6dc0
Change debug() separator from , to . ( #5997 )
...
This is also how JavaScript's `console.log()` behaves.
Fixes #5991 .
2024-08-29 12:02:13 +02:00
Simon Hausmann
66df25443b
live-preview on macOS: Fix ever bouncing icon and re-add a quit item
...
We need to do the platform init only when we intend to soon thereafter show a window.
Re-added a Quit item that merely hides the UI, so CMD+Q kind of works for convenience.
Fixes #5994
2024-08-29 11:51:59 +02:00
Simon Hausmann
c284a695e0
Add missing closing parentheses to regex version match
2024-08-29 11:23:09 +02:00
Simon Hausmann
069b157143
Unify Slint project version in CMake build
2024-08-29 11:23:09 +02:00
Simon Hausmann
40bad67f11
Build MCU target packages only once for the target
...
... instead of once per host as well. Instead, download the slint compiler as needed.
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
b428ca1297
Package up Slint compiler separately
2024-08-29 11:23:09 +02:00
Olivier Goffart
80c497b319
refactor: move FocusScope and TouchArea to a new input_items.rs module
...
items.rs is getting big and i'm about to add another item there
2024-08-29 09:38:26 +02:00
Olivier Goffart
eb2a2ba106
Reference slint::spawn_local from the invoke_from_event_loop docs
...
Unfortunately, we can't link because it is defined in a different crate
Fixes #5988
2024-08-29 09:30:26 +02:00
Simon Hausmann
6472ab8416
Re-add standard macOS app menu but without quit item
...
... so cmd+q won't terminate the preview, but there's still the usual system menu bar.
2024-08-28 21:24:42 +02:00
Simon Hausmann
204cf7d0db
Fix wasm build
2024-08-28 21:24:42 +02:00
Simon Hausmann
067772a907
Fix location of apple specific dependencies
2024-08-28 21:24:42 +02:00
Simon Hausmann
394f1f0f91
Remove unused function
2024-08-28 21:24:42 +02:00
Simon Hausmann
16f47eac7d
Disable the macOS system menu bar for the Slint Live-Preview
...
Fixes #5962
2024-08-28 21:24:42 +02:00
Olivier Goffart
ee42f967a6
LSP: hover (tooltip) support
2024-08-28 20:50:25 +02:00
Olivier Goffart
0f2af817a0
LSP: move token_info code to its own module
2024-08-28 20:50:25 +02:00
Olivier Goffart
060db7f5d3
LSP: refactor the goto module to return token information
...
That can be used by other pass
2024-08-28 20:50:25 +02:00
Tobias Hunger
e0cf679c0f
live-preview: Improve conversion of property info to UI
...
... and use that in the (still almost unchanged) UI.
2024-08-28 18:02:47 +02:00
Tobias Hunger
bacae03919
compiler: More wrappers around rowan methods
...
... in SyntaxNode and SyntaxToken.
And do a small code cleanup enabled by this.
2024-08-28 18:02:47 +02:00
Tobias Hunger
7da032ab36
live-preview: Use langtyoe::Type for type info on properties
2024-08-28 18:02:47 +02:00
Olivier Goffart
bf1b014840
Timer: fix timer when two timers have the same id
...
We need to give unique name to optimized item as well, otherwise the
properties ends up the same.
Also fix the optimized element and timer when inlining
Fixes #5977
Fixes #5976
2024-08-28 16:21:34 +02:00
Nigel Breslaw
3663ffc3c3
vscode: Replace {{project-name}} with actual name in Rust template ( #5981 )
2024-08-28 16:07:35 +02:00
FloVanGH
f6ec79c76a
Added missing tests for VecModel ( #5975 )
2024-08-28 11:17:17 +00:00
Simon Hausmann
95a1a7e052
Speed up vsce CI step
...
Don't build slint-lsp.
(there's still the wasm build though)
2024-08-28 13:11:28 +02:00
FloVanGH
5b8f68f43b
visual clamp slider ( #5967 )
2024-08-28 10:41:24 +00: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
Tobias Hunger
4a2e2fb2ed
live-preview: Pass a element node to ui when converting property info
...
We need an ElementRcNode (based on the AST from the document cache!),
so that we can look up types in the Document's local type registry.
2024-08-28 11:02:42 +02:00
Tobias Hunger
b5b5f59990
Move AST nodes closer to the simple value extractor
2024-08-28 11:02:11 +02:00
Tobias Hunger
7572869541
live-preview: Remove splitter from PropertyEditor
2024-08-28 11:01:57 +02:00
Olivier Goffart
ac8dd60481
LSP: don't insert semicolon after completing a property
...
Fixes https://github.com/slint-ui/slint/issues/5966
The previous behavior, as described in the issue is:
(where `|` is the cursor)
```slint
Rectangle {
back|
}
```
and autocomplete background, it will insert
```slint
Rectangle {
background: |;
}
```
This commit changes to not add the semicolon, so the result will be
```slint
Rectangle {
background: |
}
```
2024-08-27 14:39:52 +02:00
FloVanGH
13692e2647
Added swap to VecModel ( #5965 )
2024-08-27 11:08:55 +00:00
FloVanGH
039f33eaae
Added scrolled callback to ListView and ScrollView ( #5964 )
2024-08-27 10:18:43 +00:00
Olivier Goffart
f5d950cf0c
LSP: don't auto-complete out property of builtin elements as binding
2024-08-27 12:03:03 +02:00
Olivier Goffart
f57cd6735b
janitor: better panic message when accessing wrong NamedReference
2024-08-27 12:01:54 +02:00
FloVanGH
c9f005b40a
Fixed TimePickerPopup does not open minute view by click on selected hour ( #5959 )
2024-08-27 09:56:55 +00:00
Olivier Goffart
45a9c7235a
vscode: report LSP panic as telemetry error
...
We write the panic message in a file to communicate with the vscode
extension
2024-08-27 11:10:09 +02:00
FloVanGH
a5bb83c6b9
Added clear to VecModel ( #5960 )
2024-08-27 09:09:25 +00:00
FloVanGH
7a0c3dcc50
Do not trigger current-item-changed on StandardListView if current-item is set on the same value ( #5958 )
2024-08-27 07:22:18 +00:00
Nigel Breslaw
1d434ad242
Turn on syntax, linting and code formatting checks for the VSCode project
...
Enables the following checks for the editors/vscode extension project on CI:
- Typescript syntax checking.
- Code formating (biome).
- Code linting (biome).
Documents usage in Readme.md
2024-08-26 17:59:13 +02:00
Nigel Breslaw
bb71a218c3
Lint and build the VScode extension as a CI check
...
VScode extension package is now linted, built and packaged as a CI check.
2024-08-26 15:45:38 +02:00
Simon Hausmann
1a1b498082
Only report telemetry to slint.dev if we're running in production mode
...
Otherwise report to staging.slint.dev
2024-08-26 15:45:05 +02:00