slint/internal/compiler
Olivier Goffart 9ffe26459f Layout: when using a fixed window size, dissociate the WiondowItem's size with the slint size
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
2023-10-27 17:45:46 +02:00
..
generator winit: Propagate errors when winit fails to initialize the event loop 2023-10-24 15:47:08 +02:00
LICENSES Update license symlinks 2023-08-16 11:46:15 +02:00
llr Don't steal the x and y properties for dummy parents 2023-10-21 07:30:46 +02:00
parser Add support for protected functions 2023-10-11 10:50:50 +02:00
parser-test-macro Janitor: Use cargo workspace package data more 2023-09-25 16:34:16 +02:00
passes Layout: when using a fixed window size, dissociate the WiondowItem's size with the slint size 2023-10-27 17:45:46 +02:00
tests Compiler: Don't panic when a Row is repeated in a GridLayout 2023-10-23 19:43:46 +02:00
widgets Make fluent light scroll bars more visible (#3759) 2023-10-25 09:30:23 +02:00
build.rs Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
builtin_macros.rs Add component-factory type to Slint language 2023-07-27 12:04:16 +02:00
builtins.slint Added focus-changed-event callback to FocusScope (#3650) 2023-10-17 17:30:19 +02:00
Cargo.toml Janitor: add itertools as a workspace dependency 2023-10-13 13:40:27 +02:00
diagnostics.rs Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
embedded_resources.rs Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
expression_tree.rs Compiler: fix conversion from unnamed to named struct 2023-09-07 14:57:05 +02:00
fileaccess.rs i-slint-compiler: Add some tests for fileaccess 2023-10-25 14:25:53 +02:00
generator.rs Debug: use pretty-print to dump the LLR 2023-08-22 16:20:13 +02:00
langtype.rs janitor: Go over our spell checking setup 2023-10-16 09:01:51 +02:00
layout.rs compiler: pre-inline layout info for known builtin types 2023-10-12 12:55:00 +02:00
lexer.rs Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
lib.rs Allow specifying paths for @library imports 2023-10-20 16:47:00 +02:00
literals.rs Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
llr.rs janitor: Go over our spell checking setup 2023-10-16 09:01:51 +02:00
load_builtins.rs Refactoring: define macro rules to group builtin structs 2023-08-03 11:01:18 +02:00
lookup.rs WIP: some polish over the winit update to 0.29 2023-10-23 14:22:48 +02:00
namedreference.rs Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
object_tree.rs compiler: Add layout information the the Element 2023-10-24 15:49:12 +02:00
parser.rs compiler: Rework path handling 2023-10-10 20:04:47 +02:00
passes.rs Layout: when using a fixed window size, dissociate the WiondowItem's size with the slint size 2023-10-27 17:45:46 +02:00
pathutils.rs janitor: Fix a semi-random selection of clippy warnings 2023-10-16 13:44:37 +02:00
README.md reuse: remove glob for markdown files 2023-08-17 08:55:28 +02:00
typeloader.rs Allow specifying paths for @library imports 2023-10-20 16:47:00 +02:00
typeregister.rs Add support for protected functions 2023-10-11 10:50:50 +02:00

The Slint Compiler Library

NOTE: This library is an internal crate of the Slint project. This crate should not be used directly by applications using Slint. You should use the slint crate instead.

WARNING: This crate does not follow the semver convention for versioning and can only be used with version = "=x.y.z" in Cargo.toml.