TF-4093 Make interface more compact

This commit is contained in:
dab246
2025-10-16 10:00:41 +07:00
committed by Dat H. Pham
parent 804f5e2a02
commit 7d80557582
23 changed files with 373 additions and 272 deletions
+4 -5
View File
@@ -103,12 +103,11 @@ class HtmlTemplate {
}
''';
static const String defaultFontStyle = '''
div, p, span, th, td, tr, ul, ol, li, a, button {
static String defaultFontStyle({double fontSize = 14}) => '''
body {
font-weight: 400;
font-size: 16px;
line-height: 24px;
letter-spacing: -0.01em; /* -1% */
font-size: ${fontSize}px;
font-style: normal;
}
p {
+2 -1
View File
@@ -123,6 +123,7 @@ class HtmlUtils {
String? javaScripts,
bool hideScrollBar = true,
bool useDefaultFontStyle = false,
double fontSize = 14,
TextDirection? direction,
double? contentPadding,
}) {
@@ -135,7 +136,7 @@ class HtmlUtils {
<style>
${HtmlTemplate.fontFaceStyle}
${useDefaultFontStyle ? HtmlTemplate.defaultFontStyle : ''}
${useDefaultFontStyle ? HtmlTemplate.defaultFontStyle(fontSize: fontSize) : ''}
.tmail-content {
min-height: ${minHeight ?? 0}px;