Newer
Older
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 -->
All notable changes to this project are documented in this file.
## Unreleased
### Widgets
- Added `placeholder-text` property to `TextEdit`.
- Fixed updating model of ComboBox does not change current-value
- Fixed set current-index of ComboBox to -1 does not reset current-value
- Fixed issue where the text of `SpinBox` is not updated after value is changed from outside
## C++ API
- Added `LIBRARY_PATHS` multi-value argument to `slint_target_sources` that takes a list of
`name=path` items, to allow for the use of component libraries.
- When the Skia renderer is enabled at compile time, it is picked as the default at run-time.
- FemtoVG renderer: Fixed selection of italic font styles. (#5056)
- Fixed color animation involving transparency. (#5063)
- Android: Fixed support for Android 10 to 12 and Java 1.8.
- Android: Fixed build if the locale is not UTF-8.
- Android: Added cursor handle on TextInput and selection handle with cut/copy/paste menu.
- Android: added `backend-android-activity-06` feature.
- Software renderer: Dirty regions can now be composed of multiple rectangles.
- Added a function to mark all translations as dirty.
## Slint Language
- Text: Added `stroke`, `stroke-width`, and `stroke-style` properties.
- Added `Colors.hsv()` method to create colors in the HSV color space.
- Added `to-hsv()` function to color.
- Throw an error when `rgb()` or `argb()` have too many arguments.
- Added support for `accessible-action-*`.
- Fixed insertion point of `@children` when it is not the last child. (#4935)
- Deprecated usage of internal `StyleMetrics` in the public API.
- Fixed compiler panic with state property change involving a state in a parent component. (#5038)
- Fixed interpreter overwriting property named `index`. (#4961)
- Fixed compiler panic when a callback aliases itself. (#4938)
- Fixed compiler panic when an init from a repeater is inlined into the parent component (#5146)
- Added `clear-focus()` function to focusable elements, to allow for programmatic focus clearing.
## Widgets
- Palette: Added `color-scheme` in-out property for accessing the style's color scheme.
- Accessibility: Annotated more widgets with accessible properties and actions.
- Qt style: Fixed rendering of focused or hovered ComboBox and CheckBox.
- Qt style: Fixed widget that would react to every mouse button instead of only the left button.
- SpinBox: Fixed scroll direction.
- Allow scrolling through tabs.
- Updated TabWidget in Cosmic style.
- Spinbox and Slider: The value now defaults to the minimum.
- Added getter to the `raw-window-handle` of a window using the `raw-window-handle-06` feature.
- Workaround breaking change in the build with Rust 1.79 (see https://github.com/corrosion-rs/corrosion/issues/501)
- Added conversion of Color to and from HSV.
- Fixed code generation of functions that don't return.
- Fixed the `MapModel::reset` function. (#4968)
- Fixed compilation of the generated code when an animated brush property is set in a sling callback.
- Added include guard to the generated header.
- Design mode of the live preview can now drag into and from layout. With a drop marker when dragging an element.
- Added `-L` command line args to `slint-lsp` to specify path of external libraries (#5144)
- VSCode extension highlights Slint code blocks in markdown files.
- `slint-viewer` will properly reload files saved with neovim, which renames and replaces files (#3641)
## [1.5.1] - 2024-03-20
- Fix clipping with a border-radius. (#4854)
- Fix panic in the preview when showing a PopupWindow whose parent is optimized out. (#4884)
- Fix compiler panic when the `focus` function is called with arguments. (#4883)
- Fix panic when loading unsupported images.
- LSP: Fixed formatting of states, transitions, and functions.
- LSP preview: Avoid double scroll bar in the preview when showing errors.
- LSP preview: Don't handle delete shortcut when showing errors.
- LSP preview: Improved appearence of the element selection in the design mode.
- LSP preview: Never set the with or height to NaN. (#4848)
- Added support for Android via the `backend-android-activity-05` feature.
- Added API for maximized/minimized window.
- TextInput: Added undo/redo support.
- ListView: Fixed redraw when model changes. (#4538)
- Disabled Qt backend by default on Windows and Mac even when Qt is found.
- Qt: Explicitly hide PopupWindow instead of relying on destructor.
### Slint Language
- Rectangle: Added `border-{top,bottom}-{left,right}-radius`
- Image: Added `ImageFit.preserve`
- Image: Added `horizontal-` and `vertical-alignment`
- Image: Added support for 9 slice scaling
- Image: Added `horizontal-` and `vertical-tiling`
- Flickable: Added `flicked` callback
- Slint: Expose `.red`, `.green`, `.blue`, and `.alpha` properties on `color`
### Widgets
- Fixed edited callback of SpinBox for Cupertino and Material style.
### Rust
- Fixed ReverseModel and FilterModel model not always forwarding notification correctly.
- Re-export more type in the slint-interpreter crate.
- Added `SharedVector::pop`.
- Use const generics for construction of SharedVector from array.
### C++
- Fixed binary package that used to require Qt.
- Added `Window::set_fullscreen`.
- Fixed error in generated code when struct or enum has an underscore. (#4659)
- Added `slint::interpreter::ComponentCompiler::set_translation_domain`.
- Added `NAMESPACE` modifier in the `slint_target_sources` cmake macro to generate in a namespace.
### JavaScript
- Fixed MapModel rowData() calling map function even if the source model returned undefined.
- Better error reporting when the backend cannot be created.
- Reading model properties now always returns a `Model<T>`, regardless of whether an array was previously assigned.
- `Model<T>` now implements `Iterable<T>`.
### LSP
- Added support for code formatting.
- Sort properties first in auto-completion.
- Fixed completion in two way bindings
- Preview: Design mode with drag and drop
- Fixed wasm embedded preview on Windows
## [1.4.1] - 2024-02-02
- Skia: Update skia binding dependency.
- Slintpad: Fixed initial rendering of the live-preview.
- Qt backend: fix crash when closing popup on Wayland. (#4500)
- Fixed rendering of linear gradient of 90deg. (#4495)
- C++: Permit passing a value to VectorModel::set_vector by value (#4491)
- slint-viewer: re-render after reloading when using software renderer.
- Fixed panic in the software renderer when using the Qt style.
- Rust: fix slint-build's formater when source contains `\"` in a string. (#4520)
### General
- Winit backend: Fixed `key-released` in `FocusScope` not being invoked when releasing the space bar key.
- Fix `PopupWindow` close behavior: Close on release when the mouse is on the popup, and close on press when
it's outside - to match standard behavior.
- Fixed focus behavior on click in a TextInput
- Fixed ListView not updating when model changes (#3125).
- Fixed TextInput on Plasma/Wayland receiving many empty events causing selection to be cleared (#4148)
- Added API to programmatically show a window in fullscreen mode (C++/Rust: `Window::set_fullscreen(bool)`, Node.js: `window.fullscreen`).
- Added API to keep the event loop alive when the last window is closed (#1499). (Rust: `slint::run_event_loop_until_quit()`; C++: argument to `slint::run_event_loop()`; Node: argument to `runEventLoop`).
- Fixed linear gradiant rendering in non square rectangles (#3730).
- LinuxKMS backend: Added support rendering output rotation via the `SLINT_KMS_ROTATION` environment variable.
- LinuxKMS backend: Added support for `backend-linuxkms-noseat` feature to compile without libseat.
- LinuxKMS backend: Added support for software rendering with Skia.
- LinuxKMS backend: Added frame throttling.
### Slint Language
- `if` statements no longer require parentheses.
- Added a `double-clicked` callback in `TouchArea`, which is triggered when a `TouchArea`
is clicked twice in rapid succession.
- The `pointer-event` callback in `TouchArea` is now triggered on mouse move
as well.
- Errors are thrown when trying to modify properties that must be known at compile time.
- Fixed property wrongly considered as const if it is modified through an alias (#4241).
- Fixed missing invocation of init callbacks due to inlining (#4317).
- Added `Key.Space`` to `Key` namespace.
- Fixed SpinBox not being enabled by default.
- Fixed wrong text input in cupertino SpinBox.
- Added focus state to `StandardListView`.
- Added `colorize-icon` property to `Button`.
Brandon Fowler
已提交
- Added `set-selection-offsets(int, int)` to `TextInput`, `LineEdit`, and `TextEdit`.
- Added `Palette` global singleton.
- Improved `Slider` drag and click behaviour.
### C++
- Added `ComponentInstance::definition()` getter to retrieve the `ComponentDefinition` for an instance.
- Added `slint::VectorModel::clear()` and `slint::VectorModel::set_vector()` to conveniently clear or replace the underlying data.
- Compile-time improvements.
- Fixed compilation when component has the same name as internal name (#4419).
### JavaScript
- Pre-built binaries in the npm package.
- Added selection mode to select elements in the preview.
- Implement code action to add missing import.
- Fix error when going to the definition of builtin items (#4126).
- Preserve underscores in property auto-completion.
### General
- Fixed `accepted` and `edited` callbacks in `LineEdit` not being invoked
with Fluent, Cupertino, and Material styles.
- Fixed coordinate of events within PopupWindow. (#4036)
- Fixed ComboBox not selecting entries. (#4033)
- Fixed singleshot timers started via `start(...)` to not stay in running state.
- Fluent style: Fixed color of disabled `LineEdit`.
### Slint Language
- Added `KeyEvent.repeat` to detect repeated key press events.
### LSP
- Added support for resizing the UI under preview without resizing the window,
by providing resize handles and scrollbars.
- Close previous PopupWindow before refreshing the preview. (#4035)
### C++
- Fixed compilation on Windows when cross-compiling (for example when using esp-idf).
- Fixed `has-hover` and `mouse-cursor` when opening a `PopupWindow`. (#3934)
- Skia Vulkan renderer: Fixed crash when resizing windows on X11.
### Slint Language
- Added `clamp` function that takes a `value`, `minimum` and `maxium` and will return
`maximum` if `value > maximum`, `minimum` if `value < minimum` or `value` otherwise.
- Throw Slint error when returning no value when one is expected instead of generating invalid code. (#3962)
- Fixed compiler panic when a component is called `Window`. (#3916)
### Rust API
- Implement `std::error::Error` for `LoadImageError`.
### JavaScript API
- Added `loadSource` function (#3971)
- Added `requestRedraw` to Window (#3940)
Simon Hausmann
已提交
### C++ API
- Fixed undefined behavior in `SharedString::end()`
### LSP
- Fix "recursion detected" panic in the preview with `forward-focus`. (#3950)
- Don't expose empty name in the outline, this caused error in vscode. (#3979)
- Fix enum ranges in the outline.
- Added `--fullscreen` command line option.
- The `SLINT_DEBUG_PERFORMANCE` environment variable is now also compatible with the software renderer.
- Fixed issues with text rendering and cursor positioning in elided or aligned multi-line text.
- The default style has been changed to `fluent` on Windows and `cupertino` on macOS.
- LinuxKMS backend: Added support for absolute motion pointer events, fixed support for touch input on scaled screens, and improved encoder/CRTC handling for EGL rendering.
Simon Hausmann
已提交
- Skia renderer / winit backend: Fall back to Skia software rendering when GPU acceleration is not available.
- Fixed a bug where accessing model data in a callback after changing it within the same callback did not reflect the update. (#3740)
- Added `Number`, `Decimal` variants to the `InputType` enum.
- Added `spacing-horizontal` and `spacing-vertical` to `GridLayout`.
- Fixed conversion in an array of an array of structs (#3574).
- Added `scroll-event` callback to `TouchArea`.
- Added support for `protected` functions.
- `ComboBox` selection can now be changed by a scroll event.
- `SpinBox` value can now be incremented and decremented by a scroll event.
- Added `focus-changed-event` callback to `FocusScope`.
Olivier Goffart
已提交
- Added many new easing curves.
### JavaScript
- The system has been ported to napi-rs.
- The API has been refreshed.
- Improved support for the `slint!` macro for rust-analyzer.
- Added `source_model()` to `MapModel`, `FilterModel`, `SortModel`, `ReverseModel` to access the inner model.
- Removed the need for C++ exceptions in generated code.
- Added the ability to only build the Slint compiler or use an external compiler.
- ESP-IDF: Wait for vsync before swapping frame buffers.
- Fixed a crash when accessing an empty model from Slint.
- Added "Wrap in element", "Remove element", "Repeat element", and "Make conditional" code actions.
- Added a toolbar with a style picker in the preview.
### General
- Skia renderer: Fixed the `source` property of `Image` elements sometimes not changing when setting dynamically loaded images. (#3510)
- Fix compiler panic with `popup.close()` from outside of the popup. (#3513)
- Fixed native style (Qt) not finishing its animations with Breeze. (#3482)
- Fixed native style not clipping correctly GroupBox. (#3541)
- Fixed native style ComboBox not always being shown. (#3527)
- Winit backend: Fixed window resizing on macOS Sonoma. (#3559)
- Skia / FemtoVG renderers: Default to vsync swap interval when rendering with OpenGL to avoid excessive CPU usage. (#3516)
### C++
- Fixed cross-compilation with CMake (against Yocto SDKs)
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
## [1.2.1] - 2023-09-19
### General
- Fixed generated C++ and Rust code in conversion from unnamed to named struct in complex expressions. (#2765)
- Improved wasm preview in the documentation, especially on mobile. (#3389)
- Improved `StandardTableView` to use `ListView` optimization for all styles. (#3425)
- Fixed in WSL against a distro that uses X11 instead of Wayland. (#3406)
- Added documentation about different renderers and their relation to backends.
- Added support for partial rendering to the software renderer when used with the winit backend. (#3457)
- Fixed builds of the Skia renderer on Windows when built from source within `vcvars.bat` environments.
- Updated to Skia milestone 117.
- Fixed panic when using `SLINT_FULLSCREEN=1` in comination with the Skia OpenGL renderer. (#3472)
- Native style: Fixed scroll bar handle size for `ScrollView`. (#3489)
- FemtoVG renderer: Fixed empty lines and vertical alignment when eliding text. (#3481)
- Skia renderer: Fixed eliding of multi-line text. (#3481)
- `StandardTableView`: Fixed scrollbar only responding to the second click.
- Polished the experimental Cupertino style further.
### Rust API
- Derive serde traits for `slint::Color`, when the feature is active. (#3411)
### C++
- Fixed crash when code in a `clicked` handler in a sub-component would cause a conditional
or repeated element to disappear. (#3465)
- Fixed Skia renderer builds finding clang correctly.
### VS Code Extension
- Fixed "Show Preview" command when invoked from the command palette. (#3412)
### Language Server
- Fixed automatic indentation within named elements. (#3409)
- Fixed panic when editing path in import statements. (#3468)
- Fixed accessibility tree on Linux when UI has no repeaters.
- Fixed native style animations.
- Fixed setting rotation-angle and opacity from a callback.
- Fixed touch in the `Flickable` not resulting in a click.
- Added support for a new experimental backend that renders fullscreen on Linux using KMS (`backend-linuxkms`).
- Calling `show()` on a component (or its window) now keeps the component alive for as long as the window
is visible.
- Improve reporting of diagnostics when there are errors, by attempting to run more passes.
- Fixed compiler panic when an unresolved alias has a binding.
- Added `edited` callback to `SpinBox`.
- Added `row-pointer-event` callback to `StandardTableView`.
- Fixed enabled property with `ComboBox` in Fluent Design style.
- Fixed duplicated import when importing file relative to the project instead of the current path. Deprecated importing files relative to the project path.
- Added `current-item-changed` to `StandardListView`.
- Added `current-row-changed` to `StandardTableView`.
- Added `item-pointer-event` to `StandardListView`.
- Added `orientation` property to `Slider`.
- Implemented `Default` for `slint::Weak`.
- Added `ReverseModel` and `ModelExt::reverse`.
- Added `fn set_visible(&self, _visible: bool)` to the `slint::platform::WindowAdapter` trait.
- Added ways to create a `SoftwareRenderer` without a `MinimalSoftwareWindow`.
- The features `renderer-winit-*` were renamed to `renderer-*`.
- Added `BorrowedOpenGLTextureBuilder` to configure more aspects of borrowed OpenGL textures.
- Added Platform API to write your own platform that drives its own event loop.
- Added `SLINT_LIBRARY_CARGO_FLAGS` cmake variable.
- Added `ReverseModel`.
- Added functions in Window to dispatch pointer events.
- The `slint_interpreter.h` file was renamed `slint-interpreter.h`, a deprecated header was added.
- The features `SLINT_FEATURE_RENDERER_WINIT_*` were renamed to `SLINT_FEATURE_RENDERER_*`.
- Extended `slint::Image::create_from_borrowed_gl_2d_rgba_texture` with an option to configure more aspects
of texture rendering.
- Fixed cmake dependencies of the generated header so it is generated if and only if the .slint files have changed
### LSP
- Fixed termination of the lsp process.
### General
- Fixed compiler panics when some complex expressions are used for the model expression in `for` (#2977)
- Native style: Fixed support for floating point ranges in Slider.
- Fixed panics in the software renderer related to text rendering.
### Slint Language
- Added `clear-selection()` to `TextInput`, `LineEdit`, and `TextEdit`.
- The `PointerEvent` struct now has the `modifiers: KeyboardModifiers` field.
### C++
- Added `slint::Window::scale_factor()` as getter to read the system device pixel ratio.
### LSP
- Correctly use the CARGO_MANIFEST_DIR as the base for import and image in `slint!` macro
- Fixed missing items compilation error in the generated code related to public functions (#2655).
- Added support for Window transparency on supported platforms.
- Fixed TabWidget not filling the parent in non-native style.
- Skia: Add support for rendering with Vulkan.
- Wasm: Added copy and paste support.
- Fixed TouchArea::has-hover not being reset in some cases involving multiple `TouchArea` or `Flickable` elements.
- Fixed ListView panic when model reset in some cases. (#2780)
- Fixed read-only `TextInput` reporting input method access. (#2812)
- Fixed `LineEdit`'s placeholder text not being rendered with the same font attributes as regular `LineEdit` text.
- Fixed rendering of SVGs with text. (#2646)
- Software renderer: Show the cursor in TextInput
### Slint Language
- Added support negative numbers in `cubic-bezier(...)` function.
- Added boolean `font-italic` property to `Text` and `TextInput`.
- Added `select-all()`, `cut()`, `copy()`, and `paste()` to `TextInput`, `LineEdit`, and `TextEdit`.
- Added functions on color: `transparentize`, `mix`, and `with-alpha`.
- Added a `close()` function and a `close-on-click` boolean property to `PopupWindow`.
- Added basic translation infrastructure with `@tr("...")`.
Simon Hausmann
已提交
- Added `absolute-position` property to every element, for computing window-absolute positions.
- Added `primary` boolean property to `Button` to configure its visual appearance.
- Added `current-row` to `StandardTableView`.
- Added `slint::Image::load_from_svg_data(buffer: &[u8])` to load SVGs from memory.
- Added `slint::platform::WindowEvent::ScaleFactorChanged` to allow backends to report the current window scale factor.
- Added `slint::Image::from_borrowed_gl_2d_rgba_texture` to create images from borrowed OpenGL textures.
- In the Slint language, struct can be annotated with `@rust-attr(...)` that is forwarded as a Rust attribute (`#[...]`) for the generated struct.
- Added a `serde` feature to enable serialization of some Slint data structures.
- Added convenience `From` conversions for `ModelRc` from slices and arrays.
- `slint-viewer` gained the ability to preview .rs files with a `slint!` macro.
- Added a `spawn_local` function to run async code in the Slint event loop.
### C++
- Added `slint::Image::create_from_borrowed_gl_2d_rgba_texture` to create images from borrowed OpenGL textures.
- Added `[[nodiscard]]` in a function signatures.
- Experimental: the `slint::platform::WindowAdapter` no longer takes a template parameter and has a different constructor signature.
- Fixed auto-completion of local properties or arguments in callbacks or functions.
- Fixed panic when the editor tries to open non-local urls.
- Make a visible error message when the `slint-lsp` panics.
### General
- Fixed the compiler embedding images unnecessarily multiple times when referenced via different relative paths. (#2608)
- Winit backend: Adjust the window size automatically when an update minimum or maximum size would constrain the existing size.
- Winit backend: Added internal API in the `i-slint-backend-winit` crate to access the winit window
- Fix focussing element whose base is focusable (#2622)
- Fix infinite loop in the compiler when there is a loop in `forward-focus`
- Skia renderer: Add support for password input fields.
- Fix build against macOS deployment target 10.10
- Fixed preview not working (#2609)
- Added design mode commands
- Browser extension: fix preview not previewing specific component
- Fix editing in non-main files was getting ignored (#2630)
### General
- Fixed compiler panic when binding `Path`'s `commands` property to the field of a model entry.
- Qt renderer: Fixed support for horizontal alignment in `TextInput`.
- Winit backend: Fix detect of dark color scheme in some circumstances.
- ListView: fix resizing a ListView to empty height would make all items invisible even if resized back (#2545)
- Fixed compiler panic when accessing unset layout properties such as `spacing` or `alignment` (#2483)
- Fixed compiler panic when accessing property from parent context in a `init =>` callback
- Load fontconfig with dlopen instead of dynamic linking.
- Software renderer: renders the text in TextInput
- Fixed `TouchArea::has-hover` not becoming false when items become invisible
- Fixed parent `FocusScope` objects stealing the focus from inner `FocusScope`s when clicked.
- Added `TextInputInterface.text-input-focused` to detect when a virtual keyboard should open
- Added `always-on-top` property of a `Window` to show the window above others
- The error message when referring to an id reports a suggestion if there is a enum value or a property with the same name.
Simon Hausmann
已提交
### C++
- macOS: Fixed `install_name` for `libslint_cpp.dylib` use `@rpath` instead of absolute paths to the build directory.
- Fixed memory corruption when embedding images in generated C++ code.
- Add support for dispatching key press and key release events to `slint::Window` via `dispatch_key_*_event`. This replaces
the experimental `slint::experimental::platform::WindowAdapter::dispatch_key_event`.
- MSVC: /bigobj is enabled by default as compile option when linking against the Slint CMake target, removing the need
for users who run into linking issues to add that to their build.
Simon Hausmann
已提交
- Don't throw a protocol error when using the rename function on a symbol that can't be renamed
- Always auto-complete widgets from the style even if no widgets is imported
- Don't auto-complete reserved properties or sub components for globals
- Auto-completion in the document root (component, import, global)
### VSCode extension
- Added an option to show the preview with wasm in a vscode tab (just like in the online version)
- Make code lenses work better on Windows
### SlintPad
- Warn when ServiceWorker could not get set up (e.g. in private browsing mode on Firefox)
- Add design mode
### General
- `TextEdit` performs better with the FemtoVG renderer when showing many lines.
- Software renderer: Added support for linear-gradients.
- Software renderer: Fixed artifacts when components are deleted or elements become invisible.
- Fixed Infinite loop in the accessibility backend on Windows (#2195).
- Skia renderer: Enable anti-aliasing for rectangles with border radius.
- Fluent style: Adjust disabled scrollbar background color.
- Fixed several panics in the compiler (#2312, #2274, #2319).
- Winit backend: Fix rendering when moving windows between monitors with a different scale factor (#2282).
### Slint Language
- The old syntax that declares component with `:=` is now deprecated
- `Flickable`: don't forward events if the flickable is dragged in a direction that can be dragged, even if at the bounds.
- The `TextEdit` and `LineEdit` elements now correctly handle double click and tripple click to select words or lines,
as well as support for the "primary" clipboard on X11 and wayland (select to copy, and middle click to paste).
### Rust
- Minimum Rust version is now 1.66.
- **Breaking:** Deprecated functions and enums were removed from the API.
- **Breaking:** `PointerEventButton::None` was renamed `PointerEventButton::Other`
- **Breaking:** More functions now return `Result`, and the return value needs to be `unwrap()`'ed.
- **Breaking:** A lifetime parameter was added to `slint::ModelPeer`.
- **Breaking:** `StandardListViewItem` and `TableColumn` are now marked as `#[non_exhaustive]`.
- **Breaking:** Removed the `stride()` function from `slint::Image` - use `width()` instead.
- **Breaking:** In `slint::platform::WindowEvent::KeyPressed` and `KeyReleased`, the `text` field is now
a `slint::SharedString`.
- **Breaking:** `slint::platform::WindowEvent` does not derive from `Copy` anymore. You must `clone()` it
explicitly if you want to create a copy.
- **Breaking:** The `MAX_BUFFER_AGE` const parameter of `slint::platform::software_renderer::MinimalSoftwareWindow`
has been removed and replaced by an argument to the `new()` function.
- **Breaking:** The `compat-0-3-0` mandatory cargo feature flag was renamed to `compat-1-0`.
- Added a `software-renderer-systemfonts` feature to the Rust crate, to enable the use of fonts from the operating system
for text rendering with the software renderer.
- Fixed some clippy warnings in the generated Rust code.
### C++
- Functions that take a functor as argument are now using C++ 20 concepts.
- **Breaking:** In the C++ API, the type for row indexes in models was changed from `int` to `size_t`.
This includes arguments of virtual functions in `slint::Model` that needs to be adjusted in
derived classes.
- **Breaking:** The order of C++ generated struct members is now preserved from the .slint source file.
- Add constructors to `slint::Image` to create images from raw pixel data.
- In C++ builds, support all image formats the Rust image-rs crate supports, not just png and jpeg.
Simon Hausmann
已提交
- Added the `SLINT_FEATURE_RENDERER_WINIT_SOFTWARE` option to enable the software renderer.
### Tooling
- LSP: don't add spaces when auto-completing elements or callbacks, leads to better formatting.
Olivier Goffart
已提交
- The online editor was renamed to SlintPad.
### Fixed
- FemtoVG: Fix cursor placement at end of lines
- Windows: Fix panic when minimizing windows
- Fixed some panics in the software renderer when using text
- Fixed panic when parsing invalid linear gradient syntax
- Qt: Fixed mapping of the control key
- Linux: Fix panic when using GLX
- Fixed const detection when using two-way bindings
- Fix run-time panic when combining forward-focus with text rendering in no_std environments
- Rust: Fix compile issues when generated code clashes with user types
- C++: Fix compilation with structs that have a field with the same name as the struct
- Fix visible property on the root of a component
- Fix compiler panic when an component's base is not inlined
- C++: fix including the generated file in several translation units
- C++: Fix "make install" on Windows
### Added
- The StandardListView provides now a set-current-item function to set the selected item and bring it into view.
## [0.3.4] - 2023-01-25
- A new syntax is available that declares the components with `component Xxx { ... }` instead of `Xxx := ...`.
The old syntax continues to work in this release.
- A warning is shown when calling non-pure function or callback from pure context (eg: a property binding).
Callbacks and functions can be annotated with `pure`.
- On an `Image`, the default value of `source-clip-width` and `source-clip-height` is now set to
the size of the image minus the `source-clip-{x,y}`. The source clip size is now used to compute
the default aspect ratio of the image.
- Deprecated `invoke_callback` functions in the slint interpreter in favor of `invoke`, which can also
invoke functions in addition to callbacks.
- Warn if the last component or singleton in a file is implicitly marked for exporting.
- `StandardTableView` widget.
- LSP: support of Slint features (auto-complete, preview, ...) in `slint!{}` macro in Rust files.
- The software renderer can now load fonts at run-time, without the need to pre-render glyphs
at compile time.
- The preview in the online editor, VS Code extension, and the VS Code web extension highlight
components while the cursor is on the component type name.
- Compiler panic for files containing no component (#2005).
- Calling public functions from native code.
- Fixed crash when using repeaters in C++ on 32-bit architectures.
- Conversion of array literal containing struct with array literal (#2023).
- Structs exported by the main file are always generated in native code (#594).
### Changed
- Minimum rust version is now 1.64.
- Added support for declaring functions in the language.
- Added support for re-exporting types from other files using `export * from "./other_file.slint";`.
- LSP: highlight and renaming of element id.
- online editor: Add zoom to the preview.
- VSCode and online editor: Added UI to edit and remove property bindings.
- Fixed privacy rules in global properties. #1951
- Fixed drawing of images with the software renderer.
- Fixed `visible` property on element with drop shadow. #1460
- Warn on bad use of ListView. #860
- Fixed two way bindings between globals.
- Fixed scrolling of preview area in online editor.
- Fixed the CMake build to respect `CMAKE_*_OUTPUT_DIRECTORY` variables. #1979
- Fixed build when using `renderer-winit-skia-opengl` on macOS or Windows.
- When using a two way binding `foo <=> bar`, the default value will always be the one of `bar`.
There was a warning about this change in previous versions (#1394).
- Disallow overrides or duplicated declarations of callbacks. Previously they were silently overwritten,
now an error is produced.
- The name `init` is now a reserved name in callbacks and properties.
- In the interpreter, calling `set_property` or `get_property` on properties of the base returns an error.
- Deprecated `slint::WindowEvent` and `slint::PointerEventButton` and moved them to the `slint::platform` module.
- Renamed the `Keys` namespace for use in `key-pressed`/`key-released` callbacks to `Key`. The
old name continues to work.
- The style or the backend now always set a value for the `Window`'s `default-font-size` property.
- In the Rust API, the `GraphicsAPI`'s `NativeOpenGL` variant uses a function signature for `get_proc_address` that
takes a `&std::ffi::CStr` instead of a `&str` to match the native APIs and avoid unnecessary conversions.
- Added new `material` style based on Material Design, with `material-light` and `material-dark` as variants.
- Added `Window::is_visible` in Rust and C++.
- Added `From<char>` for `SharedString` in Rust.
- Added `KeyPressed` and `KeyReleased` variants to `slint::WindowEvent` in Rust, along
with `slint::platform::Key`, for use by custom platform backends.
- Added support for the implicitly declared `init` callback that can be used to run code when
an element or component is instantiated.
- Properties can be annotated with `in`, `out`, `in-out`, or `private`.
- Transitions can now be declared directly within the state.
- Online editor: The property view can now edit properties.
- LSP preview: When the cursor is on the name of an element, the element's location is highlighted in the preview.
- LSP: Added a setting to change the style and the include paths.
- Added `rem` as unit that represents a relative font size and is multiplied with the `Window.default-font-size` when used.
- Added `relative-font-size` as type that holds values of `rem`.
- Fluent style: SpinBox gets focus when buttons are clicked.
- Software renderer: Fix drawing the background color.
- Fix Rust code generation when comparing percentages (#1837).
- Fix `visible` property in `for` and `if` (#1846).
- The property `Window::background` is now a brush instead of a color (allowing gradients).
- Switch to yeslogic-fontconfig-sys from servo-fontconfig dependency. This allows for fontconfig
to be a run-time dependency via dlopen.
- Skia renderer: Improvements to text input.
- Added `slint::FilterModel`, `slint::MapModel` to the C++ API.
- Added `slint::SortModel` to Rust and C++ API.
- Added `VecModel::extend` and `VecModel::extend_from_slice`.
- Online editor: Added "Properties" and "Outline" tabs.
- Added initial support for input methods with pre-edit text.
- Added a dark theme for the Fluent style, which is automatically selected if the system
color scheme is dark.
- Added `fluent-light` and `fluent-dark` as explicit styles to select a light/dark variant,
regardless of the system color scheme setting.
- TextInput now shows the text mouse cursor.
- In Flickable, added a small delay before passing the Press pointer event to the children.
- Online editor: Fixed "go to definition" across files.
- Fixed a panic in the slint compiler when visiting layout properties for loop analysis (#1659).
- Fixed compilation error in the generated code (#1733, #1735).
- `mod` now works on any numeric type, not only integers.
- The "backend-gl-*" Rust crate features for configuring the GL renderer have been
changed and split by renderer.
- `VecModel::remove` now returns the removed element.
- `slint::invoke_from_event_loop` and `slint::quit_event_loop` now return a Result.
- Added the `platform` module providing API to use slint on bare metal with a software renderer.
- Added an experimental Skia renderer.
- `Button`: Add a `checkable` property that turns the button into a toggle
button. Use the new `checked` property to query whether the toggle button
is pressed down or not.
- Added support for `slint::Window::set_position` and `slint::Window::position` to set and get the
placement of the window on the screen.
- Added `slint::Window::scale_factor()` as getter to read the system device pixel ratio.
- Added support for `slint::Window::set_size` and `slint::Window::size` to set and get the
size of the window on the screen.
- Added `slint::Window::dispatch_event` and `slint::WindowEvent` to be able to manually
send a mouse or touch event to a window.
- Added `animation-tick()`.
- `SharedString` implements `std::fmt::Write` and added `slint::format!`.
- `Image` can now be rotated with the `rotation-*` properties.
- Use docking widgets and integration of slint-lsp into the [Online Code Editor](https://slint.dev/editor).
### Fixed
- Fixed Ctrl+Backspace/Ctrl+Del not deleting words in text input elements.
- Resizing of live-preview window in the IDE integrations.
- Preferred size of the TabWidget in the fluent style take in account the size of the tabs (#1363).
- Fixed cursor behavior when typing the Enter key at the end of a TextEdit (#1318).
- Fixed starting and stopping `slint::Timer` from withing their callback (#1532).
### Changed
- Interpreter: Implement `TryFrom<Value>` instead of `TryInto for Value` (#1258)
### Added
- Added `read-only` property to `TextInput`, `TextEdit` and `LineEdit`.
- VSCode extension can be installed as a web extension. (eg, from https://vscode.dev)
- LSP: completion of `@` macros
- LSP: completion of element that require an import
- Basic accessibility support using the `accessible-` properties
### Fixed
- GL backend: Fixed animation sometimes not starting from input event (#1255)
- C++ fix compilation when writing to the model data
- Fix mouse exit events not triggered by scrolling a Flickable (#1107)
### Fixed
- Fixed crashes with the Qt backend in release mode. (#1230)
- Fixed panic when drop-shadow is used in a ListView (#1233)
- Fixed combining a brush and a color to always convert to brush, to avoid loosing gradient information (#1235)
- Fixed properties not having the right default value when set by some states (#1237)
- Fixed properties with multiples aliases, and default values.
- Enable fontdb's fontconfig feature to fix finding some fonts (#1240)
### Changed
- On wasm, the input event are handled via a hidden `<input>` element, allowing the keyboard
to show on mobile platform
- The size of the window is kept when reloading a window in the preview (instead of being reset to the preferred size)
- Minimum rust version is now 1.59
### Added
- Support for keyboard focus with the tab key
- Support more keyboard shortcut in the editing element
- Added `From<&str>` and `From<SharedString>` to `StandardListViewItem` to make creation and modification of `StandardListView`'s models easier.
- Added `on_close_requested` function to `Window` to register callbacks that are emitted when the user tries to close a window.
- Added `VecModel::set_vec` to replace the entire contents with new data.
- Added a `cache-rendering-hint` boolean property that can be applied to any element, to hint to the renderer that it should cache the element and its children
into a cached layer. This may speed up rendering of complex sub-trees if they rarely change.
- The `brighter` and `lighter` functions also work on values of type brush.
- Added a `reset` function to C++'s `Model`, Rust's `ModelNotify` and JS's `ModelPeer`
- Added a `row_data_tracked` function to `ModelExt` (an extension to the Model trait)
### Fixed
- Fixed application of the `opacity` property evenly to child elements (#725).
- Windows: Fixed font lookup of strings including several scripts (eg, containing asian characters)
- Fixed PopupWindow in a repeater (#1113, #1132)
- LSP: do not always resize the preview window to its preferred each time the code is modified
### Added
- C++ interpreter API: added a `Value::Value(int)` constructor
- Global singletons in `.slint` files may now refer to other global singletons
- Added `input-type` property to `TextInput` and `LineEdit` that allows for characters to be replaced in password fields
- The `SpinBox` widget now handles up and down key events
- `TouchArea::has-hover` is now properly set to false when the mouse leaves the window
- Fixed some cases of panics with 'Constant property being changed'
- Better compilation error when selecting unknown styles
- Fixed duplicated key event for some keys (such as tab) with the GL backend
- Improved property optimizations by inlining some bindings and remove more unused properties
This version changes some APIs in incompatible ways. For details how to migrate your application code, see the [C++ migration guide](api/cpp/docs/cpp_migration.md)
as well as the [Rust migration guide for the `sixtyfps` crate](api/rs/slint/migration.md) and for the
[`slint-interpreter` crate](internal/interpreter/migration.rs).
### Changed
- Minimum rust version is now 1.56
- C++ compiler requires C++20
- In the C++ interpreter API `std::span` is used for callbacks arguments, instead of `sixtyfps::Slice`
- `Model::row_data` will now return a `Option<T>` / `std::optional<T>` instead of a plain `T`.
- `Model::model_tracker` no longer has a default implementation.
- The deprecated methods `Model::attach_peer` and `ModelNotify::attach` were removed.
- The interpreter does not differentiate anymore between `Value::Array` and `Value::Model`
everything is a `Value::Model`, which now contains a `ModelRc`
- In Rust, `slint::SharedPixelBuffer` and `slint::SharedImageBuffer` now use a `u32` instead of `usize` for `width`, `height` and `stride`.
- In Rust and C++, `slint::Image::size()` now returns an integer size type.
- `sixtyfps::interpreter::CallCallbackError` was renamed to `slint::interpreter::InvokeCallbackError`
- Some deprecation warning in .60 became hard errors
- `slint::interpreter::ComponentInstance` in Rust now implements `slint::ComponentHandle`. This removes `sixtyfps_interpreter::WeakComponentInstance` in favor
of `slint_interpreter::Weak<slint_interpreter::ComponentInstance>`.
- For the Rust API crate, the Rust Interpreter API crate, the `backend-gl`, `x11`, and `wayland` features were renamed to `backend-gl-all`, `backend-gl-x11`, and `backend-gl-wayland`.
- For the C++ CMake interface, the `SIXTYFPS_BACKEND_GL`, `SIXTYFPS_FEATURE_X11`, and `SIXTYFPS_FEATURE_WAYLAND` options were renamed to `SLINT_BACKEND_GL_ALL`, `SLINT_FEATURE_BACKEND_GL_X11`, and `SLINT_FEATURE_BACKEND_GL_WAYLAND`.
- The animation `loop-count` property was replaced by `iteration-count` (which is the same as `loop-count` plus one)
### Added
- `TextEdit::font-size` and `LineEdit::font-size` have been added to control the size of these widgets.
- Added `slint::Window::set_rendering_notifier` to get a callback before and after a new frame is being rendered.
- Added `slint::Window::request_redraw()` to schedule redrawing of the window contents.
### Fixed
- Models initialized from arrays are now also mutable when run in the interpreter.
- Fixed compilation error when accessing object members of array through the array index syntax
Olivier Goffart
已提交
### Changed
- **Breaking:** The internal key code for the keys left, right, home and end
has changed. This was undocumented, but if you were handling this in the
Olivier Goffart
已提交
`FocusScope` event, these keys will now be ignored. Use the `Keys.LeftArrow`
and other code exposed in the `Keys` namespace instead.
- For `sixtyfps::Timer` (C++ and Rust), it's now possible to call `restart()` after
a timer has been stopped previously by calling `stop()`.
- Property access in `.60` was optimized by doing more constant propagation.
Olivier Goffart
已提交
- Color names can now be accessed through the `Colors` namespace (in `.60`).
- Math function are now available through the `Math` namespace (in `.60`).
- `TouchArea` gained a `mouse-cursor` property to change the mouse cursor.
- C++: Added `SIXTYFPS_VERSION_MAJOR`/`SIXTYFPS_VERSION_MINOR`/`SIXTYFPS_VERSION_PATCH` version macros.
Olivier Goffart
已提交
- More special keyboard key codes are provided in the `FocusScope`, and
special keys are handled
- `start()`, `stop()`, `running()` and a default constructor for C++ `sixtyfps::Timer`
- Property animations now have a `delay` property, which will delay the start
of the animation. Use this to create sequential animations.
- Rust: Added `sixtyfps::VecModel::insert(&self, index, value)`.
- C++: Added `sixtyfps::VecModel::insert(index, value)`.
- Added ability to access elements of a model with the `[index]` syntax.
- Memory leak in C++.
- Native style: Colors are updated automatically when the Windowing system switches to and from dark mode (#687)
- Ctrl/Command+X in text fields copies the selected text to the clipboard and deletes it (cut).
- Improved native ComboBox look.
- Fixed panics or compilation error when using two way bindings on global properties.