diff --git a/src/components/clipboard/preview.rs b/src/components/clipboard/preview.rs index 42cf9ca..20d1787 100644 --- a/src/components/clipboard/preview.rs +++ b/src/components/clipboard/preview.rs @@ -1,6 +1,6 @@ use chrono::{Local, TimeZone}; use iced::widget::text::LineHeight; -use iced::widget::{column, container, image, row, scrollable, space, text}; +use iced::widget::{column, container, image, row, rule, scrollable, space, text}; use iced::{Alignment, Color, Element, Length}; use crate::clipboard_history::{ClipboardContent, ClipboardEntry}; @@ -56,17 +56,17 @@ pub fn render_preview_pane<'a>( let metadata_section = container(metadata_column) .width(Length::Fill) .height(Length::FillPortion(2)) - .padding(15) - .style(|_| container::Style { - border: iced::Border { - color: Color::from_rgba(1.0, 1.0, 1.0, 0.1), - width: 1.0, - ..Default::default() - }, - ..Default::default() - }); + .padding(15); - column![preview_section, metadata_section].into() + column![ + preview_section, + rule::horizontal(1).style(|iced_theme| rule::Style { + color: theme.colors.border_10, + ..rule::default(iced_theme) + }), + metadata_section + ] + .into() } else { column![ container(text("No item selected").color(secondary_text_color)) diff --git a/src/screens/clipboard_history.rs b/src/screens/clipboard_history.rs index 39bd2a7..829e10b 100644 --- a/src/screens/clipboard_history.rs +++ b/src/screens/clipboard_history.rs @@ -1,8 +1,8 @@ use chrono::{Local, TimeZone}; use iced::keyboard::{Key, Modifiers, key::Named}; use iced::widget::scrollable::Viewport; -use iced::widget::{container, row, scrollable, text}; -use iced::{Color, Element, Length, Padding, Task}; +use iced::widget::{container, row, rule, scrollable, text}; +use iced::{Element, Length, Padding, Task}; use std::time::{Duration, Instant}; use crate::clipboard_history::{ClipboardContent, ClipboardEntry, get_history}; @@ -283,15 +283,7 @@ impl ClipboardHistoryScreen { ) .width(Length::FillPortion(1)) .height(Length::Fill) - .padding(10) - .style(|_| container::Style { - border: iced::Border { - color: Color::from_rgba(1.0, 1.0, 1.0, 0.1), - width: 1.0, - ..Default::default() - }, - ..Default::default() - }); + .padding(10); let right_pane_content = render_preview_pane( self.state.selected_item(), @@ -305,7 +297,15 @@ impl ClipboardHistoryScreen { .width(Length::FillPortion(2)) .height(Length::Fill); - row![left_pane, right_pane].into() + row![ + left_pane, + rule::vertical(1).style(|iced_theme| rule::Style { + color: theme.colors.border_10, + ..rule::default(iced_theme) + }), + right_pane + ] + .into() } }