Commit graph

8435 commits

Author SHA1 Message Date
Olivier Goffart
f8bbb257f3 vscode extension: Move the web preview to a different file 2023-04-12 12:03:08 +02:00
Simon Hausmann
2a4a6f7887 winit: Fix dark color scheme not always being detected correctly
When the dark color scheme was queried before the window was mapped, we'd initialize it to false,
but never update it to the actual theme value.

Fixes #2533
2023-04-12 10:40:28 +02:00
Olivier Goffart
a45ac844bb figma importer: better error message when there is no start node
CC #2470
2023-04-12 09:24:08 +02:00
Simon Hausmann
feb5f90671 Document the enabled property of FocusScope in terms of tab focus traversal. 2023-04-12 08:48:24 +02:00
Simon Hausmann
77895d3a2a doc: Document the enabled property of FocusScope
Also add a test for the described behavior.
2023-04-12 08:48:24 +02:00
Simon Hausmann
9a35989eea Fix outer FocusScope objects stealing click-focus
After the `FocusScope` accepted the input event by transferring focus, stop
propagating the event and avoid it being sent to a parent,
which in turn will steal the focus.
2023-04-12 08:48:24 +02:00
Jan Janssen
decdf07be0 examples: Add uefi-demo 2023-04-12 08:23:09 +02:00
Olivier Goffart
6d0d6911f4 Fix visitation of init code
This patch merges the changes from #2344 and #2491 and do some cleanup

In particular, this visit the init code expression when visiting the
root element expression

