Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
style(jar page, jar_edit form): adjust top bar icons distance from to…
Browse files Browse the repository at this point in the history
…p of screen, adjust overlay col

re #131, re #132, re #135
  • Loading branch information
Scott Clampet authored and Scott Clampet committed May 18, 2019
1 parent 729ecad commit 8953020
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 79 deletions.
8 changes: 4 additions & 4 deletions fude_app/lib/helpers/design_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand Down
12 changes: 9 additions & 3 deletions fude_app/lib/pages/home/home_page_jar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
110 changes: 39 additions & 71 deletions fude_app/lib/pages/jars/jar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ class _JarPageState extends State<JarPage> {
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),
],
),
Expand Down Expand Up @@ -142,7 +142,7 @@ class _JarPageState extends State<JarPage> {
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:
Expand Down Expand Up @@ -175,89 +175,57 @@ class _JarPageState extends State<JarPage> {
}),
),
),
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(
Expand Down
2 changes: 1 addition & 1 deletion fude_app/lib/widgets/forms/edit_jar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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('')
],
),
);
Expand Down

0 comments on commit 8953020

Please sign in to comment.