... for the duration of the session. How can we save those
colors?
Recent colors change a lot, we probably do not want that stored
inside the git repository hosting the slint files... and this is
probably "personal data" and nor "project data" in the first place.
And call `extern crate std` when the feature is enabled.
I've read this is the good practice on how to do it.
So that the std prelude is no longer included automatically.
There is then less difference between std and and no-std build which
should avoid surprises in the CI when we use things from the prelude.
The downside is that there is a bit of churn in the tests
Because we set the viewport-width several time to different value during
the layouting of the ListView, it will cause this property to always be
dirty. In particular, this causes permanent restart of the fluent's
scrollbar animation on the size of the handle, causing continous
repaints.
The problem is that the precision of f32 for coordinate wouldn't be
accurate enough with such big viewport to put the elements so that they
are next to eachother.
So put the elements relative to the Flickable instead of relative to the
created moving viewport Rectangle.
Fixes#3700
Note that the ListView still use f32 for the scrollbar value, meaning
that at some point, the wheel stops working as the wheel increment is
smaller than the f32 increment, and scrolling becomes somehow fuzzy.
But this only happens after one more billions pixels now, so one can
have more than 50 millions of elements without much problems
- Fix StandardListView not always getting the focus. Because the
geometry of the FocusScope might be empty but its position is still
in the non-clipped area, but not its center.
- Fix panic when accessing "negative" items if there are hidden
elements in the ListView (#7341)
Fixes#7341
This also fix changed event not working as they rely on the init to the setup
Fixes#6836
ChangeLog: fix init and changed callback not always being called in ListView
While technically allowed and sort of serving as a test to see if the model is well implemented, this is unnecessary behaviour. The model iterator should not serve as a testing ground :)
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"
Only the hand-picked sensible things, not all of it ;-)
Also fix a few typos that cspell complained about when I
tried to commit and some formatting changes that cargo fmt
insisted on when commiting.
This fixes a couple of bug:
- Bug #3740 happens because `Repeater::model_set_row_data` did not use
the inner.offset to get the instance (So that's the `val == 106` part
of the test)
- But I went ahead and also tested what happenned if you changed the
model from the "outside" using the `model[i] = `, and that was not
implemented, hence the move of the code from
`Repeater::model_set_row_data` to `RepeaterTracker::row_changed`,
That does need Pin though, so Pin was added everywhere
- C++ is not affected by bug #3740, because because the C++ listview
don't do the "allocate only visible" optimization. But the
"val == 1106" part of the test would fail so this patch also moces
the update from `model_set_row_data` to `row_changed`.
But following that we don't set the state as Dirty in `row_changed`,
the write_to_model test started filling because the `row_added`
function was missing an update of the index on every further items
The change in the interpreter prevent a borrow_mut from causing trouble.
The Value really don't need to be in a RefCell anyway
Fix#3740
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
.. that has less items and the ListView is scrolled.
We should not have an offset that is higher than the current count
otherwise we're going to access invalid item in the model
Fix#2780
- Mention in the type mapping table as well as in ModelRc that ModelRc is also used for array struct fields.
- Use an itemized list for the different ways of constructing, with the from_slice variant being listed second.
cc #2787