Skip to content

Commit

Permalink
feat(term): change detail border type
Browse files Browse the repository at this point in the history
  • Loading branch information
ymgyt committed Mar 18, 2024
1 parent 0a3d9df commit 099c852
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/synd_term/src/ui/components/entries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl Entries {
.alignment(Alignment::Center),
)
.borders(Borders::TOP)
.border_type(BorderType::Thick);
.border_type(BorderType::Plain);

let inner = block.inner(area);
Widget::render(block, area, buf);
Expand Down
14 changes: 9 additions & 5 deletions crates/synd_term/src/ui/components/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::borrow::Cow;
use itertools::Itertools;
use ratatui::{
prelude::{Alignment, Buffer, Constraint, Layout, Margin, Rect},
style::{Modifier, Style},
style::{Modifier, Style, Stylize},
text::{Line, Span},
widgets::{
block::{Position, Title},
Expand Down Expand Up @@ -202,16 +202,16 @@ impl Subscription {
.padding(Padding {
left: 3,
right: 3,
top: 1,
bottom: 1,
top: 0,
bottom: 0,
})
.title(
Title::from("Feed Detail")
.position(Position::Top)
.alignment(Alignment::Center),
)
.borders(Borders::TOP)
.border_type(BorderType::Thick);
.border_type(BorderType::Plain);

let inner = block.inner(area);
Widget::render(block, area, buf);
Expand All @@ -220,8 +220,12 @@ impl Subscription {
return;
};

let vertical = Layout::vertical([Constraint::Length(5), Constraint::Min(0)]);
let vertical = Layout::vertical([Constraint::Length(4), Constraint::Min(0)]);
let [meta_area, entries_area] = vertical.areas(inner);
let entries_area = entries_area.inner(&Margin {
vertical: 1,
horizontal: 0,
});

let meta = {
let meta = vec![
Expand Down

0 comments on commit 099c852

Please sign in to comment.