Skip to content

Commit 8e4afd0

Browse files
committed
fix something
1 parent 82d1cb8 commit 8e4afd0

File tree

5 files changed

+44
-35
lines changed

5 files changed

+44
-35
lines changed

lib/page/repository_detail_issue_list_page.dart

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,23 @@ class _RepositoryDetailIssuePageState extends State<RepositoryDetailIssuePage>
122122
return new Scaffold(
123123
resizeToAvoidBottomPadding: false,
124124
floatingActionButton: new Container(
125-
width: 52,
126-
height: 52,
127-
decoration: BoxDecoration(
128-
boxShadow: [BoxShadow(offset: Offset(0, 1), color: Theme.of(context).primaryColorDark, blurRadius: 1.0)],
129-
color: Color(GSYColors.primaryValue),
130-
borderRadius: BorderRadius.all(Radius.circular(25))),
125+
width: 52,
126+
height: 52,
127+
decoration: BoxDecoration(
128+
boxShadow: [BoxShadow(offset: Offset(0, 1), color: Theme.of(context).primaryColorDark, blurRadius: 1.0)],
129+
color: Color(GSYColors.primaryValue),
130+
borderRadius: BorderRadius.all(Radius.circular(25))),
131+
child: InkWell(
132+
onTap: () {
133+
_createIssue();
134+
},
131135
child: new Icon(
132136
GSYICons.ISSUE_ITEM_ADD,
133137
size: 50.0,
134138
color: Color(GSYColors.textWhite),
135-
)),
139+
),
140+
),
141+
),
136142
backgroundColor: Color(GSYColors.mainBackgroundColor),
137143
appBar: new AppBar(
138144
leading: new Container(),

lib/page/repository_detail_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class _RepositoryDetailPageState extends State<RepositoryDetailPage> {
135135
];
136136
renderItem(String item, int i) {
137137
return new Container(
138-
padding: EdgeInsets.all(0.0),
138+
padding: EdgeInsets.symmetric(vertical: 10),
139139
child: new Text(
140140
item,
141141
style: GSYConstant.smallTextWhite,

lib/widget/gsy_icon_text.dart

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ class GSYIConText extends StatelessWidget {
2424

2525
final MainAxisSize mainAxisSize;
2626

27-
final CrossAxisAlignment crossAxisAlignment;
28-
2927
final double textWidth;
3028

3129
GSYIConText(
@@ -38,18 +36,19 @@ class GSYIConText extends StatelessWidget {
3836
this.onPressed,
3937
this.mainAxisAlignment = MainAxisAlignment.start,
4038
this.mainAxisSize = MainAxisSize.max,
41-
this.crossAxisAlignment = CrossAxisAlignment.center,
4239
this.textWidth = -1,
4340
});
4441

4542
@override
4643
Widget build(BuildContext context) {
4744
Widget showText = (textWidth == -1)
48-
? new Text(
49-
iconText,
50-
style: textStyle,
51-
overflow: TextOverflow.ellipsis,
52-
maxLines: 1,
45+
? new Container(
46+
child: new Text(
47+
iconText,
48+
style: textStyle.merge(new TextStyle(textBaseline: TextBaseline.alphabetic)),
49+
overflow: TextOverflow.ellipsis,
50+
maxLines: 1,
51+
),
5352
)
5453
: new Container(
5554
width: textWidth,
@@ -63,19 +62,22 @@ class GSYIConText extends StatelessWidget {
6362
maxLines: 1,
6463
));
6564

66-
return new Row(
67-
mainAxisAlignment: mainAxisAlignment,
68-
mainAxisSize: mainAxisSize,
69-
crossAxisAlignment: crossAxisAlignment,
70-
children: <Widget>[
71-
new Icon(
72-
iconData,
73-
size: iconSize,
74-
color: iconColor,
75-
),
76-
new Padding(padding: new EdgeInsets.all(padding)),
77-
new Expanded(child: showText)
78-
],
65+
return new Container(
66+
child: new Row(
67+
textBaseline: TextBaseline.alphabetic,
68+
mainAxisAlignment: mainAxisAlignment,
69+
mainAxisSize: mainAxisSize,
70+
crossAxisAlignment: CrossAxisAlignment.baseline,
71+
children: <Widget>[
72+
new Icon(
73+
iconData,
74+
size: iconSize,
75+
color: iconColor,
76+
),
77+
new Padding(padding: new EdgeInsets.all(padding)),
78+
showText
79+
],
80+
),
7981
);
8082
}
8183
}

lib/widget/gsy_tabbar_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class _GSYTabBarState extends State<GSYTabBarWidget>
108108
if (this._type == GSYTabBarWidget.TOP_TAB) {
109109
///顶部tab bar
110110
return new Scaffold(
111-
floatingActionButton: _floatingActionButton,
111+
floatingActionButton: SafeArea(child: _floatingActionButton ?? Container()),
112112
persistentFooterButtons:
113113
_tarWidgetControl == null ? [] : _tarWidgetControl.footerButton,
114114
appBar: new AppBar(

lib/widget/repos_item.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@ class ReposItem extends StatelessWidget {
1919
ReposItem(this.reposViewModel, {this.onPressed}) : super();
2020

2121
///仓库item的底部状态,比如star数量等
22-
_getBottomItem(IconData icon, String text, {int flex = 2}) {
22+
_getBottomItem(BuildContext context, IconData icon, String text, {int flex = 3}) {
2323
return new Expanded(
2424
flex: flex,
2525
child: new Center(
2626
child: new GSYIConText(
2727
icon,
28-
text,
28+
"000000000000000",
2929
GSYConstant.smallSubText,
3030
Color(GSYColors.subTextColor),
3131
15.0,
3232
padding: 5.0,
33+
textWidth: 80,
3334
),
3435
),
3536
);
@@ -99,9 +100,9 @@ class ReposItem extends StatelessWidget {
99100
new Row(
100101
crossAxisAlignment: CrossAxisAlignment.start,
101102
children: <Widget>[
102-
_getBottomItem(GSYICons.REPOS_ITEM_STAR, reposViewModel.repositoryStar),
103-
_getBottomItem(GSYICons.REPOS_ITEM_FORK, reposViewModel.repositoryFork),
104-
_getBottomItem(GSYICons.REPOS_ITEM_ISSUE, reposViewModel.repositoryWatch, flex: 4),
103+
_getBottomItem(context, GSYICons.REPOS_ITEM_STAR, reposViewModel.repositoryStar),
104+
_getBottomItem(context, GSYICons.REPOS_ITEM_FORK, reposViewModel.repositoryFork),
105+
_getBottomItem(context, GSYICons.REPOS_ITEM_ISSUE, reposViewModel.repositoryWatch, flex: 4),
105106
],
106107
),
107108
],

0 commit comments

Comments
 (0)