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:
parent
d91f4f6aa7
commit
9f85e0c721
9 changed files with 624 additions and 697 deletions
|
|
@ -872,6 +872,15 @@ pub enum Scrollable {
|
|||
Custom(Box<dyn scrollable::StyleSheet<Style = Theme>>),
|
||||
}
|
||||
|
||||
impl Scrollable {
|
||||
/// Creates a custom [`Scrollable`] theme.
|
||||
pub fn custom<T: scrollable::StyleSheet<Style = Theme> + 'static>(
|
||||
style: T,
|
||||
) -> Self {
|
||||
Self::Custom(Box::new(style))
|
||||
}
|
||||
}
|
||||
|
||||
impl scrollable::StyleSheet for Theme {
|
||||
type Style = Scrollable;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue