FileExplorer shows the folder at the end of a path three ways: the directory listing, a grid of tiles, or a column per folder along the path with the next folder lit. Its name, its count and a switch of views sit above one path bar that climbs. A folder opens in place; a file goes to the host, which lists each folder it goes to. A pick in an earlier column closes the columns past it, and a new deepest column scrolls into view. The directory listing takes its pick from its owner and reports it, so the pick carries across views; its path bar and its first order are shared. The gallery walks a small file system and shows the tree, the context menu, renaming in place and a drop zone in use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
543 B
Rust
25 lines
543 B
Rust
use gpui::Rems;
|
|
|
|
use super::{Theme, tokens::px_to_rems};
|
|
|
|
/// File views' measures.
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub struct FileSizes {
|
|
/// A tile in a grid of files, wide.
|
|
pub tile: Rems,
|
|
/// A column of a folder along a path, wide.
|
|
pub column: Rems,
|
|
/// The columns view, tall.
|
|
pub columns: Rems,
|
|
}
|
|
|
|
impl Theme {
|
|
pub fn files(&self) -> FileSizes {
|
|
FileSizes {
|
|
tile: px_to_rems(96.0),
|
|
column: px_to_rems(200.0),
|
|
columns: px_to_rems(288.0),
|
|
}
|
|
}
|
|
}
|