Messaging · GIF picker: a GIF focused past the fold scrolls into view
Each GIF holds its own focus handle, and a canvas around it, ring and all, sets the results box's offset once per focus from its painted bounds. layout::bring_into_view now works along either axis; the data table's header and the video timeline pass their sideways one.
This commit is contained in:
1 parent
1700a72753
commit
7b38f99dcf
6 files changed
+102
-21
No files matched your search
@@ -1,7 +1,7 @@
|
||||
use std::{rc::Rc, time::Duration};
|
||||
|
||||
use gpui::{
|
||||
App, ElementId, InteractiveElement, IntoElement, MouseButton, ParentElement, RenderOnce,
|
||||
App, Axis, ElementId, InteractiveElement, IntoElement, MouseButton, ParentElement, RenderOnce,
|
||||
ScrollHandle, SharedString, StatefulInteractiveElement, Styled, Window, canvas, div,
|
||||
prelude::*, relative, transparent_black,
|
||||
};
|
||||
@@ -233,7 +233,7 @@ impl RenderOnce for VideoGenerationTimeline {
|
||||
revealed.update(cx, |revealed, _| {
|
||||
*revealed = Some(key.clone())
|
||||
});
|
||||
if bring_into_view(&scroll, bounds) {
|
||||
if bring_into_view(&scroll, bounds, Axis::Horizontal) {
|
||||
log::info!(
|
||||
"video timeline: shot {key} scrolled into view"
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user