Closes #2344
Closes #2491
Fixes #2487
2023-04-11 21:30:01 +02:00
Simon Hausmann
a5bea16596
Add Ninja to the list of required tools (#2498)
We have plenty of command lines that explicitly use `-GNinja`, so let's
make Ninja a tool that is required. That's easier than changing all the
command lines to have two variants (use XX or YY if you have Ninja
installed), and we know that the dependency handling works best with
Ninja.

Fixes #2495

Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
2023-04-11 16:35:28 +02:00
Simon Hausmann
e1d98735fb janitor: Add missing changelog entry for TextInput qt alignment fix 2023-04-11 14:22:49 +02:00
Simon Hausmann
81d3b4a930 Qt: Fix missing support for horizontal alignment in TextInput
Apply horizontal alignment to the text lines created by QTextLayout.

Fixes #2524
2023-04-11 14:21:01 +02:00
Olivier Goffart
fd3f974d7e Don't use old syntax in docs 2023-04-06 17:06:46 +02:00
Olivier Goffart
4bc741a04c LSP: don't throw a protocol error when a symbol can't be renamed
I misread the spec that we should return an error if there is nothing
to rename. We should just return None instead.

This means that the editor will no longer show an error message when
this happens (and also that we can rename stuff in rust code without
getting annoying error)

Technicly, we could still return an error if the user tries to rename a
property or so, but i don't think its worth it
2023-04-06 16:23:58 +02:00
ShootingStarDragons
63926382e3 feat: make fmt be a crate
make it can be a crate, then it can be used in lsp
2023-04-06 13:12:17 +02:00
Simon Hausmann
23d1662281 memory tutorial: fix build errors when accessing the memory tiles from native code
The memory_tiles property cannot be private.
2023-04-06 10:56:12 +02:00
Simon Hausmann
86db590a37 memory tutorial: Fix tile misrendering
Due to auto-centering, the left curtain would be rendered at the wrong place. Explicitly place it at 0px;
2023-04-06 10:56:12 +02:00
Olivier Goffart
8b1683bf0a Fix code snippet in README 2023-04-05 21:00:51 +02:00
Olivier Goffart
b6ba268f41 ChangeLog for recent LSP changes 2023-04-05 20:05:09 +02:00
Olivier Goffart
208d89c1de LSP: Don't auto-complete reserved properties or sub-elements for globals 2023-04-05 20:05:09 +02:00
Olivier Goffart
7ee563a02e LSP: aulways load std-widgets.slint so we can auto-complete widgets 2023-04-05 20:05:09 +02:00
Olivier Goffart
95ecd7dfdf LSP: Also auto-complete type for import in location where there is already a component name 2023-04-05 20:05:09 +02:00
Simon Hausmann
ab051680e5 janitor: Rename GLWindow to WinitWindowAdapter
It's no more an "OpenGL Window", it's the type that adapts winit to our windowing
system abstraction.
2023-04-05 11:04:19 +02:00
Olivier Goffart
09fc4010ff Add a easy to find link to Slint homepage from the docs intro.
Since the theme don't have obvious link to the homepage, at least add a
link early in the first documentation page
2023-04-05 06:52:25 +02:00
Kavindra Palaraja
5f239124de Remove intro.md from the list of files 2023-04-04 18:57:35 +02:00
Kavindra Palaraja
803c02bc41 Remote trailing sentence fragment 2023-04-04 18:57:35 +02:00
Kavindra Palaraja
9f51fd61b7 Improve the landing page for the Slint Language documentation
Remove the Intro page and move that content to the landing page instead.
2023-04-04 18:57:35 +02:00
Simon Hausmann
08c0f1b34e Clean up hack to detect if we're doing a top-level build
... by introducing an explicit variable.

cc #2075
2023-04-04 09:06:38 +02:00
Florian Blasius
b796fb1ada fix npm package link 2023-04-04 07:33:52 +02:00
Simon Hausmann
13a5d3c5cd Fix builds of applications using Slint via FetchContent (part 2)
Amend 8406e1050d by fixing the condition
to apply the install_name when the cache variable used to detect package
builds is defined, not _not_ defined.

cc #2075
2023-04-03 17:36:34 +02:00
Alex Kladov
ba793a8447 Update intro.md 2023-04-03 17:04:14 +02:00
Simon Hausmann
8406e1050d Fix builds of applications using Slint via FetchContent
Set install_name to include rpath as per commit
916b927f4f only when doing top-level
builds that are meant to be installed via "make install".

cc #2075
2023-04-03 17:01:47 +02:00
Simon Hausmann
916b927f4f macOS: Fix installed libslint_cpp.dylib containing references to the build directory
Thanks to @jschwe, there's a way to instruct corrosion to supply link
flags that set the install name and work around cargo/rustc behavior.

In exchange, now that we're using rpath, to be able to continue to run
the tests and examples against a build tree, we need to set
CMAKE_BUILD_RPATH.

Fixes #2075
2023-04-03 15:59:01 +02:00
Simon Hausmann
d87af7e917 Fix panic when binding Path's commands property to a model entry's field
Fixes #2466
2023-04-03 15:25:13 +02:00
Simon Hausmann
ef2120bd0a Revert "Prepare for release: add Cargo.lock and set the version number in the docs"
This reverts commit 0cc9a87048.
2023-04-03 14:33:08 +02:00
Olivier Goffart
86684e9f8c energy-monitory: Correct time on wasm demo 2023-04-03 11:29:50 +02:00
Olivier Goffart
ce59045d09 energy-monitor: Don't pull default features of chrono
One of the default feature is "oldtime" which bring a crate that has a
security advisory and shows a warning in dependabot
2023-04-03 10:46:41 +02:00
Olivier Goffart
ddb87c603c Date in the changelog 2023-04-03 09:20:10 +02:00
Simon Hausmann
62347ca741 README: Tweak desktop wording 2023-04-03 09:17:04 +02:00
Simon Hausmann
8df41a37cb Replace the todo entry in the demos with the energy monitor demo 2023-04-03 08:05:55 +02:00
Olivier Goffart
0cc9a87048 Prepare for release: add Cargo.lock and set the version number in the docs
We add the Cargo.lock for the release so that the tagged commit has it,
this will be usefull for the C++ users who build from source with a
tagged version of slint. Because we want to reduce the likelyhod that
they get compilation error in a dependent crate

This will be reverted after the release.
2023-04-03 07:42:44 +02:00
Olivier Goffart
645824ae7a tutorial, remove hardcoded release from url
That's how the other tutorial do it
2023-04-03 07:40:07 +02:00
Olivier Goffart
34f41f35f1 Update dependencies in readme and docs 2023-04-03 07:37:09 +02:00
Olivier Goffart
cae1ef1238 Date in Changelog for the release 2023-04-03 07:29:02 +02:00
Tobias Hunger
64022bf0bd docs: Document release tags for use in cmake 2023-04-01 23:21:31 +02:00
Simon Hausmann
408577a68c Disable panning when showing a selected page 2023-04-01 21:06:42 +02:00
Simon Hausmann
76e3c2a283
Minor UI tweaks (#2459)
- Avoid overly large button at the bottom
- Avoid overly wide checkbox and combobox
- Distinguish the button with icon by text
2023-03-31 16:49:05 +02:00
Simon Hausmann
43234dafc5 Fix loading of demos in SlintPad
Add a data attribute hack to force auto-resizing to the preferred size
in SlintPad. Otherwise the initial size of the hello world will remain
in effect when loading other demos.
2023-03-31 15:23:55 +02:00
Tobias Hunger
7cd07906cc slintpad: Mention npm install in the README 2023-03-31 13:54:10 +02:00
Tobias Hunger
45f6ffdf36 slintpad: Error out when exporting gists with folders
The gist API does not support that.
2023-03-31 13:54:10 +02:00
Tobias Hunger
b36cfb09c0 slintpad: Make export URL dialog prettier
Align to the right and make sure the URLs open in a new tab
2023-03-31 13:54:10 +02:00