scrollbar: Fix content size (#1086)
Caused by PR #1078 incorrect changes, and GPUI was changed API https://github.com/zed-industries/zed/pull/34832 The content size of the scrollable area should be its max scroll offset plus the container size. --------- Co-authored-by: Jason Lee <huacnlee@gmail.com>
This commit is contained in:
parent
fcf447d612
commit
e9d8741835
1 changed files with 3 additions and 2 deletions
|
|
@ -69,7 +69,7 @@ impl ScrollHandleOffsetable for ScrollHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn content_size(&self) -> Size<Pixels> {
|
fn content_size(&self) -> Size<Pixels> {
|
||||||
self.max_offset()
|
self.max_offset() + self.bounds().size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,7 +87,8 @@ impl ScrollHandleOffsetable for UniformListScrollHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn content_size(&self) -> Size<Pixels> {
|
fn content_size(&self) -> Size<Pixels> {
|
||||||
self.0.borrow().base_handle.max_offset()
|
let base_handle = &self.0.borrow().base_handle;
|
||||||
|
base_handle.max_offset() + base_handle.bounds().size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue