file manager
git clone https://git.lucas.co/cce-files.git
chore: own the ListColumn/ColumnWidth column types (cce-ui List deleted)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018u7qTwzX95dd5ysAkaSCLk
src/pages/browse.rs | 16 ++++++++--------
src/row_list.rs | 18 +++++++++++++++++-
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/src/pages/browse.rs b/src/pages/browse.rs
index c92bd6f..89a4270 100644
--- a/src/pages/browse.rs
+++ b/src/pages/browse.rs
@@ -195,30 +195,30 @@ pub fn view(state: &mut BrowseState, view_dropdown: &mut cce_ui::widget::Adapted
let show_modified = list_w > 280.0;
let mut cols = vec![
- cce_ui::widget::ListColumn {
+ crate::row_list::ListColumn {
name: "Name".to_string(),
- width: cce_ui::widget::ColumnWidth::Flex,
+ width: crate::row_list::ColumnWidth::Flex,
justification: cce_ui::widget::Justification::Left,
}
];
if show_size {
- cols.push(cce_ui::widget::ListColumn {
+ cols.push(crate::row_list::ListColumn {
name: "Size".to_string(),
- width: cce_ui::widget::ColumnWidth::RightOffset(290.0),
+ width: crate::row_list::ColumnWidth::RightOffset(290.0),
justification: cce_ui::widget::Justification::Left,
});
}
if show_perm {
- cols.push(cce_ui::widget::ListColumn {
+ cols.push(crate::row_list::ListColumn {
name: "Permissions".to_string(),
- width: cce_ui::widget::ColumnWidth::RightOffset(210.0),
+ width: crate::row_list::ColumnWidth::RightOffset(210.0),
justification: cce_ui::widget::Justification::Left,
});
}
if show_modified {
- cols.push(cce_ui::widget::ListColumn {
+ cols.push(crate::row_list::ListColumn {
name: "Modified".to_string(),
- width: cce_ui::widget::ColumnWidth::RightOffset(120.0),
+ width: crate::row_list::ColumnWidth::RightOffset(120.0),
justification: cce_ui::widget::Justification::Left,
});
}
diff --git a/src/row_list.rs b/src/row_list.rs
index 7fe9bb3..f34bbc3 100644
--- a/src/row_list.rs
+++ b/src/row_list.rs
@@ -9,7 +9,23 @@
//! row overlays) BEFORE the rounded background, washing them under the translucent bg —
//! the same sandwich the settings lists had (Phase 6v). `push_prims` draws bg first.
-use cce_ui::widget::{ColumnWidth, ListColumn, MouseScrollDelta};
+use cce_ui::widget::{Justification, MouseScrollDelta};
+
+/// Column sizing (moved here with the cce-ui `List` deletion — RowList is the only
+/// remaining consumer of the column model).
+#[derive(Debug, Clone, Copy, PartialEq)]
+pub enum ColumnWidth {
+ Flex,
+ Absolute(f32),
+ RightOffset(f32),
+}
+
+#[derive(Debug, Clone)]
+pub struct ListColumn {
+ pub name: String,
+ pub width: ColumnWidth,
+ pub justification: Justification,
+}
#[derive(Debug, Clone)]
pub struct Row {