Commit graph

12467 commits

Author SHA1 Message Date
szecket
db83921f1d hover change and position of window 2024-11-19 20:20:14 +01:00
szecket
0aed233f55 live-preview: move filename and lock height 2024-11-19 20:20:14 +01:00
Tobias Hunger
11169ef149 live-preview: Prettify file names in Selection Popup 2024-11-19 20:20:14 +01:00
Tobias Hunger
defe76649b live-preview: Show hint for right click 2024-11-19 20:20:14 +01:00
Tobias Hunger
f5682ea2e8 live-preview: Fix height calculation 2024-11-19 20:20:14 +01:00
Tobias Hunger
828385b918 live-preview: Sort some properties 2024-11-19 20:20:14 +01:00
Tobias Hunger
004ade9d44 live-preview: Implement a UI for the selection stack 2024-11-19 20:20:14 +01:00
Tobias Hunger
9d5b9fb46a live-preview: Implement a selection stack
... that provides a model containing all the elements
at a position sorted from "front" to "back" with extra
information so that we can present the data in a nice UI
in the next step.

The selection code now filters out builtins and ignore nodes
when collecting nodes. So the following filter step does not
need to take those into account anymore.

Whether a selection candidate is actually a part of the root
component or not is now handled by looking at whether the
elements text range is inside the root component's text
range. This is closer to what users expect to happen I think.
2024-11-19 20:20:14 +01:00
Olivier Goffart
c9de4d94dd printerdemo: Don't use cfg! in the build script
That is compiled on the host. Use the TARGET env variable instead
2024-11-19 17:23:52 +01:00
Aurindam Jana
9d851b7942
fix typo 2024-11-19 13:09:48 +01:00
Aurindam Jana
0f15dc8c55
slint/editors/README.md - Add TOC 2024-11-19 13:09:07 +01:00
dependabot[bot]
f1cf20e212
Bump zephyrproject-rtos/action-zephyr-setup in the github-actions group (#6814)
Bumps the github-actions group with 1 update: [zephyrproject-rtos/action-zephyr-setup](https://github.com/zephyrproject-rtos/action-zephyr-setup).


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

---
updated-dependencies:
- dependency-name: zephyrproject-rtos/action-zephyr-setup
  dependency-type: direct:production
  update-type: version-update:semver-patch
  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-19 13:13:17 +02:00
Nigel Breslaw
bcbf461043
1.9 docs fix types table 2024-11-19 13:11:38 +02:00
Aurindam Jana
3c23187ebf Docs: Update custom.css 2024-11-19 11:04:16 +01:00
Aurindam Jana
873509127d Update Logo for Slint docs
Use the small version of the logo
2024-11-19 10:25:24 +01:00
Tobias Hunger
c514286122 interpreter: Add test for element_node_at_source_position 2024-11-19 10:13:22 +01:00
Milian Wolff
f6da161dbb
Reduce SmolStr <-> &str conversions and copies (#6688)
SmolStr has an Arc internally for large strings. This allows
cheap copies of large strings, but we lose that ability
when we convert the SmolStr to a &str and then reconstruct a
SmolStr from that slice.

I was hoping for some larger gains here, considering the impact
of this code change, but it only removes ~50k allocations,
while the impact on the runtime is not noticeable at all.

Still, I believe this is the right thing to do.

Before:
```
        allocations:            2338981

  Time (mean ± σ):     988.3 ms ±  17.9 ms    [User: 690.2 ms, System: 206.4 ms]
  Range (min … max):   956.4 ms … 1016.3 ms    10 runs
```

After:
```
        allocations:            2287723

  Time (mean ± σ):     989.8 ms ±  23.2 ms    [User: 699.2 ms, System: 197.6 ms]
  Range (min … max):   945.3 ms … 1021.4 ms    10 runs
```
2024-11-19 10:07:16 +01:00
Simon Hausmann
f860c6014d docs: Fix comic sans installation 2024-11-19 09:09:20 +01:00
SuchAFuriousDeath
1b112c9cfc
Implements AsRef<Path>, AsRef<OsStr> for SharedString
Closes #6810
2024-11-19 08:08:09 +01:00
Olivier Goffart
014b58c81a
C++: allow to configure bundled translation 2024-11-18 15:57:08 +01:00
Olivier Goffart
fb6ab7a1b8
Improve github issue templates 2024-11-18 15:56:41 +01:00
szecket
418f279abd
Sub attributes2 (#6749)
* spacing correction

* converted all property value blocks to widgets

* added secondary controls for color and string

* added secondary visuals to make hierarchy more visible

* live-preview: Wire up color widget with the backend

It lets you select colors based on the sliders, but it will
*only* apply the color when you hit enter on the text field
with the color string...

Not nice, but at least it does not keep losing state as it
round-trips the change through the code and compiler and
gets the state reset all the time.

* more dummy data

* cleanup of property sheet based on new controls

* added secondary visuals to make hierarchy more visible

correct extraneous changes

---------

Co-authored-by: Tobias Hunger <tobias.hunger@slint.dev>
2024-11-19 02:55:30 +13:00
Olivier Goffart
e7cf28531d slint-compiler: Don't use signed distance fields by default 2024-11-18 13:24:59 +01:00
Simon Hausmann
179f657a50
Show the exact feature condition around feature-gated types/functions… (#6820) 2024-11-18 13:21:58 +01:00
Olivier Goffart
0dbc029cdc slint-build: Add config option to set the path for bundled translations
Part of #6793
2024-11-18 13:17:18 +01:00
Simon Hausmann
46151e6908 Try to install comic sans via MS corefonts for the docs build 2024-11-18 11:50:22 +01:00
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