Skip to content

Commit 25f31db

Browse files
committed
ensure we cap height of description
1 parent ca7dd78 commit 25f31db

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

src/buffer/scroll_view.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,13 +1481,18 @@ fn preview_row<'a>(
14811481
.map(font::get)
14821482
),
14831483
description.as_ref().map(|description| {
1484-
text(description)
1485-
.shaping(text::Shaping::Advanced)
1486-
.style(theme::text::secondary)
1487-
.font_maybe(
1488-
theme::font_style::secondary(theme)
1489-
.map(font::get),
1490-
)
1484+
container(
1485+
text(description)
1486+
.shaping(text::Shaping::Advanced)
1487+
.wrapping(text::Wrapping::WordOrGlyph)
1488+
.style(theme::text::secondary)
1489+
.font_maybe(
1490+
theme::font_style::secondary(theme)
1491+
.map(font::get),
1492+
),
1493+
)
1494+
.clip(false)
1495+
.max_height(100.0)
14911496
}),
14921497
config.preview.card.show_image.then_some(
14931498
container(
@@ -1505,6 +1510,7 @@ fn preview_row<'a>(
15051510
)
15061511
.content_fit(ContentFit::ScaleDown)
15071512
)
1513+
.padding(Padding::default().top(8))
15081514
.max_height(200)
15091515
),
15101516
]

0 commit comments

Comments
 (0)