mirror of
https://github.com/git-touch/git-touch
synced 2025-01-31 08:04:51 +01:00
improvement: style tweaks
This commit is contained in:
parent
61a5b3f786
commit
c6822c4830
@ -23,7 +23,7 @@ class StorageKeys {
|
||||
}
|
||||
|
||||
class CommonStyle {
|
||||
static const padding = EdgeInsets.all(12);
|
||||
static const padding = EdgeInsets.symmetric(horizontal: 16, vertical: 12);
|
||||
static final border = BorderView();
|
||||
static const verticalGap = SizedBox(height: 18);
|
||||
static final monospace = Platform.isIOS ? 'Menlo' : 'monospace'; // FIXME:
|
||||
|
@ -26,7 +26,7 @@ class Avatar extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
child: ClipRRect(
|
||||
borderRadius: borderRadius ?? BorderRadius.circular(4),
|
||||
borderRadius: borderRadius ?? BorderRadius.circular(size / 2),
|
||||
child: FadeInImage.assetNetwork(
|
||||
placeholder: 'images/avatar.png',
|
||||
image: url ?? 'images/avatar.png',
|
||||
|
@ -39,22 +39,26 @@ class RepositoryItem extends StatelessWidget {
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Avatar(url: avatarUrl, size: AvatarSize.small, linkUrl: '/$owner'),
|
||||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: join(SizedBox(height: 8), <Widget>[
|
||||
children: <Widget>[
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Avatar(
|
||||
url: avatarUrl,
|
||||
size: AvatarSize.small,
|
||||
linkUrl: '/$owner',
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
owner + ' / ',
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
fontSize: 18,
|
||||
color: theme.palette.primary,
|
||||
),
|
||||
),
|
||||
@ -62,7 +66,7 @@ class RepositoryItem extends StatelessWidget {
|
||||
child: Text(
|
||||
name,
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
fontSize: 18,
|
||||
color: theme.palette.primary,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
@ -72,66 +76,58 @@ class RepositoryItem extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
Icon(iconData,
|
||||
size: 17, color: theme.palette.tertiaryText),
|
||||
// Icon(iconData,
|
||||
// size: 17, color: theme.palette.tertiaryText),
|
||||
],
|
||||
),
|
||||
if (description != null && description.isNotEmpty)
|
||||
SizedBox(height: 6),
|
||||
if (description != null && description.isNotEmpty) ...[
|
||||
Text(
|
||||
description,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: theme.palette.secondaryText,
|
||||
fontSize: 15,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
],
|
||||
DefaultTextStyle(
|
||||
style: TextStyle(color: theme.palette.text, fontSize: 13),
|
||||
style: TextStyle(color: theme.palette.text, fontSize: 14),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Row(children: <Widget>[
|
||||
Container(
|
||||
width: 10,
|
||||
height: 10,
|
||||
decoration: BoxDecoration(
|
||||
color: convertColor(primaryLanguageColor),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
if (primaryLanguageName != null) ...[
|
||||
Container(
|
||||
width: 12,
|
||||
height: 12,
|
||||
decoration: BoxDecoration(
|
||||
color: convertColor(primaryLanguageColor),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: Text(
|
||||
primaryLanguageName ?? 'Unknown',
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
Expanded(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Icon(Octicons.star,
|
||||
size: 14, color: theme.palette.text),
|
||||
Text(numberFormat.format(starCount)),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Icon(Octicons.repo_forked,
|
||||
size: 14, color: theme.palette.text),
|
||||
Text(numberFormat.format(forkCount)),
|
||||
],
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
primaryLanguageName,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 24),
|
||||
],
|
||||
if (starCount > 0) ...[
|
||||
Icon(Octicons.star,
|
||||
size: 16, color: theme.palette.text),
|
||||
SizedBox(width: 2),
|
||||
Text(numberFormat.format(starCount)),
|
||||
SizedBox(width: 24),
|
||||
],
|
||||
if (forkCount > 0) ...[
|
||||
Icon(Octicons.repo_forked,
|
||||
size: 16, color: theme.palette.text),
|
||||
SizedBox(width: 2),
|
||||
Text(numberFormat.format(forkCount)),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user