Commit graph

128 commits

Author SHA1 Message Date
Olivier Goffart
d769f272e1 slint-viewer: fix the docs for the -L option 2024-02-06 13:31:59 +01:00
Carter Hunt Fogelman
ff27bc79ae Wrap all non-test uses of in a BufWriter/BufReader for efficiency 2023-12-27 09:15:53 +01:00
J-P Nurmi
c5248c005e Allow specifying paths for @library imports 2023-10-20 16:47:00 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
Guilhem Vallat
555e191ab4 remove clippy::needless_borrow warnings 2023-06-30 12:28:13 +02:00
Guiguiprim
c57354e150
Interpreter: Add support for save/load of enums (#3012)
Fixes #3011
2023-06-29 09:25:46 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Olivier Goffart
99ab5e78d4 Implement a way to run future on the slint event loop
Closes #747
2023-06-16 08:35:19 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs (#2888) 2023-06-15 11:20:50 +02:00
Simon Hausmann
ca3a6bd586 Fix Qt High-DPI support with the interpreter
See parent commit for details.
2023-06-10 11:41:04 +02:00
Olivier Goffart
d8b0737b1d Translations: disable gettext by default for C++ and the viewer
Can cause problem when compiling on windows or mac
2023-06-08 16:56:10 +02:00
Olivier Goffart
bbc50edd29 Make translation work in the viewer 2023-06-05 16:34:59 +02:00
Olivier Goffart
ce25fb65a6 Pass the translation domain to the runtime
For rust, it uses the crate name, for others, it needs to be passed in
the comment line
2023-06-05 16:34:59 +02:00
Tobias Hunger
3ac01c3f07 clippy: Fix clippy warnings 2023-03-09 09:35:29 +01:00
Olivier Goffart
6889dfa5f5 Rust: Make new(), run() and show() report errors from the backend
Fixes #2198
2023-02-10 05:00:03 +01:00
Tobias Hunger
2bbf236e25 janitor: Update clap to 4.0 (+fix some typos) 2022-10-26 08:59:36 +02:00
Olivier Goffart
6ede77436b api: Return an error from invoke_from_event_loop and quit_event_loop 2022-09-07 10:13:58 +02:00
Olivier Goffart
9f5106eef1 Janitor: update notify dependency 2022-09-01 15:39:04 +02:00
Olivier Goffart
7417422e3c Make the PlatformAbstraction not Send using a EventLoopProxy trait
This changes the way the platform abstraction is initialized
2022-08-24 11:32:21 +02:00
Simon Hausmann
3e40835ec2 Fix more clap deprecation warnings 2022-06-14 11:32:03 +02:00
Simon Hausmann
8866e85898 Enable the simple env logger on slint-viewer
This makes it possible to see the output from the log facade in any
crates that Slint uses, using the RUST_LOG environment variable..
2022-05-17 16:58:50 +02:00
Simon Hausmann
9a8c5fed9f Remove the ugly style
It's ugly ;-)

The combo box for the style is commented out for now, so that we can
easily re-add it in the future once we add a new style.
2022-04-13 10:35:42 +02:00
Tobias Hunger
c68291b7f8 Janitor: Clap update + basic functionality addition to all binaries
Make clap generate `--version`, and make it add more informtaion from
Cargo.toml available in `--help`.
2022-03-10 12:34:36 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
The README.md contains the warning that used to be in lib.rs.

Add README.md files to all internal crates

... pointing to the official public crate to use instead.

Rename internal crates

fixup: README files

fixup rename
2022-02-07 13:12:48 +01:00
Tobias Hunger
1a0a495bc5
Rename environment variables 2022-02-02 13:35:07 +01:00
Olivier Goffart
03534039d6 Replace more .60 by .slint
Mainly an automated change with
    git grep -O"sed -i 's/\.60/.slint/g'" -w "\.60"

and some manual checks
2022-02-02 10:12:31 +01:00
Simon Hausmann
2f73a27635 Rename the sixtyfps-interpreter crate 2022-02-01 18:11:25 +01:00
Simon Hausmann
9494068201 Rename the sixtyfps-rendering-backend-selector crate 2022-02-01 18:06:49 +01:00
Simon Hausmann
ad0c020aa4 Rename the sixtyfps-corelib crate 2022-02-01 18:04:30 +01:00
Tobias Hunger
a3b86690ff [reorg]: Move the rendering backends into internal 2022-01-31 16:00:50 +01:00
Olivier Goffart
929166f06c Change what is accepted by ModelRc::new and ModelRc::from
- ModelRc::new constructs a ModelRc from a impl Model
 - ModelRc::form constructs a ModelRc from a `Rc<dyn Model>` or `Rc<impl Model>`
2022-01-31 14:44:35 +01:00
Simon Hausmann
fb64e308b3 Align Rust interpreter instance handling API with the main Rust API crate
Implement `sixtyfps::ComponentHandle` for `ComponentInstance`, instead of providing a copy of the API.

This also removes `WeakComponentInstance` and enables the use of `sixtyfps::Weak` for weak handles. This has the advantage that `sixtyfps:Weak`'s `upgrade_in_event_loop` becomes available with the interpreter, and the
weak handle is Send.
2022-01-31 14:29:09 +01:00
Tobias Hunger
018c1a6666 Rename ModelHandle to SharedModel
This patch is mostly a rename now, but also contains a few small
cleanups.

SharedModel implements the Model trait itself and gracefully falls back
to an empty model is no Model was provided. This allows for some small
simplifications.

Also make sure to use the same comparision for SharedModels everywhere.
This fixes the last remaining clippy errors we had.
2022-01-30 01:26:35 +01:00
Olivier Goffart
02bfdda0e3 Use ModelHandle in Value::Model
As a drive by change, remove the special comparison
for the SharedVectorModel. Two different model that have the
same elements are still not equal
2022-01-27 18:37:36 +01:00
Simon Hausmann
de40e002c3 WIP: Remove sixtyfps_interpreter::Value::Array
This is never created
2022-01-27 18:37:36 +01:00
Tobias Hunger
c02da14dc8 Move from stuctopt to clap 3
* Do not explicitly enable color output: That is default anyway
* Consistently use from_os_str() for file pathes
* Fix wrong types used in some places
2022-01-10 16:53:08 +01:00
Tobias Hunger
11d46892e4
janitor: Remove some unnecessary lazy evaluation 2022-01-04 18:22:49 +01:00
Tobias Hunger
767704a88b
janitor: Remove some redundant closures 2022-01-04 18:21:07 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
82a1cc1e83 Viewer: Added way to execute commands on callbacks 2021-10-12 13:58:52 +02:00
Olivier Goffart
d058e4c10e Viewer: Make the "Close" button properly close 2021-10-07 11:26:09 +02:00
Tobias Hunger
d79894769b viewer: Prettify help output
The options in sixtyfps-viewer --help used to look like this:

```
OPTIONS:
        --backend <backend>                         The rendering backend [default: ]
    -I <include path for other .60 files>...
        --load-data <load data file>                Load properties from a json file ('-' for stdin)
        --save-data <save data file>                Store properties values in a json file at exit ('-' for stdout)
        --style <style name>                        The style name ('native', 'fluent', or 'ugly') [default: ]
```

This patch removes the useless "[default: ]" part. These are options,
so even without this text it should be very obvious that the `--style`
and the `--backend` parameters are indeed optional.
2021-10-05 21:40:13 +02:00
Olivier Goffart
cf2e189245 Small fix to the viewer docs 2021-09-30 11:48:09 +02:00
Olivier Goffart
7db9f3dfa9 Dialog: automatically add clicked callback for the standard button
And make the viewer listen to them and set them to automatically close dialogs
2021-09-30 10:21:13 +02:00
Simon Hausmann
21f9850b43 Small spelling fix 2021-09-29 14:55:08 +02:00
Olivier Goffart
0eb223b2ca Update tools/viewer/main.rs
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-09-24 09:23:48 +02:00
Olivier Goffart
321d985242 Viewer: add ability to load and save property values from/to json
issue #238
2021-09-24 09:23:48 +02:00
Olivier Goffart
fe015a8086 Allow the sixtyfps-compiler and sixtyfps-viewer to read from stdin
By specifing `-` as a path
2021-09-09 15:30:52 +02:00
Tobias Hunger
1d71a2beeb Janitor: Fix clippy::collapsible_if 2021-08-09 13:19:34 +02:00