diff options
author | Scott Murray <scott.murray@konsulko.com> | 2023-01-01 16:18:44 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2023-01-01 21:23:37 +0000 |
commit | 5ce59ba69f1451ec18c565b7b18301856553f574 (patch) | |
tree | 01b96480ab5aa705138d360fcc0c4552c2cb4ba4 /lib/widget_clock.dart | |
parent | 3caff566e591975f06dda06fb63023258c89a46e (diff) |
Changes:
- The volume control was raising at unexpected times, after some
investigation it seems the GestureDetector onTap definition was
done incorrectly, fix it.
- Tweaked the date & time display sizing to more close match the
Qt demo and improve visuals.
Bug-AGL: SPEC-4615
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Id484a10c9adc71b65bfcf515919958dc9e84e444
Diffstat (limited to 'lib/widget_clock.dart')
-rw-r--r-- | lib/widget_clock.dart | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/lib/widget_clock.dart b/lib/widget_clock.dart index c7b53ec..5962717 100644 --- a/lib/widget_clock.dart +++ b/lib/widget_clock.dart @@ -40,34 +40,22 @@ class _ClockWidgetState extends State<ClockWidget> { @override Widget build(BuildContext context) { - TextStyle? textStyle = Theme.of(context) - .textTheme - .labelLarge - ?.copyWith(color: widget.textColor); + TextStyle? textStyle = TextStyle(fontSize: 32, color: widget.textColor); + return Container( height: widget.size, - //padding: EdgeInsets.all(16.0), + padding: EdgeInsets.all(16.0), child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, children: [ - SizedBox(height: 16), - FittedBox( - fit: BoxFit.contain, - child: Text( - DateFormat('EEEE').format(_now), - style: textStyle, - ), - ), - //const Divider(thickness: 1), - FittedBox( - fit: BoxFit.contain, - child: Text( - DateFormat.jm().format(_now), - style: textStyle, - ), + Text( + DateFormat('EEEE').format(_now), + style: textStyle, ), - SizedBox(height: 16), + SizedBox(height: 8), + Text(DateFormat.jm().format(_now), style: textStyle), ], - mainAxisAlignment: MainAxisAlignment.spaceEvenly, ), alignment: Alignment.center, ); |