cushy/examples
Jonathan Johnson 4bc3f5a884
Refactored VirtualList
These set of changes attempt to resolve a few complexities from the
original implementation: sizing and how to dynamically update the
content in the list.

On the sizing front, manually specifying the width and height of the
rows felt like it was more complex than measuring the first widget and
using that for all other widgets. This allows a user who wants to force
an explicit size to use the Resize widget, while also supporting
SizeToFit flows. Additionally, this paves the way for us to add
horizontal scrolling to this list, but this commit was already complex
enough I held off on that change for now.

One workflow I wanted to see supported was going from 0 rows to 50 rows.
When the item count comes from a trait, it was pretty complicated to
determine how to tell the list to ask for a new row count. By having the
user provide a Value<usize>, they can provide a `Dynamic<usize>` that
can be updated with a new row count whenever the application determines
there is new data. We still need to figure out a way to force a refresh
of the data even if the row count doesn't change.

Ultimately changing this allowed removing the trait and seemingly
simplified the basic usage in addition to adding more flexibility.
2024-11-07 14:27:08 -08:00
..
assets Tilemap updates 2023-12-09 08:20:18 -08:00
shared Trying to make Mac CI fail gracefully 2024-01-08 09:17:03 -08:00
animation.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
background-tasks.rs ButtonClick + Overlays at locations 2024-05-08 08:38:26 -07:00
basic-button.rs Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00
buttonception.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
buttons.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
canvas.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
checkbox.rs ButtonClick + Overlays at locations 2024-05-08 08:38:26 -07:00
collapse.rs Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00
color-pickers.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
contacts.rs ButtonClick + Overlays at locations 2024-05-08 08:38:26 -07:00
container-shadow.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
containers.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
counter.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
cursor-icon.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
custom-widgets.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
debug-window.rs ButtonClick + Overlays at locations 2024-05-08 08:38:26 -07:00
disclose.rs Fixing example test compilation issues 2024-08-18 08:01:00 -07:00
dynamic-fonts.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
easings.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
file-picker.rs IntoWidgetList 2024-10-16 15:59:18 -07:00
focus-order.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
focus.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
fullscreen.rs Fullscreen example 2024-09-09 08:12:59 -07:00
gameui.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
image.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
input.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
invalidation-batch.rs Renamed example 2024-01-11 09:49:27 -08:00
layers.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
list.rs animate_mouse_button + more example recordings 2024-05-12 19:12:01 -07:00
login.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
manual-tabs.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
menu.rs Fixing example test compilation issues 2024-08-18 08:01:00 -07:00
message-box.rs File picker 2024-10-03 13:39:46 -07:00
modal.rs Modal DialogBuilder 2024-09-12 14:49:37 -07:00
monitors.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
multi-window.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
nested-modals.rs Rename pending_handle to new_handle 2024-10-04 10:20:31 -07:00
nested-scroll.rs Refactor ScrollBars to their own widget 2024-10-19 08:16:26 -07:00
offscreen-apng.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
offscreen.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
overlays.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
plotters.rs Extracting easing functions + Clippy 2024-08-17 17:44:12 -07:00
progress.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
radio.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
scroll-debug.rs rename scroll example 2024-10-25 22:11:26 +02:00
scroll.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
select.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
shared-switcher.rs cushy::main attribute macro 2024-09-08 09:31:35 -07:00
slider.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
stack-align-test.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
style.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
switcher.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
theme.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
tic-tac-toe.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
tilemap.rs Refactor ScrollBars to their own widget 2024-10-19 08:16:26 -07:00
tokio.rs Added optional tokio integration 2024-05-11 21:25:54 -07:00
typography.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
unsaved-changes.rs Refactor ScrollBars to their own widget 2024-10-19 08:16:26 -07:00
validation.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
virtual-list.rs Refactored VirtualList 2024-11-07 14:27:08 -08:00
window-properties.rs Fixing example references to dependencies 2024-10-10 09:06:43 -07:00
window-zoom.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
wrap.rs Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00