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 {
|
class EntityName extends StatelessWidget {
|
||||||
|
|
||||||
final EdgeInsetsGeometry padding;
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -14,9 +18,10 @@ class EntityName extends StatelessWidget {
|
|||||||
padding: padding,
|
padding: padding,
|
||||||
child: Text(
|
child: Text(
|
||||||
"${entityModel.entity.displayName}",
|
"${entityModel.entity.displayName}",
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: textOverflow,
|
||||||
softWrap: true,
|
softWrap: wordsWrap,
|
||||||
style: TextStyle(fontSize: Sizes.nameFontSize),
|
style: TextStyle(fontSize: fontSize),
|
||||||
|
textAlign: textAlign,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
|
@ -13,7 +13,11 @@ class GlanceEntityContainer extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
EntityName(
|
EntityName(
|
||||||
padding: EdgeInsets.all(0.0),
|
padding: EdgeInsets.only(bottom: Sizes.rowPadding),
|
||||||
|
textOverflow: TextOverflow.ellipsis,
|
||||||
|
wordsWrap: false,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
fontSize: Sizes.smallFontSize,
|
||||||
),
|
),
|
||||||
EntityIcon(
|
EntityIcon(
|
||||||
padding: EdgeInsets.all(0.0),
|
padding: EdgeInsets.all(0.0),
|
||||||
@ -22,7 +26,7 @@ class GlanceEntityContainer extends StatelessWidget {
|
|||||||
SimpleEntityState(
|
SimpleEntityState(
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
padding: EdgeInsets.all(0.0),
|
padding: EdgeInsets.only(top: Sizes.rowPadding),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user