From 48609b4615cd18d42cb977919aa73efb54644086 Mon Sep 17 00:00:00 2001 From: ByteAtATime Date: Sun, 30 Nov 2025 19:04:28 -0800 Subject: [PATCH] feat: improve clipboard color styling --- src/screens/clipboard_history.rs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/screens/clipboard_history.rs b/src/screens/clipboard_history.rs index 476721d..5e03bb0 100644 --- a/src/screens/clipboard_history.rs +++ b/src/screens/clipboard_history.rs @@ -396,21 +396,30 @@ impl ClipboardHistoryScreen { let trimmed = t.trim(); if trimmed.starts_with('#') && (trimmed.len() == 4 || trimmed.len() == 7) { let color = parse_hex_color(trimmed); + let size = 76.0; + let border_width = 4.0; + container( column![ - container(space().width(64).height(64)).style(move |_| { + container( + space() + .width(size + border_width * 2.0) + .height(size + border_width * 2.0) + ) + .style(move |_| { container::Style { background: Some(color.into()), border: iced::Border { - radius: 32.0.into(), - ..Default::default() + radius: (size / 2.0 + border_width).into(), + width: border_width, + color: Color { a: 0.4, ..color }, }, ..Default::default() } }), - text(trimmed).size(20).color(text_color) + text(trimmed).size(15).color(text_color) ] - .spacing(16) + .spacing(6) .align_x(Alignment::Center), ) .center_x(Length::Fill)