lots of cleanup and some ui tweaks
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Chris Cochrun 2025-09-23 06:25:25 -05:00
parent bb1057e950
commit 991feb18c8
11 changed files with 219 additions and 374 deletions

View file

@ -51,7 +51,6 @@ pub struct Library {
enum MenuMessage {
Delete((LibraryKind, i32)),
Open,
None,
}
impl MenuAction for MenuMessage {
@ -63,7 +62,6 @@ impl MenuAction for MenuMessage {
Message::DeleteItem((*kind, *index))
}
MenuMessage::Open => todo!(),
MenuMessage::None => todo!(),
}
}
}
@ -827,7 +825,7 @@ async fn add_db() -> Result<SqlitePool> {
SqlitePool::connect(&db_url).await.into_diagnostic()
}
fn elide_text(text: impl AsRef<str>, width: f32) -> String {
pub fn elide_text(text: impl AsRef<str>, width: f32) -> String {
const CHAR_SIZE: f32 = 8.0;
let text: String = text.as_ref().to_owned();
let text_length = text.len() as f32 * CHAR_SIZE;