Commit graph

12541 commits

Author SHA1 Message Date
Update Translations Bot
74e23881b5 Update Translations: extract strings 2024-11-18 03:16:35 +00:00
Nigel Breslaw
35e2dba95f
Fix npm security warning
Fixes https://github.com/slint-ui/slint/security/dependabot/17
2024-11-18 00:20:50 +02:00
Nigel Breslaw
b7278f6ca8
Enhance docs theme
Makes the dark theme look less like 'default Starlight'.
Syntax coloring uses the dark and light-plus theme.
Types are displayed as badges.
2024-11-17 21:31:32 +02:00
Simon Hausmann
a537556b77 Bump FemtoVG renderer
Fixes #2314
2024-11-17 15:03:33 +01:00
Olivier Goffart
d68b84a3f1
Change API to set the language with bundle translation
* Change API to set the language with bundle translation

Part of #6793
2024-11-17 11:40:02 +01:00
Nigel Breslaw
ebd1c2eb09
Put back missing _templates to fix nightly snapshots 2024-11-16 00:30:29 +02:00
Nigel Breslaw
04a870a589
Bring more old docs content into the new system
More language guide and move some items into an FAQ
2024-11-15 19:56:58 +02:00
Simon Hausmann
1866c4cecc Fix version number 2024-11-15 14:34:07 +01:00
Simon Hausmann
5ecc0f0b47
Fix panic when code in init callback of conditional/repeater re-triggers repeater traversal (#3215)
Don't call init() while mutably borrowing the repeater's inner.

Fixes #3214
2024-11-15 14:25:36 +01:00
Tobias Hunger
a1d6ce3814 live-preview: Stay in select-mode after selecting something 2024-11-15 14:19:12 +01:00
Tobias Hunger
b86a8e41ce live-preview: Remove dead code related to design mode
That mode can no longer get enabled, so get rid of
the entire thing.
2024-11-15 14:18:56 +01:00
Nigel Breslaw
300423d03f
Enhance new docs
Fix very broken github link.
Move some items around and group std-widgets similar to element reference.
Move Timer to elements.
Use the simpler :::tip[Tip] markdown style.
Update Astro and the link validator.
2024-11-15 13:18:58 +02:00
FloVanGH
5ea05e18af
std-widgets: added horizontal-alignment to SpinBox (#6778) 2024-11-15 08:05:57 +00:00
Simon Hausmann
d8a62ab41e
Remove debug output not needed anymore 2024-11-14 20:31:45 +01:00
Simon Hausmann
7564286a01 Add more debug output to the snapshot docs publishing debugging 2024-11-14 17:59:00 +01:00
Simon Hausmann
6f784ac7a8 Show which files from the slint docs are copied 2024-11-14 17:31:56 +01:00
Simon Hausmann
bf2ad512c6 Add the Slint version to the docs
This might not be the final location, but for now this should permit publishing.
2024-11-14 16:47:54 +01:00
Nigel Breslaw
08d90a5f13
Next gen docs for 1.9 (#6766)
Co-authored-by: Aurindam Jana <aurindam.jana@slint.dev>
Co-authored-by: Tobias Hunger <tobias.hunger@slint.dev>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-11-14 15:52:35 +01:00
Olivier Goffart
5b3ea5cdd5 LSP: record dependencies and invalid all dependents when a dependencies changes
Fixes #5797
2024-11-14 14:35:22 +01:00
Olivier Goffart
cde5133045 compiler: Remember all import in the document with their absolute path
That way we will be able to use that in the LSP to get the dependencies
2024-11-14 14:35:22 +01:00
Olivier Goffart
ed951202e4 compiler: process the import a bit differently
Don't filter type import with the extension. Instead if the import
statement is having braces, always consider it is a slint file, and if
not, consider it as a foreign import
2024-11-14 14:35:22 +01:00
Olivier Goffart
0533fa4acf compiler: don't call resolve_import_path twice
`resolved_import` is only used for non .slint file.
For slint file, `ensure_document_loaded` will call
`resolve_import_path` again.
2024-11-14 14:35:22 +01:00
Simon Hausmann
65fb9d84b4 Correct and simplify Node demo/examples instructions 2024-11-14 14:10:02 +01:00
Tobias Hunger
cfb29c51ae live-preview: Move drop mark colors into styling.slint 2024-11-14 14:07:37 +01:00
Tobias Hunger
51d8205e08 live-preview: Use another seelction color for interactive building blocks
... like TouchArea and such. This might help a bit with what
you are actually selecting.
2024-11-14 14:07:37 +01:00
Tobias Hunger
88f705a777 live-preview: Move selection colors into styling.slint 2024-11-14 13:24:38 +01:00
Simon Hausmann
bc3a672e73 Remove slightly confusing log when the slint-ui npm package gets installed locally
This would appear also when running `pnpm install` globally. If there's diagnostic output to be generated for this situation, it needs to go elsewhere.
2024-11-14 12:59:33 +01:00
Simon Hausmann
e0d9ba5556 Comment out console.log call that doesn't quite work
It shows `Error loading rust-module.cjs: {error}`, which isn't very helpful.
2024-11-14 12:44:20 +01:00
Simon Hausmann
9f7e407eff Fix fallback to source builds
Continue to run build-on-demand.mjs to permit a fallback to a
from-source build for users who run `npm install slint-ui` on a platform
where we don't provide binaries for (such as linux-armv7/64). However,
this is only done when run from the installed package, not from git.
From git, the prestart trick remains in use.
2024-11-14 12:25:42 +01:00
Nigel Breslaw
0461abfc73 Avoid building Rust on pnpm install 2024-11-14 12:25:42 +01:00
FloVanGH
9cfe8862f9
embed glyphs: removed duplicated, added missing chars (#6782) 2024-11-14 07:36:25 +00:00
Olivier Goffart
ed372e91a1 Fix wrong optimization trying to merge common properties around assignments
the deduplicate_property_read was bailing out the replacement if one
part of the coinditional branch do assignment. But the other part might
already have partial assignment, so we must continue

Fixes #6616
2024-11-13 22:14:56 +01:00
Olivier Goffart
f8f6282a05 swrenderer: Fix drawing of clipped VectorFont
That code was touched recently while doing the signed distance field
rendering. The offset is now within the source rectangle.
So the SharedBufferCommand's source_rect must include the whole pixmap.

Unfortunately, VectorFont are not covered by the screenshot tests
2024-11-13 22:14:31 +01:00
Simon Hausmann
a3e2076bd3 Add home-automation to Torizon demo image 2024-11-13 15:10:06 +01:00
Simon Hausmann
a7a3b3f9ee Changelog: C++: Add slint::Window::take_snapshot()
Corresponds to the Rust API.
2024-11-13 12:38:36 +01:00
dependabot[bot]
8fdbfc5ee5
Bump the github-actions group across 1 directory with 8 updates (#6719)
Bumps the github-actions group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [pyvista/setup-headless-display-action](https://github.com/pyvista/setup-headless-display-action) | `1` | `2` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `1` | `3` |
| [docker/login-action](https://github.com/docker/login-action) | `1` | `3` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `3` | `6` |
| [zephyrproject-rtos/action-zephyr-setup](https://github.com/zephyrproject-rtos/action-zephyr-setup) | `1.0.2` | `1.0.3` |
| [streetsidesoftware/cspell-action](https://github.com/streetsidesoftware/cspell-action) | `5` | `6` |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `2` | `3` |
| [robinraju/release-downloader](https://github.com/robinraju/release-downloader) | `1.9` | `1.11` |



Updates `pyvista/setup-headless-display-action` from 1 to 2
- [Release notes](https://github.com/pyvista/setup-headless-display-action/releases)
- [Commits](https://github.com/pyvista/setup-headless-display-action/compare/v1...v2)

Updates `docker/setup-buildx-action` from 1 to 3
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v3)

Updates `docker/login-action` from 1 to 3
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v3)

Updates `docker/build-push-action` from 3 to 6
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v6)

Updates `zephyrproject-rtos/action-zephyr-setup` from 1.0.2 to 1.0.3
- [Commits](https://github.com/zephyrproject-rtos/action-zephyr-setup/compare/v1.0.2...v1.0.3)

Updates `streetsidesoftware/cspell-action` from 5 to 6
- [Release notes](https://github.com/streetsidesoftware/cspell-action/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell-action/compare/v5...v6)

Updates `docker/setup-qemu-action` from 2 to 3
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

Updates `robinraju/release-downloader` from 1.9 to 1.11
- [Release notes](https://github.com/robinraju/release-downloader/releases)
- [Commits](https://github.com/robinraju/release-downloader/compare/v1.9...v1.11)

---
updated-dependencies:
- dependency-name: pyvista/setup-headless-display-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: zephyrproject-rtos/action-zephyr-setup
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: streetsidesoftware/cspell-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: robinraju/release-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-13 11:40:21 +02:00
Nigel Breslaw
892471205e
Home Automation fixes
Fix for incorrect sized SVG on web.
Fix for incorrect gradient on HVAC for web.
Fix for opacity animation not being triggered.
Fix for README having incorrect copy paste info.
2024-11-12 17:05:11 +02:00
Olivier Goffart
650fd0eef5 Fix panic when calling expression containing un-called macro
Fixes #6650
2024-11-11 16:08:22 +01:00
FloVanGH
2cb5fb1d99
std-widgets: fixed arrow size of scroll bar button (#6728) 2024-11-11 15:02:39 +00:00
Olivier Goffart
e854e11399 Error when making a for over an empty array
Instead of panicking.

Attempt to fix it in #6765 didn't work for C++.
Code generation might be hard for C++, so I thought it's better to error out.

Fix #6760
2024-11-11 13:23:56 +01:00
Olivier Goffart
9cbc4aa6ce LSP: report that we use UTF-8 to client that supports it
Version 3.17 of the spec added a `position_encoding` field in the
ServerCapabilities, so use that.

Note that the spec says that UTF-16 is mendatory, and vscode only
support utf-16, meaning we currently have a bug when having non-ascii in
the source (#5669)
2024-11-08 12:13:26 +01:00
Tobias Hunger
fc01c549d3 interpreter: Find more elements in source code
Elements of the form `component Foo { ... }` contain
no `QualifiedName`, so they were ignored. Use the 
`{` as the seelction range for those elements.
2024-11-08 10:32:10 +01:00
Tobias Hunger
a765da347c live-preview: Unconfuse selection with a drop shadow
Unconfuse selecting something with a drop shadow. That is a
extra compiler-generated element that gets added before
the actual element we are looking for.
2024-11-07 18:33:50 +01:00
Olivier Goffart
b0c7ac41f0 Add debug statements
to help debugging #6432
2024-11-07 17:24:06 +01:00
Olivier Goffart
34332cc8b3 LSP: completion of callback snippet including argument names 2024-11-07 10:07:25 +01:00
Olivier Goffart
59b8c1cf73 LSP: refactor resolve_element_scope
to do the snippet in that function
2024-11-07 10:07:25 +01:00
Tobias Hunger
74785691f5 slintpad: Fix goto definition again
... by implementing it manually again :-/ And by
not using the EditorService that I thought was handling that.

And of course a TS map silently falls when your key is a Url,
so that needed fixing, too.

Fixes: #6706
2024-11-07 09:34:56 +01:00
FloVanGH
c84af1a8d7
std-widgets: added LayoutSpec global (#6711) 2024-11-06 14:47:04 +00:00
Olivier Goffart
e3ea25f48c LSP: Signature Help 2024-11-06 13:27:29 +01:00
szecket
c52fdd71bc
preview: attempting a header change to optimize usability (#6720)
changed the interaction for header view
both library and properties can be shown anytime
and selection is is a toggle button at any time
suggestions:
goes hand in hand with the selection mode
likely requires settings for toggle or single
select.

attempting a header change to optimize usability
TODO: make dragging from library automatically
into edit mode

the toggle that existed is the same as toggling a button - whcih can sit next to the closed library and properties.
properties should be editable while selection is active so those should be openable / visible whether in edit mode or not.

STILL TODO:
- make dragging from library automatically into edit mode
- add settings to either single select 'inspect' button or toggle on off
- change display of active icon OR add icon for toggled mode for clearer display than blue icon for inspect
2024-11-05 18:51:38 +01:00