Slint is an open-source declarative GUI toolkit to build native user interfaces for Rust, C++, JavaScript, or Python apps.
Find a file
Simon Hausmann 03bef6dba3 Fix casting with conditional expressions
The following scenario would fail compiling to C++ because we failed to
determine the return type of the conditional expression:

    Test := Rectangle {
        property<bool> condition;
        property<color> extra_color;
        color: condition ? root.extra_color : 4289374890;
    }

The type of the true branch would be color and the false branch would be
a float. Since they "disagree", ty() on the expression would return
Type::Invalid. This was temporarily worked around in the C++ generator
by always returning the type of the true branch, but that's wrong.

Instead this patch changes maybe_convert_to to apply the Cast expression
to the individual branches, placing the cast only to the numberic
literal and correcting the return value of ty() on the conditional
expression.
2020-06-11 13:38:24 +02:00
.cargo Fix rebuild issues, part 10523 2020-06-09 13:08:59 +02:00
.github/workflows Fix wasm build, part 2 2020-06-08 17:48:34 +02:00
api Layout for the C++ as well 2020-06-10 19:41:24 +02:00
examples Layout for rust 2020-06-10 19:41:24 +02:00
helper_crates Polishing of the documentation 2020-06-08 17:57:18 +02:00
sixtyfps_compiler Fix casting with conditional expressions 2020-06-11 13:38:24 +02:00
sixtyfps_runtime Fix linking error in the tests 2020-06-10 19:53:06 +02:00
tests Fix casting with conditional expressions 2020-06-11 13:38:24 +02:00
tools Rename the interpreter crate to sixtyfps_interpreter 2020-06-10 08:41:49 +02:00
xtask Rename corelib to sixtyfps_corelib 2020-06-09 13:27:18 +02:00
.clang-format Reformat public header with Qt's clang-format 2020-05-11 15:20:17 +02:00
.gitignore Ignore generated files 2020-06-10 10:10:00 +02:00
Cargo.toml Upgrade glow to a patched version 2020-06-08 16:57:58 +02:00
README.md Minor README edits 2020-05-06 09:53:33 +02:00
rustfmt.toml Initial commit laying out the structure 2020-05-04 10:49:58 +02:00

SixtyFPS

This is the monolithic repository of the SixtyFPS project.

What is SixtyFPS

It is a GUI engine, with libraries for different languages. The aim of the project is to be

  • Lightweight: We aim to provide a runtime that fits in a few MB. Minimize the RAM usage, and also be blazing fast.
  • Straightforward: We want to optimize as well for programmer and designer productivity. Making it an enjoyable experience to work with. We claim to use well thought idiomatic API for each target language. Provide well written documentation. And use of modern tools.
  • Native: We support many platforms. From embedded devices, to desktop, including mobile and web. One should feel at home on each platform. Both the user and the developer. The appearance and look and feel should match was is expected of an application build for this platform.

<insert a few screenshots here>

SixtyFps.cpp

Modern C++ Library for GUI

SixtyFps-rs

Rust GUI library

SixtyFps-js

NodeJS bindings

The .60 DSL

HelloWorld = Window {
 TextLabel { text: "Hello, world" }
}

The compiler

The runtime library

Examples / Demo

Todo

Contributions

Contributions are welcome. To contribute, please see CONTRIBUTING.md. Contributions are done under a CLA.

License

The software is provided under a double license scheme

  • GNU GPLv3: Open source license ideal for free software.
  • Commercial SixtyFps license: more details to come.