ui: Fix scrollbar animation timing on web (#61786)

Use `web_time::Instant` instead of `std::time::Instant` when advancing
scrollbar animations. This uses the web platform's compatible clock in
WASM builds.

Release Notes:
- N/A
This commit is contained in:
Gaauwe Rombouts authored and GitHub committed 2026-07-29 10:07:58 +00:00
1 parent e6e30f8c84
commit ab1acf7ae2
3 files changed
+4 -6

No files matched your search

Generated
+1
View File
@@ -19868,6 +19868,7 @@ dependencies = [
"theme",
"theme_settings",
"ui_macros",
"web-time",
"windows 0.61.3",
]
+1
View File
@@ -29,6 +29,7 @@ smallvec.workspace = true
strum.workspace = true
theme.workspace = true
ui_macros.workspace = true
web-time.workspace = true
gpui_util.workspace = true
[target.'cfg(windows)'.dependencies]
+2 -6
View File
@@ -1,9 +1,5 @@
use std::{
any::Any,
fmt::Debug,
ops::Not,
time::{Duration, Instant},
};
use std::{any::Any, fmt::Debug, ops::Not, time::Duration};
use web_time::Instant;
use gpui::{
Along, Anchor, App, AppContext as _, Axis as ScrollbarAxis, BorderStyle, Bounds, ContentMask,