diff --git a/crates/ui-patterns/src/patterns/preferences/body.rs b/crates/ui-patterns/src/patterns/preferences/body.rs index 7bca75294..17224f3e3 100644 --- a/crates/ui-patterns/src/patterns/preferences/body.rs +++ b/crates/ui-patterns/src/patterns/preferences/body.rs @@ -1,34 +1,23 @@ -//! The contents of the preferences window: a search field over a page list and the shown page. +//! The contents of the preferences window: a search field with its match count over one scrolling page of cards. use super::model::{PageSpec, PrefValue, PreferencesModel}; use super::rows::{RowsOut, ShownRow, reset_button, show_row}; use super::search::{self, Listed}; use super::window::PreferencesState; use super::words::PreferencesWords; -use crate::contract::{ - ActivateOn, Bind, CollectionEvent, Props as _, Scroll, SelectMode, Show as _, ShowCollection as _, ShowContainer as _, Sizing, -}; -use crate::display::{Divider, Shade, Text}; +use crate::contract::{Bind, Pad, Props as _, Scroll, Show as _, ShowContainer as _}; +use crate::display::{Shade, Text}; use crate::form::FieldGroup; use crate::layout_components::{Row, Stack}; -use crate::list::{List, ListRow, RowInk}; use crate::notices::{Notice, NoticeLayout}; -use crate::runtime::env::{Label, Units}; +use crate::runtime::env::{Env, Label, Units}; use crate::sections::Section; -use crate::style::TypeRole; +use crate::style::{SurfaceKind, TypeRole}; use crate::text::TextField; -use craft_behavior::{DisplayOrder, ItemSource, Selection, SelectionChange}; use craft_i18n::matcher::Matcher; use craft_theme::variant::Tone; use egui::Ui; -/// One entry of the page list. -pub(super) struct PageEntry { - pub id: String, - pub title: Label, - pub dimmed: bool, -} - /// A group of the shown page: its title and the rows the search keeps. struct ShownGroup { title: Option