Minor fix in RichText.

This commit is contained in:
Martín Lucas Golini
2026-03-09 00:31:38 -03:00
parent d45ffbfe23
commit 6fd0950eba
2 changed files with 15 additions and 2 deletions
+9 -2
View File
@@ -140,14 +140,21 @@ a:hover {
} }
br { br {
layout-height: 1em; layout-height: 0;
}
img {
scale-type: fit-inside;
} }
markdownview img { markdownview img {
scale-type: fit-inside;
max-height: 100vh; max-height: 100vh;
} }
markdownview table > thead > tr > th {
font-style: bold;
}
blockquote { blockquote {
padding-left: 8dp; padding-left: 8dp;
background-color: var(--list-back); background-color: var(--list-back);
+6
View File
@@ -450,6 +450,12 @@ void RichText::updateLayout() {
curX += blockSize.getWidth(); curX += blockSize.getWidth();
currentLine.width += blockSize.getWidth(); currentLine.width += blockSize.getWidth();
if ( mMaxWidth > 0 && curX + blockSize.getWidth() > mMaxWidth && curX > 0 ) {
maxWidth = std::max( maxWidth, curX );
mLines.push_back( RenderParagraph() );
curX = 0;
}
} }
} }