TF-4093 Make interface more compact
This commit is contained in:
@@ -23,6 +23,7 @@ class HtmlContentViewerOnWeb extends StatefulWidget {
|
||||
final TextDirection? direction;
|
||||
final double? contentPadding;
|
||||
final bool useDefaultFontStyle;
|
||||
final double fontSize;
|
||||
|
||||
/// Handler for mailto: links
|
||||
final OnMailtoClicked? mailtoDelegate;
|
||||
@@ -60,6 +61,7 @@ class HtmlContentViewerOnWeb extends StatefulWidget {
|
||||
this.keepAlive = false,
|
||||
this.disableScrolling = false,
|
||||
this.autoAdjustHeight = false,
|
||||
this.fontSize = 14,
|
||||
this.htmlContentMinHeight = ConstantsUI.htmlContentMinHeight,
|
||||
this.htmlContentMinWidth = ConstantsUI.htmlContentMinWidth,
|
||||
this.offsetHtmlContentHeight = ConstantsUI.htmlContentOffsetHeight,
|
||||
@@ -406,6 +408,7 @@ class _HtmlContentViewerOnWebState extends State<HtmlContentViewerOnWeb>
|
||||
direction: widget.direction,
|
||||
contentPadding: widget.contentPadding,
|
||||
useDefaultFontStyle: widget.useDefaultFontStyle,
|
||||
fontSize: widget.fontSize,
|
||||
);
|
||||
|
||||
return htmlTemplate;
|
||||
|
||||
@@ -30,6 +30,7 @@ class HtmlContentViewer extends StatefulWidget {
|
||||
final bool keepWidthWhileLoading;
|
||||
final double? contentPadding;
|
||||
final bool useDefaultFontStyle;
|
||||
final double fontSize;
|
||||
final double? maxHtmlContentHeight;
|
||||
final double htmlContentMinHeight;
|
||||
final double offsetHtmlContentHeight;
|
||||
@@ -58,6 +59,7 @@ class HtmlContentViewer extends StatefulWidget {
|
||||
this.contentPadding,
|
||||
this.useDefaultFontStyle = false,
|
||||
this.disableScrolling = false,
|
||||
this.fontSize = 16,
|
||||
this.maxViewHeight,
|
||||
this.maxHtmlContentHeight,
|
||||
this.onLoadWidthHtmlViewer,
|
||||
@@ -151,6 +153,7 @@ class HtmlContentViewState extends State<HtmlContentViewer> with AutomaticKeepAl
|
||||
styleCSS: combinedCss,
|
||||
contentPadding: widget.contentPadding,
|
||||
useDefaultFontStyle: widget.useDefaultFontStyle,
|
||||
fontSize: widget.fontSize,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ class _IosHtmlContentViewerWidgetState extends State<IosHtmlContentViewerWidget>
|
||||
direction: widget.direction,
|
||||
javaScripts: HtmlInteraction.scriptsHandleLazyLoadingBackgroundImage,
|
||||
useDefaultFontStyle: widget.useDefaultFontStyle,
|
||||
fontSize: 16,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ class AvatarBuilder {
|
||||
List<Color>? _avatarColors;
|
||||
List<BoxShadow>? _boxShadows;
|
||||
TextStyle? _textStyle;
|
||||
EdgeInsetsGeometry? _padding;
|
||||
|
||||
void key(Key key) {
|
||||
_key = key;
|
||||
@@ -55,6 +56,10 @@ class AvatarBuilder {
|
||||
_textStyle = textStyle;
|
||||
}
|
||||
|
||||
void addPadding(EdgeInsetsGeometry? padding) {
|
||||
_padding = padding;
|
||||
}
|
||||
|
||||
void addOnTapActionClick(OnTapAvatarActionClick onTapAvatarActionClick) {
|
||||
_onTapAvatarActionClick = onTapAvatarActionClick;
|
||||
}
|
||||
@@ -64,7 +69,7 @@ class AvatarBuilder {
|
||||
}
|
||||
|
||||
Widget build() {
|
||||
return InkWell(
|
||||
final bodyWidget = InkWell(
|
||||
onTap: _onTapAvatarActionClick,
|
||||
onTapDown: (detail) {
|
||||
if (_onTapAvatarActionWithPositionClick != null && _context != null) {
|
||||
@@ -102,5 +107,11 @@ class AvatarBuilder {
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
if (_padding != null) {
|
||||
return Padding(padding: _padding!, child: bodyWidget);
|
||||
} else {
|
||||
return bodyWidget;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user