Reworked Scrollable to account for lack of widget order guarantees.

Fixed thumb "snapping" bug on scrollable when cursor is out of bounds.
This commit is contained in:
bungoboingo 2022-12-24 21:27:44 -08:00
parent d91f4f6aa7
commit 9f85e0c721
9 changed files with 624 additions and 697 deletions

View file

@ -4,7 +4,7 @@ use iced::alignment::{self, Alignment};
use iced::widget::{
button, column, container, row, scrollable, text, text_input, Column,
};
use iced::{executor, Vector};
use iced::{executor, Point};
use iced::{
Application, Color, Command, Element, Length, Settings, Subscription, Theme,
};
@ -83,7 +83,7 @@ impl Application for WebSocket {
scrollable::snap_to(
MESSAGE_LOG.clone(),
Vector::new(0.0, 1.0),
Point::new(0.0, 1.0),
)
}
},