SourceClass ScrollAnimation
from egui import ScrollAnimationclass ScrollAnimation:Scroll animation configuration, used when programmatically scrolling somewhere (e.g. with [egui.Ui.scroll_to_cursor](egui.Ui.html#scroll_to_cursor-5999)).
The animation duration is calculated based on the distance to be scrolled via [ScrollAnimation.points_per_second](egui.ScrollAnimation.html#points_per_second-4198)
and can be clamped to a min / max duration via [ScrollAnimation.duration](egui.ScrollAnimation.html#duration-4186).
Properties§
@property
def max_duration(self, /) -> float§
@max_duration.setter
def max_duration(self, /, max_duration: float) -> None§
@property
def min_duration(self, /) -> float§
@min_duration.setter
def min_duration(self, /, min_duration: float) -> None§
@property
def points_per_second(self, /) -> float§
@points_per_second.setter
def points_per_second(self, /, points_per_second: float) -> None§
Methods§
@staticmethod
def default() -> ScrollAnimation§
Source@staticmethod
def duration(seconds: float) -> ScrollAnimation§
Scroll with a fixed duration, regardless of distance.
Source@staticmethod
def none() -> ScrollAnimation§
No animation, scroll instantly.