WIP #183 Glance card ui improvements
This commit is contained in:
parent
26187e6233
commit
37ad5e81cf
@ -3,8 +3,12 @@ part of '../main.dart';
|
||||
class EntityName extends StatelessWidget {
|
||||
|
||||
final EdgeInsetsGeometry padding;
|
||||
final TextOverflow textOverflow;
|
||||
final bool wordsWrap;
|
||||
final double fontSize;
|
||||
final TextAlign textAlign;
|
||||
|
||||
const EntityName({Key key, this.padding: const EdgeInsets.only(right: 10.0)}) : super(key: key);
|
||||
const EntityName({Key key, this.padding: const EdgeInsets.only(right: 10.0), this.textOverflow: TextOverflow.ellipsis, this.wordsWrap: true, this.fontSize: Sizes.nameFontSize, this.textAlign: TextAlign.left}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -14,9 +18,10 @@ class EntityName extends StatelessWidget {
|
||||
padding: padding,
|
||||
child: Text(
|
||||
"${entityModel.entity.displayName}",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: true,
|
||||
style: TextStyle(fontSize: Sizes.nameFontSize),
|
||||
overflow: textOverflow,
|
||||
softWrap: wordsWrap,
|
||||
style: TextStyle(fontSize: fontSize),
|
||||
textAlign: textAlign,
|
||||
),
|
||||
),
|
||||
onTap: () =>
|
||||
|
@ -13,7 +13,11 @@ class GlanceEntityContainer extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
EntityName(
|
||||
padding: EdgeInsets.all(0.0),
|
||||
padding: EdgeInsets.only(bottom: Sizes.rowPadding),
|
||||
textOverflow: TextOverflow.ellipsis,
|
||||
wordsWrap: false,
|
||||
textAlign: TextAlign.center,
|
||||
fontSize: Sizes.smallFontSize,
|
||||
),
|
||||
EntityIcon(
|
||||
padding: EdgeInsets.all(0.0),
|
||||
@ -22,7 +26,7 @@ class GlanceEntityContainer extends StatelessWidget {
|
||||
SimpleEntityState(
|
||||
textAlign: TextAlign.center,
|
||||
expanded: false,
|
||||
padding: EdgeInsets.all(0.0),
|
||||
padding: EdgeInsets.only(top: Sizes.rowPadding),
|
||||
)
|
||||
],
|
||||
);
|
||||
|
Reference in New Issue
Block a user