feat: style tweaks

This commit is contained in:
Rongjian Zhang
2019-09-13 15:55:58 +08:00
parent 1a9f7083ee
commit 6312da876a
6 changed files with 90 additions and 67 deletions

View File

@@ -15,13 +15,21 @@ class EntryItem extends StatelessWidget {
return Expanded(
child: Link(
child: Container(
padding: EdgeInsets.symmetric(vertical: 12),
padding: EdgeInsets.symmetric(vertical: 14),
child: Column(
children: <Widget>[
Text(count.toString(),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500)),
Text(text,
style: TextStyle(fontSize: 12, color: PrimerColors.gray600))
Text(
count.toString(),
style: TextStyle(fontSize: 17, fontWeight: FontWeight.w600),
),
Text(
text,
style: TextStyle(
fontSize: 12,
color: PrimerColors.gray700,
fontWeight: FontWeight.w500,
),
)
],
),
),

View File

@@ -70,7 +70,7 @@ class EventItem extends StatelessWidget {
screenBuilder: screenBuilder,
url: url,
child: Container(
padding: EdgeInsets.all(10),
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
@@ -80,7 +80,7 @@ class EventItem extends StatelessWidget {
Avatar(
url: event.actorAvatarUrl,
login: event.actorLogin,
size: 18,
size: 20,
),
SizedBox(width: 10),
Expanded(
@@ -90,7 +90,10 @@ class EventItem extends StatelessWidget {
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 15, color: PrimerColors.gray900),
fontSize: 16,
color: PrimerColors.gray900,
fontWeight: FontWeight.w500,
),
children: [
createLinkSpan(
context,
@@ -104,16 +107,19 @@ class EventItem extends StatelessWidget {
if (detailWidget != null)
DefaultTextStyle(
style: TextStyle(
color: PrimerColors.gray500, fontSize: 14),
color: PrimerColors.gray900, fontSize: 14),
child: detailWidget,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Icon(iconData, color: PrimerColors.gray700, size: 13),
Icon(iconData, color: PrimerColors.gray500, size: 14),
SizedBox(width: 4),
Text(timeago.format(event.createdAt),
style: TextStyle(
fontSize: 13, color: PrimerColors.gray700))
fontSize: 13,
color: PrimerColors.gray500,
))
],
),
]),
@@ -134,7 +140,7 @@ class EventItem extends StatelessWidget {
spans: [
TextSpan(
text: ' ' + event.type,
style: TextStyle(color: Colors.blueAccent),
style: TextStyle(color: PrimerColors.blue500),
)
],
iconData: Octicons.octoface,
@@ -302,26 +308,27 @@ class EventItem extends StatelessWidget {
iconData: Octicons.repo_push,
detailWidget: Column(
children: commits.map((commit) {
return Row(children: <Widget>[
Text(
(commit['sha'] as String).substring(0, 7),
style: TextStyle(
color: PrimerColors.blue500,
fontSize: 13,
fontFamily: 'Menlo',
fontFamilyFallback: ['Menlo', 'Roboto Mono'],
return Row(
children: <Widget>[
Text(
(commit['sha'] as String).substring(0, 7),
style: TextStyle(
color: PrimerColors.blue500,
fontSize: 13,
fontFamily: 'Menlo',
fontFamilyFallback: ['Menlo', 'Roboto Mono'],
),
),
),
SizedBox(width: 6),
Expanded(
child: Text(
commit['message'],
style: TextStyle(color: Colors.black54, fontSize: 14),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
)
]);
SizedBox(width: 6),
Expanded(
child: Text(
commit['message'],
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
)
],
);
}).toList(),
),
url: 'https://github.com/' +

View File

@@ -91,7 +91,7 @@ class RepoItem extends StatelessWidget {
Text(
payload['owner']['login'] + ' / ',
style: TextStyle(
fontSize: 16,
fontSize: inRepoScreen ? 18 : 16,
color: PrimerColors.blue500,
fontWeight: FontWeight.w500,
),
@@ -99,7 +99,7 @@ class RepoItem extends StatelessWidget {
Text(
payload['name'],
style: TextStyle(
fontSize: 16,
fontSize: inRepoScreen ? 18 : 16,
color: PrimerColors.blue500,
fontWeight: FontWeight.w600,
),