Rename sixtyfps-viewer -> slint-viewer

This commit is contained in:
Olivier Goffart 2022-02-02 13:17:29 +01:00
parent 8f3d378d2d
commit 69908a32b6
14 changed files with 32 additions and 32 deletions

View file

@ -22,10 +22,10 @@ on:
- cron: '0 4 * * *'
jobs:
sixtyfps-viewer-binary:
slint-viewer-binary:
uses: sixtyfpsui/sixtyfps/.github/workflows/sixtyfps_tool_binary.yaml@wip/rename
with:
program: "sixtyfps-viewer"
program: "slint-viewer"
slint-lsp-binary:
uses: sixtyfpsui/sixtyfps/.github/workflows/sixtyfps_tool_binary.yaml@wip/rename
with:

View file

@ -1,7 +1,7 @@
# Copyright © SixtyFPS GmbH <info@sixtyfps.io>
# SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
name: Build sixtyfps-viewer or -lsp binary
name: Build slint-viewer or -lsp binary
on:
workflow_dispatch:
@ -10,7 +10,7 @@ on:
type: choice
description: binary to build
options:
- sixtyfps-viewer
- slint-viewer
- slint-lsp
workflow_call:
inputs:

View file

@ -117,8 +117,8 @@ as well as the [Rust migration guide for the `sixtyfps` crate](api/sixtyfps-rs/m
### Added
- New `no-frame` property of a `Window` which changes it to borderless/frameless
- sixtyfps-compiler and sixtyfps-viewer can read the .60 file content from stdin by passing `-`
- sixtyfps-viewer gained ability to read or save the property values to a json file with `--save-data` and `--load-data`
- sixtyfps-compiler and slint-viewer can read the .60 file content from stdin by passing `-`
- slint-viewer gained ability to read or save the property values to a json file with `--save-data` and `--load-data`
- New `StandardButton` widget
- New `Dialog` element
- `sixtyfps::Image` has now a `path()` accessor function in Rust and C++ to access the optional path
@ -212,7 +212,7 @@ as well as the [Rust migration guide for the `sixtyfps` crate](api/sixtyfps-rs/m
and `preferred-height` property can be used to set the initial size and the window remains resizable
by the user, if the window manager permits.
- Binding loops are now detected at compile-time instead of panic at runtime.
- The `viewer` binary was renamed to `sixtyfps-viewer` and is now available via `cargo install` from crates.io.
- The `viewer` binary was renamed to `slint-viewer` and is now available via `cargo install` from crates.io.
- The layout properties `minimum-width`, `maximum-height`, etc. were renamed to a shorter version `min-width`,
`max-height`. The old names are still supported as a deprecated alias.

View file

@ -114,7 +114,7 @@ Rendering backends and styles are configurable at compile time. Current there ar
We have a few tools to help with the development of .slint files:
- A [**LSP Server**](./tools/lsp) that adds things like auto-complete and live preview of the .slint files to many editors
- It is bundled in a [**Visual Studio Code Extension**](./vscode_extension) accessible from the market place
- A [**sixtyfps-viewer**](./tools/viewer) tool which display the .slint files. With the `--auto-reload` argument, makes it easy to preview
- A [**slint-viewer**](./tools/viewer) tool which display the .slint files. With the `--auto-reload` argument, makes it easy to preview
your UI as you are working it (when using the LSP preview is not possible)
- An [**online editor**](https://sixtyfps.io/editor) to try out .slint syntax without installing anything ([sources](./tools/online_editor))
- An [**updater**](./tools/syntax_updater) to convert the .slint files from previous version to the newer version

View file

@ -90,7 +90,7 @@ Developing
You can create and edit `.60` files using our `SixtyFPS Visual Studio Code Extension <https://marketplace.visualstudio.com/items?itemName=SixtyFPS.sixtyfps-vscode>`_,
which features syntax highlighting and live design preview.
For a quick edit and preview cycle, you can also use the :code:`sixtyfps-viewer` command line tool, which can be installed using :code:`cargo install sixtyfps-viewer`,
For a quick edit and preview cycle, you can also use the :code:`slint-viewer` command line tool, which can be installed using :code:`cargo install slint-viewer`,
if you have `Cargo <https://marketplace.visualstudio.com/items?itemName=SixtyFPS.sixtyfps-vscode>`_ installed.
In the next section you will learn how to install the SixtyFPS C++ library and the CMake build system integration.

View file

@ -707,7 +707,7 @@ There cannot be several StandardButton of the same kind.
If A callback `<kind>_clicked` is automatically added for each StandardButton which does not have an explicit
callback handler, so it can be handled from the native code. (e.g. if there is a button of kind `cancel`,
a `cancel_clicked` callback will be added)
When viewed with the `sixtyfps-viewer` program, the `ok`, `cancel`, and `close` button will cause the dialog to close.
When viewed with the `slint-viewer` program, the `ok`, `cancel`, and `close` button will cause the dialog to close.
### Properties

View file

@ -89,7 +89,7 @@ graph and integrate the result into SixtyFPS.
### [`bash`](./bash)
Some examples of how to use the `sixtyfps-viewer` to add a GUI to shell scripts.
Some examples of how to use the `slint-viewer` to add a GUI to shell scripts.
### External examples
@ -102,7 +102,7 @@ Some examples of how to use the `sixtyfps-viewer` to add a GUI to shell scripts.
Simply load the .slint file with the viewer application
```sh
cargo run --release --bin sixtyfps-viewer -- examples/printerdemo/ui/printerdemo.slint
cargo run --release --bin slint-viewer -- examples/printerdemo/ui/printerdemo.slint
```
## Running the Rust Examples

View file

@ -1,12 +1,12 @@
# SixtyFPS Bash example
This shows how to use [`sixtyfps-viewer`](../../tools/viewer) to display dialog from a bash script.
This shows how to use [`slint-viewer`](../../tools/viewer) to display dialog from a bash script.
This assume that the `sixtyfps-viewer` tool is in patch. This can be achieved with cargo install.
This assume that the `slint-viewer` tool is in patch. This can be achieved with cargo install.
(use the `--path tools/viewer` option to install it from the current repository.)
```bash
cargo install sixtyfps-viewer
cargo install slint-viewer
```
The examples also assume that [`jq`](https://stedolan.github.io/jq/) is in the path

View file

@ -2,7 +2,7 @@
# Copyright © SixtyFPS GmbH <info@sixtyfps.io>
# SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
OUTPUT=$(sixtyfps-viewer - --save-data - << EOF
OUTPUT=$(slint-viewer - --save-data - << EOF
import { StandardButton, GridBox, LineEdit } from "std-widgets.slint";
_ := Dialog {
property name <=> name-le.text;

View file

@ -19,7 +19,7 @@ swap_total_kb=`sed -n -e "s,SwapTotal:\s\+\(.*\)\s\+.\+,\1,p"< /proc/meminfo`
swap_free_kb=`sed -n -e "s,SwapFree:\s\+\(.*\)\s\+.\+,\1,p"< /proc/meminfo`
swap_used_kb=$((swap_total_kb - swap_free_kb))
sixtyfps-viewer `dirname $0`/sysinfo.60 --load-data - <<EOT
slint-viewer `dirname $0`/sysinfo.60 --load-data - <<EOT
{
"os_name": "$os_name",
"uptime": "$uptime",

View file

@ -22,7 +22,7 @@ swap_free_mb=`sysctl -n vm.swapusage | sed -n -e 's,.*free = \(.*\)\..*M.*$,\1,p
swap_free_kb=$((swap_free_mb * 1024))
partitions=`df -lk | tail -n+2 | sed 's/\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*.*\)/{ "dev": "\1", "mnt": "\9", "total": \2, "free": \4 },/' | sed '$s/,$//'`
sixtyfps-viewer `dirname $0`/sysinfo.60 --load-data - <<EOT
slint-viewer `dirname $0`/sysinfo.60 --load-data - <<EOT
{
"os_name": "$os_name",
"uptime": "$uptime",

View file

@ -151,7 +151,7 @@ impl slint_core_internal::backend::Backend for Backend {
cpp! {unsafe [] {
// Use a quit event to avoid qApp->quit() calling
// [NSApp terminate:nil] and us never returning from the
// event loop - sixtyfps-viewer relies on the ability to
// event loop - slint-viewer relies on the ability to
// return from run().
QCoreApplication::postEvent(qApp, new QEvent(QEvent::Quit));
} }

View file

@ -2,12 +2,12 @@
# SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
[package]
name = "sixtyfps-viewer"
name = "slint-viewer"
version = "0.2.0"
authors = ["SixtyFPS <info@sixtyfps.io>"]
edition = "2021"
license = "(GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)"
description = "Viewer binary for SixtyFPS"
description = "Viewer binary for Slint"
repository = "https://github.com/sixtyfpsui/sixtyfps"
homepage = "https://sixtyfps.io"
categories = ["gui", "development-tools"]
@ -37,5 +37,5 @@ shlex = "1"
spin_on = "0.1"
[[bin]]
name = "sixtyfps-viewer"
name = "slint-viewer"
path = "main.rs"

View file

@ -1,29 +1,29 @@
# Viewer for SixtyFPS
# Viewer for Slint
This program is a viewer for `.slint` files from the [SixtyFPS Project](https://sixtyfps.io).
This program is a viewer for `.slint` files from the [Slint Project](https://sixtyfps.io).
## Installation
The viewer can be installed from crates.io:
```bash
cargo install sixtyfps-viewer
cargo install slint-viewer
```
Alternatively, you can download one of our pre-built binaries for Linux or Windows:
1. Open <https://github.com/sixtyfpsui/sixtyfps/releases>
2. Click on the latest release
3. From "Assets" download either `sixtyfps-viewer-linux.tar.gz` for a Linux x86-64 binary
or `sixtyfps-viewer-windows.zip` for a Windows x86-64 binary.
4. Uncompress the downloaded archive and run `sixtyfps-viewer`/`sixtyfps-viewer.exe`.
3. From "Assets" download either `slint-viewer-linux.tar.gz` for a Linux x86-64 binary
or `slint-viewer-windows.zip` for a Windows x86-64 binary.
4. Uncompress the downloaded archive and run `slint-viewer`/`slint-viewer.exe`.
## Usage
You can open .slint files by just passing it as an argument:
```bash
sixtyfps-viewer path/to/myfile.slint
slint-viewer path/to/myfile.slint
```
## Command line arguments
@ -35,7 +35,7 @@ sixtyfps-viewer path/to/myfile.slint
- `--load-data <file>`: Load the values of public properties from a json file.
- `-I <path>`: Add an include path to look for imported .slint files or images.
- `--style <style>`: Set the style. Defaults to `native` if the Qt backend is compiled, otherwise `fluent`
- `--backend <backend>`: Override the SixtyFPS rendering backend
- `--backend <backend>`: Override the Slint rendering backend
- `--on <callback> <handler>`: Set a callback handler, see [callback handler](#callback-handlers)
Instead of a path to a file, one can use `-` for the standard input or the standard output.
@ -59,7 +59,7 @@ MyApp := Window {
It is possible to make the `open-url` callback to execute a command by doing
```bash
sixtyfps-viewer --on open-url 'xdg-open $1' myfile.slint
slint-viewer --on open-url 'xdg-open $1' myfile.slint
```
Be carefull to use single quote or to escape the `$` so that the shell don't expand the `$1`
@ -86,5 +86,5 @@ The program returns with the following error code:
## Examples
`sixtyfps-viewer` can be used to display an GUI from a shell script. For examples check out the
`slint-viewer` can be used to display an GUI from a shell script. For examples check out the
[examples/bash](https://github.com/sixtyfpsui/sixtyfps/tree/master/examples/bash) folder in our repository.