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. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5ade2bed74
commit
6f599803ce
6 files changed
+102
-21
No files matched your search
@@ -1,5 +1,5 @@
|
||||
use gpui::{
|
||||
App, Bounds, Div, DragMoveEvent, ElementId, Entity, EntityId, FocusHandle, FontWeight,
|
||||
App, Axis, Bounds, Div, DragMoveEvent, ElementId, Entity, EntityId, FocusHandle, FontWeight,
|
||||
InteractiveElement, IntoElement, MouseButton, ParentElement, Pixels, Rems, SharedString,
|
||||
Stateful, StatefulInteractiveElement, Styled, Window, canvas, div, prelude::*,
|
||||
transparent_black,
|
||||
@@ -97,7 +97,7 @@ fn reveal(
|
||||
}
|
||||
let scroll = view.read(cx).sideways.clone();
|
||||
view.update(cx, |view, _| view.revealed = Some(key.clone()));
|
||||
if bring_into_view(&scroll, head) {
|
||||
if bring_into_view(&scroll, head, Axis::Horizontal) {
|
||||
log::info!("data table: header {key} scrolled into view");
|
||||
window.request_animation_frame();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user