From 929b0a33d12e4ac5f4cd66de30e3fa43d74aa5fe Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 15 Jan 2025 12:48:27 -0600 Subject: [PATCH] making library items look and behave more like buttons --- src/core/model.rs | 2 +- src/ui/library.rs | 63 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 52 insertions(+), 13 deletions(-) diff --git a/src/core/model.rs b/src/core/model.rs index 9ff6dcd..14ed67c 100644 --- a/src/core/model.rs +++ b/src/core/model.rs @@ -12,7 +12,7 @@ pub struct Model { pub kind: LibraryKind, } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq, Copy)] pub enum LibraryKind { Song, Video, diff --git a/src/ui/library.rs b/src/ui/library.rs index d247b5d..4ca70ff 100644 --- a/src/ui/library.rs +++ b/src/ui/library.rs @@ -4,6 +4,7 @@ use cosmic::{ Background, Border, Color, Length, }, iced_widget::{column, text}, + theme, widget::{ button, container, horizontal_space, icon, mouse_area, row, Container, Space, @@ -26,6 +27,7 @@ pub(crate) struct Library { video_library: Model