1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-19 19:54:54 +01:00

fix: cupertino button padding

This commit is contained in:
Rongjian Zhang 2020-01-04 22:46:33 +08:00
parent e3b050b5a2
commit b1181ffc6f
3 changed files with 12 additions and 11 deletions

View File

@ -159,15 +159,15 @@ class RepositoryScreen extends StatelessWidget {
} }
setState(() {}); setState(() {});
}, },
borderRadius: BorderRadius.circular(10), minSize: 0,
padding: EdgeInsets.symmetric(horizontal: 10), color: theme.palette.primary,
child: Row( padding: EdgeInsets.symmetric(
children: <Widget>[ horizontal: 12,
Icon(Octicons.star, size: 15), vertical: 4,
SizedBox(width: 2), ),
Text(repo.viewerHasStarred ? 'Unstar' : 'Star', child: Text(
style: TextStyle(fontSize: 15)), repo.viewerHasStarred ? 'Unstar' : 'Star',
], style: TextStyle(fontSize: 17),
), ),
) )
], ],

View File

@ -367,7 +367,7 @@ class UserScreen extends StatelessWidget {
GithubUserArguments(login: login, isViewer: isViewer))); GithubUserArguments(login: login, isViewer: isViewer)));
return isViewer ? data.data.viewer : data.data.repositoryOwner; return isViewer ? data.data.viewer : data.data.repositoryOwner;
}, },
title: AppBarTitle(isViewer ? 'Me' : 'User'), // TODO: title: AppBarTitle(isViewer ? 'Me' : login),
actionBuilder: (payload, _) { actionBuilder: (payload, _) {
switch (payload.resolveType) { switch (payload.resolveType) {
case 'User': case 'User':

View File

@ -65,8 +65,9 @@ class Link extends StatelessWidget {
switch (theme.theme) { switch (theme.theme) {
case AppThemeType.cupertino: case AppThemeType.cupertino:
return CupertinoButton( return CupertinoButton(
minSize: 0,
child: child, child: child,
padding: EdgeInsets.all(0), padding: EdgeInsets.zero,
onPressed: () async { onPressed: () async {
if (onTap != null) onTap(); if (onTap != null) onTap();
if (url != null) theme.push(context, url); if (url != null) theme.push(context, url);