Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
They are not commonly used so no need to use semi-public api for that
and it's really easy to similate with ust two clicks anyway
The previous test function were added before there was public way to
send events
If you have a window like so:
```
component W inherits Window {
width: 200px; // or some other bindings
}
```
Before this patch, it will be converted by the compiler to something like
```
component W inherits Window {
width: 200px; // or some other bindings
min-width: width; // (not actual property, but part of the layout_info)
max-width: width;
}
```
When the window is on the screen, the platform backend will set the max
with and min width on the window manager window to the value from the
layout info.
But slint will also set the width and the height of the WindowItem to
the actual value. This will break the binding for width if any, and
will also cause the min and max with do be updated, which is wrong.
We haven't had much problem with that before, but with the
ComponentContainer, this becomes a problem as we want to set the width
and height of the inner from the outer by adding a two way binding,
which cause a binding loop at runtime.
The behavior change is that if you have a fixed window size and use that
on a MCU or platform that has a different size, the window will be
cropped or padded but will no longer be resized
and their related name.
Also move the component module in the item_Tree module
register_component -> register_item_tree
ComponentItemTree -> ItemTreeNodeArray
For #3323
Rationale from that issue:
Right now, we use the term `component` in the Slint language and in the compiler to be a a tree of elements that can be used as an element in a .slint file.
The term is also currently used in the runtime as a tree of runtime Items that are allocated together. (declared in ComponentVTable)
But there are no 1 to 1 mapping between a `component` in the slint language, and a runtime Component.
(for example, the items behind a `if` or `for` or `PopupMenu` are in a different runtime component. And `component` declared in Slint are often inlined)
So we should rename the internal runtime `Component` to `ItemTree`
The currently public `slint::ComponentHandle` wraps the "root" of the ItemTree, but that's ok because it is generated from a .slint `component`, so it doesn't change name
- From C++, always call the Window::show() and hide() function instead
of going through set_visible directly as it doesn't set the size of
the WindowItem
- show() should also call resize on the renderer
- remove the is_visible in the WindowAdapterInternal as it is no longer
needed
In the case of bug #3318, the implicit alias to the window's height or
width was removed but the propery was not marked as externaly modified,
causing later pass to optimize and inline things that shouldn't
Fixes#3318
Note: the addition of MinimalSoftwareWindow::set_size is there because
it would be a breaking change for user who called set_size on the
MinimalSoftwareWindow while also using the WindowAdapter trait.
This was the case of a test.
The same problem theorically exist with set_position and position, but
is unlikely to be a problem because i don't think people would use the
position with a MinimalSoftwareWindow
The renderer() is now public as well. That's because I want to make sure
that the scealed trait don't have non-provided method
When the TextInput item is read-only, it should not report availability
or any other status to the input method via the window adapter.
This also fixes the order of events when clicking on a TextInput: We
would send the ime position update request before enabling the ime,
because we set the focus _after_ setting the cursor pos.
Fixes#2812
Add WindowEvent::ScaleFactorChanged and made set_scale_factor on
WindowInner private.
This achieves what #2486 tried to do, but using the clean platform
window event interface.
Make text_input_byte_offset_for_position and text_input_cursor_rect_for_byte_offset
low-level in the API, where the implementation becomes easier. Two
helper functions in TextInput in turn collect the necessary parameters
and thus also reduce the amount of duplicated code.
This also decouples the renderer further from the window.
Replace register_root_component in the WindowAdapterSealed altogether with
a default font size getter on the renderer.
This is overall simpler and allows removing the doc-hidden getter in the software renderer.
* Add `RequestedSize` and `RequestedPosition` enum to enable asking for
logical or physical size/position.
* Rename `Window::size()` to `Window::physical_size()`
* Make `Window::set_size(...)` take an `Into<RequestedSize>`
* Rename `Window::position()` to `Window::physical_position()`
* Make `Window::set_position(...)` take an `Into<RequestedPosition>`
* Change `WindowAdapter` and related classes to be able to handle
requests being made in the either physical or logical units.
Implement this for C++, Rust and node.