TF-3627 Remove right padding editor scroll bar in composer

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-04-17 09:45:14 +07:00
committed by Dat H. Pham
parent b8b4557fd7
commit 3337a608be
10 changed files with 135 additions and 107 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ class ThemeUtils {
dividerTheme: _dividerTheme,
visualDensity: VisualDensity.adaptivePlatformDensity,
scrollbarTheme: ScrollbarThemeData(
thickness: WidgetStateProperty.all(8.0),
radius: const Radius.circular(8.0),
thickness: WidgetStateProperty.all(6.0),
radius: const Radius.circular(10.0),
thumbColor: WidgetStateProperty.all(AppColor.thumbScrollbarColor)),
);
}
+8 -7
View File
@@ -221,29 +221,30 @@ class HtmlTemplate {
static const String customInternalStyleCSS = '''
<style>
* {
html, .note-editable, .note-codable {
overflow: auto;
}
*::-webkit-scrollbar {
width: 8px;
height: 8px;
html::-webkit-scrollbar, .note-editable::-webkit-scrollbar, .note-codable::-webkit-scrollbar {
width: 6px;
height: 6px;
}
*::-webkit-scrollbar-thumb {
html::-webkit-scrollbar-thumb, .note-editable::-webkit-scrollbar-thumb, .note-codable::-webkit-scrollbar-thumb {
background-color: #c1c1c1;
border-radius: 10px;
min-height: 70px;
}
*::-webkit-scrollbar-track {
html::-webkit-scrollbar-track, .note-editable::-webkit-scrollbar-track, .note-codable::-webkit-scrollbar-track {
background: transparent;
border-radius: 10px;
}
/* Browsers without `::-webkit-scrollbar-*` support */
@supports not selector(::-webkit-scrollbar) {
* {
html, .note-editable, .note-codable {
scrollbar-width: thin;
scrollbar-color: #c1c1c1 transparent;
}
}
+19
View File
@@ -41,6 +41,7 @@ class HtmlUtils {
static String customCssStyleHtmlEditor({
TextDirection direction = TextDirection.ltr,
bool useDefaultFont = false,
double? horizontalPadding,
}) {
if (PlatformInfo.isWeb) {
return '''
@@ -61,6 +62,24 @@ class HtmlUtils {
.note-editable .tmail-signature {
text-align: ${direction == TextDirection.rtl ? 'right' : 'left'};
}
${horizontalPadding != null
? '''
.note-codable {
padding: 10px ${horizontalPadding}px 0px ${horizontalPadding > 3 ? horizontalPadding - 3 : horizontalPadding}px;
margin-right: 3px;
}
.note-editable {
padding: 10px ${horizontalPadding}px 0px ${horizontalPadding > 3 ? horizontalPadding - 3 : horizontalPadding}px;
margin-right: 3px;
}
'''
: '''
.note-editable {
padding: 10px 10px 0px 10px;
}
'''}
</style>
''';
} else if (PlatformInfo.isMobile) {