Olivier Goffart
2760d96b79
Make VecModel::remove() return the removed value like Vec
...
Fixes #1221
2022-09-06 05:42:56 +02:00
Olivier Goffart
4d05688730
ListView: try the best to keep the listview elements consistant when scrolling
...
Even when the average height changes
2022-07-11 19:33:05 +02:00
Olivier Goffart
55155915d2
Fixt listview jumping when scrolling and element have different size
...
The test test one particular case where we want to expand an item to
the size of the listview when clicking
2022-07-11 19:33:05 +02:00
Tobias Hunger
4da7588af4
Fix component_at in repeaters
2022-07-05 14:27:19 +02:00
Simon Hausmann
cdff68da17
Revert "Fixt listview jumping when scrolling and element have different size"
...
This reverts commit 1ae0e8f760
.
Oops, this was not intended to be pushed to master.
2022-07-04 13:53:39 +02:00
Olivier Goffart
1ae0e8f760
Fixt listview jumping when scrolling and element have different size
...
The test test one particular case where we want to expand an item to
the size of the listview when clicking
2022-06-30 14:46:34 +02:00
Lukas Jung
ff036d41ec
Add model adapters
...
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
2022-05-11 15:50:43 +02:00
Lukas Jung
a36ac901db
Add nth() implementation to ModelIterator to improve skip() performance
2022-05-11 15:50:43 +02:00
Olivier Goffart
696ce933f7
Refactor the Model tracking in a module ( #1223 )
...
Contain the unsafe code in a smaller module.
Add an abstraction to make it easier to create change listener other
than the repeater.
2022-05-05 10:25:15 +02:00
Olivier Goffart
525e9982d8
Re-export and document ModelExt
2022-05-04 11:08:14 +02:00
Lukas Jung
7c45be97cd
Move row_data_tracked to ModelExt trait
2022-05-04 11:08:14 +02:00
Olivier Goffart
86d893245e
Model: When items are inserted, sets the components after that as dirty
...
Because their index property needs to be updated
2022-05-02 11:47:17 +02:00
Olivier Goffart
fd44b2e651
Model: Do not register row data tracker if not needed
...
Make track_row_data_changes not register a dependency to the row
if there is currently no binding being evaluated.
2022-04-19 15:12:15 +02:00
Olivier Goffart
67e9a59398
Add a Model::row_data_tracked function
...
Closes #1177
2022-04-19 15:12:15 +02:00
Simon Hausmann
5a270313d2
Improve VecModel::set_vec test
...
Verify the values reported by `row_count()` in the rows added/remove
callbacks.
2022-04-14 14:20:27 +02:00
Olivier Goffart
f5030cff06
Add a reset function to the model notifier
2022-04-14 14:06:34 +02:00
Olivier Goffart
1b91158b46
corelib: allow to use i32 for coordinate instead of f32
2022-04-11 17:46:50 +02:00
Tobias Hunger
ee68716d07
Component: Add information to stich together ItemTrees
...
Add accessors to the information necessary to stitch together the
Component-wide ItemTrees (which include DynamicNodes) into one logical
tree of Items.
2022-03-28 14:13:36 +02:00
Simon Hausmann
3a3ce15970
Add a unit test that verifies that VecModel::set_vec
notifies the view correctly
2022-03-17 09:47:10 +01:00
Ray Redondo
b265f721f2
add a test
2022-03-17 09:15:58 +01:00
Ray Redondo
94cbaa55d7
add VecModel::set_vec
2022-03-17 09:15:58 +01:00
Lukas Jung
4c61a16c08
add From<&str> and From<SharedString> to StandardListViewItem
2022-03-11 15:45:59 +01:00
Olivier Goffart
bc38d31bcb
Save one property dependency when accessing dirty model
2022-03-07 19:06:23 +01:00
Olivier Goffart
c941946f49
Debug: make sure that more properties have debug_name
...
The global properties, and base properties were not named
This adds a Property::new_named regardless if debug is enabled or not
2022-02-18 17:40:17 +01:00
Olivier Goffart
7a7a21ca54
Fix build with no_std
2022-02-14 16:21:31 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
...
The README.md contains the warning that used to be in lib.rs.
Add README.md files to all internal crates
... pointing to the official public crate to use instead.
Rename internal crates
fixup: README files
fixup rename
2022-02-07 13:12:48 +01:00
Simon Hausmann
125b90a64b
Merge remote-tracking branch 'origin/master' into wip/rename
...
Conflicts:
api/cpp/cbindgen.rs
api/cpp/include/slint.h
examples/CMakeLists.txt
examples/imagefilter/Cargo.toml
examples/plotter/main.rs
internal/backends/mcu/lib.rs
2022-02-04 16:47:20 +01:00
Olivier Goffart
54d9ebdc19
Fix documentation warnings about non-existing links
2022-02-04 14:53:23 +01:00
Olivier Goffart
03534039d6
Replace more .60 by .slint
...
Mainly an automated change with
git grep -O"sed -i 's/\.60/.slint/g'" -w "\.60"
and some manual checks
2022-02-02 10:12:31 +01:00
Simon Hausmann
ad0c020aa4
Rename the sixtyfps-corelib crate
2022-02-01 18:04:30 +01:00
Tobias Hunger
e6b24bceec
[reorg]: Set up and populate the internal
directory
...
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.
pre-commit applied some cleanups to the moved files:
- Consistent newline at end of file policy
- trimming trailing whitespace
- Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00