From 8953020f1e42fea04444187c50e173f4115952ed Mon Sep 17 00:00:00 2001 From: Scott Clampet Date: Sat, 18 May 2019 10:20:58 -0600 Subject: [PATCH] style(jar page, jar_edit form): adjust top bar icons distance from top of screen, adjust overlay col re #131, re #132, re #135 --- fude_app/lib/helpers/design_helpers.dart | 8 +- fude_app/lib/pages/home/home_page_jar.dart | 12 ++- fude_app/lib/pages/jars/jar.dart | 110 ++++++++------------- fude_app/lib/widgets/forms/edit_jar.dart | 2 +- 4 files changed, 53 insertions(+), 79 deletions(-) diff --git a/fude_app/lib/helpers/design_helpers.dart b/fude_app/lib/helpers/design_helpers.dart index a73d987..3cc479b 100644 --- a/fude_app/lib/helpers/design_helpers.dart +++ b/fude_app/lib/helpers/design_helpers.dart @@ -17,15 +17,15 @@ ThemeData buildAppThemeData(bool darkTheme) { color: !darkTheme ? Color.fromRGBO(40, 40, 40, 1) : Color.fromRGBO(242, 242, 242, 1), - // fontWeight: FontWeight.bold, - fontSize: 40, - letterSpacing: 20, + fontWeight: FontWeight.w400, + fontSize: 37, + letterSpacing: 10, ), subhead: TextStyle( color: !darkTheme ? Color.fromRGBO(242, 242, 242, 1) : Color.fromRGBO(40, 40, 40, 1), - fontWeight: FontWeight.bold, + fontWeight: FontWeight.w400, fontSize: 20, letterSpacing: 3, ), diff --git a/fude_app/lib/pages/home/home_page_jar.dart b/fude_app/lib/pages/home/home_page_jar.dart index 14d5ac8..61938f7 100644 --- a/fude_app/lib/pages/home/home_page_jar.dart +++ b/fude_app/lib/pages/home/home_page_jar.dart @@ -34,21 +34,27 @@ class HomePageJar extends StatelessWidget { } _buildTextContainer(BuildContext context) { + final double width = MediaQuery.of(context).size.width; + final double height = MediaQuery.of(context).size.height; + var titleText = _applyTextEffects( translationFactor: 100.0, - child: Padding( + child: Container( padding: EdgeInsets.only(top: 16.0), + width: width * 0.45, + // height: height * 0.1, child: Text( title == null ? jar['title'].toUpperCase() : 'ADD JAR', - overflow: TextOverflow.ellipsis, + overflow: TextOverflow.fade, style: Theme.of(context).textTheme.subhead, textAlign: TextAlign.left, + maxLines: 1, ), ), ); return Positioned( - top: 20, + top: 25, bottom: 56.0, left: 28.0, right: 28.0, diff --git a/fude_app/lib/pages/jars/jar.dart b/fude_app/lib/pages/jars/jar.dart index ecf52e4..e741ffa 100644 --- a/fude_app/lib/pages/jars/jar.dart +++ b/fude_app/lib/pages/jars/jar.dart @@ -92,10 +92,10 @@ class _JarPageState extends State { colors: !widget.model.darkTheme ? [ Color.fromRGBO(242, 242, 242, 0.5), - Color.fromRGBO(40, 40, 40, 0.8), + Color.fromRGBO(40, 40, 40, 0.2), ] : [ - Color.fromRGBO(40, 40, 40, 0.5), + Color.fromRGBO(40, 40, 40, 0.3), Color.fromRGBO(242, 242, 242, 1), ], ), @@ -142,7 +142,7 @@ class _JarPageState extends State { Container( color: Colors.transparent, padding: EdgeInsets.fromLTRB( - width * 0.02, height * 0.01, width * 0.03, 0), + width * 0.02, height * 0.06, width * 0.03, 0), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: @@ -175,89 +175,57 @@ class _JarPageState extends State { }), ), ), - model.selectedJar.data['categories'].length > - 0 - ? AnimatedOpacity( - opacity: _swiperVisible ? 1.0 : 0.0, - duration: - Duration(milliseconds: 1000), - child: Container( - child: IconButton( - icon: Icon( - Icons.filter_list, - color: Theme.of(context) - .iconTheme - .color, - ), - iconSize: 39, - onPressed: () { - _swiperVisible = false; - Navigator.pushReplacement( - context, - PageTransition( - curve: Curves.linear, - type: PageTransitionType - .rightToLeftWithFade, - child: JarNotes( - model: model), - ), - ); - }), - ), - ) - : AnimatedOpacity( - opacity: _swiperVisible ? 1.0 : 0.0, - duration: - Duration(milliseconds: 1000), - child: Container( - child: IconButton( - icon: Icon( - Icons.add, - color: Theme.of(context) - .iconTheme - .color, - ), - iconSize: 39, - onPressed: () { - print('pressed'); - _swiperVisible = false; - model.categoryChildren = []; - Navigator.pushReplacement( - context, - PageTransition( - curve: Curves.linear, - type: PageTransitionType - .downToUp, - child: EditJarPage( - model: model, - jar: model - .selectedJar), - ), - ); - }), + AnimatedOpacity( + opacity: _swiperVisible ? 1.0 : 0.0, + duration: Duration(milliseconds: 1000), + child: Container( + child: IconButton( + icon: Icon( + Icons.filter_list, + color: Theme.of(context) + .iconTheme + .color, ), - ), + iconSize: 39, + onPressed: () { + _swiperVisible = false; + Navigator.pushReplacement( + context, + PageTransition( + curve: Curves.linear, + type: PageTransitionType + .rightToLeftWithFade, + child: JarNotes(model: model), + ), + ); + }), + ), + ), ], ), ), Positioned( - top: height * 0.21, + top: height * 0.19, left: width * 0.07, right: width * 0.07, child: AnimatedOpacity( opacity: _swiperVisible ? 1.0 : 0.0, duration: Duration(milliseconds: 1000), - child: Text( - model.selectedJar.data['title'].toUpperCase(), - overflow: TextOverflow.clip, - style: Theme.of(context).textTheme.title, - textAlign: TextAlign.center, + child: Container( + child: Text( + model.selectedJar.data['title'] + .toUpperCase(), + overflow: TextOverflow.fade, + style: Theme.of(context).textTheme.title, + textAlign: TextAlign.center, + maxLines: 3, + ), ), ), ), model.selectedJar.data['categories'].length > 0 ? Positioned( - top: height * 0.43, + top: height * 0.45, left: width * 0.07, right: width * 0.07, child: AnimatedOpacity( diff --git a/fude_app/lib/widgets/forms/edit_jar.dart b/fude_app/lib/widgets/forms/edit_jar.dart index 83d7bb1..9fdce75 100644 --- a/fude_app/lib/widgets/forms/edit_jar.dart +++ b/fude_app/lib/widgets/forms/edit_jar.dart @@ -77,7 +77,7 @@ class EditJarForm extends StatelessWidget { 'Tap and hold to delete', style: TextStyle( color: Color.fromRGBO(131, 129, 129, 1), fontSize: 12), - ) : Container() + ) : Text('') ], ), );