mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 02:09:00 +00:00
pdf-chrome-w7: Seen's default with Rect::NOTHING, since Rect has no Default (lead, compile)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
cf27faadf2
commit
2f0139bbc2
@@ -69,13 +69,19 @@ fn drag_divider(fixture: &mut Fixture, index: u64, by: Vec2) {
|
||||
}
|
||||
|
||||
/// What the tab-drop host reported since the last drag.
|
||||
#[derive(Default)]
|
||||
struct Seen {
|
||||
drops: Vec<TabDrop<usize>>,
|
||||
torn: usize,
|
||||
views: Rect,
|
||||
}
|
||||
|
||||
// `egui::Rect` has no `Default`; nothing is shown before the first frame.
|
||||
impl Default for Seen {
|
||||
fn default() -> Self {
|
||||
Seen { drops: Vec::new(), torn: 0, views: Rect::NOTHING }
|
||||
}
|
||||
}
|
||||
|
||||
/// A document strip above split views in `layout` with `count` documents that take every drop but at `refused`.
|
||||
fn tab_host(layout: SplitLayout, count: usize, refused: Option<TabDropTarget>, direction: Direction) -> (Fixture, Rc<RefCell<Seen>>) {
|
||||
let seen = Rc::new(RefCell::new(Seen::default()));
|
||||
|
||||
Reference in New Issue
Block a user