Skip to content

Commit 817e780

Browse files
committed
调整一些样式
1 parent 147cc81 commit 817e780

File tree

3 files changed

+38
-30
lines changed

3 files changed

+38
-30
lines changed

lib/common/style/GSYStyle.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class GSYConstant {
5656
static const minTextSize = 12.0;
5757

5858
static const minText = TextStyle(
59-
color: Color(GSYColors.subTextColor),
59+
color: Color(GSYColors.subLightTextColor),
6060
fontSize: minTextSize,
6161
);
6262

lib/widget/ReposHeaderItem.dart

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ class ReposHeaderItem extends StatelessWidget {
2323
_getBottomItem(IconData icon, String text, onPressed) {
2424
return new Expanded(
2525
child: new Center(
26-
child: new FlatButton(
27-
onPressed: onPressed,
28-
padding: new EdgeInsets.all(0.0),
29-
child: new GSYIConText(
30-
icon,
31-
text,
32-
GSYConstant.smallSubLightText,
33-
Color(GSYColors.subLightTextColor),
34-
15.0,
35-
padding: 3.0,
36-
mainAxisAlignment: MainAxisAlignment.center,
37-
),
38-
),
39-
),
26+
child: new RawMaterialButton(
27+
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
28+
padding: EdgeInsets.only(top: 10.0, bottom: 10.0),
29+
constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0),
30+
child: new GSYIConText(
31+
icon,
32+
text,
33+
GSYConstant.smallSubLightText,
34+
Color(GSYColors.subLightTextColor),
35+
15.0,
36+
padding: 3.0,
37+
mainAxisAlignment: MainAxisAlignment.center,
38+
),
39+
onPressed: onPressed)),
4040
);
4141
}
4242

@@ -73,6 +73,7 @@ class ReposHeaderItem extends StatelessWidget {
7373
}
7474
return new Container(
7575
alignment: Alignment.topLeft,
76+
margin: EdgeInsets.only(top: 5.0),
7677
child: Wrap(
7778
spacing: 10.0,
7879
runSpacing: 5.0,

lib/widget/UserHeader.dart

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,25 @@ class UserHeaderItem extends StatelessWidget {
3434
///底部状态栏
3535
_getBottomItem(String title, var value, onPressed) {
3636
String data = value == null ? "" : value.toString();
37-
TextStyle valueStyle = (value != null && value.toString().length > 4) ? GSYConstant.minText : GSYConstant.smallSubLightText;
37+
TextStyle valueStyle = (value != null && value.toString().length > 6) ? GSYConstant.minText : GSYConstant.smallSubLightText;
38+
TextStyle titleStyle = (title != null && title.toString().length > 6) ? GSYConstant.minText : GSYConstant.smallSubLightText;
3839
return new Expanded(
3940
child: new Center(
40-
child: new FlatButton(
41-
onPressed: onPressed,
42-
child: RichText(
43-
textAlign: TextAlign.center,
44-
text: TextSpan(
45-
style: GSYConstant.smallSubLightText,
46-
text: title + "\n",
47-
children: [TextSpan(text: data, style: valueStyle)],
48-
),
49-
),
50-
),
51-
),
41+
child: new RawMaterialButton(
42+
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
43+
padding: EdgeInsets.only(top: 5.0),
44+
constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0),
45+
child: RichText(
46+
textAlign: TextAlign.center,
47+
text: TextSpan(
48+
children: [
49+
TextSpan(text: title, style: titleStyle),
50+
TextSpan(text: "\n", style: valueStyle),
51+
TextSpan(text: data, style: valueStyle)
52+
],
53+
),
54+
),
55+
onPressed: onPressed)),
5256
);
5357
}
5458

@@ -103,7 +107,8 @@ class UserHeaderItem extends StatelessWidget {
103107
if (orgList.length > 3) {
104108
list.add(new RawMaterialButton(
105109
onPressed: () {
106-
NavigatorUtils.gotoCommonList(context, userInfo.login + " " + CommonUtils.getLocale(context).user_orgs_title, "org", "user_orgs", userName: userInfo.login);
110+
NavigatorUtils.gotoCommonList(context, userInfo.login + " " + CommonUtils.getLocale(context).user_orgs_title, "org", "user_orgs",
111+
userName: userInfo.login);
107112
},
108113
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
109114
padding: const EdgeInsets.only(right: 5.0, left: 5.0),
@@ -324,7 +329,9 @@ class UserHeaderItem extends StatelessWidget {
324329
)),
325330
new Container(
326331
child: new Text(
327-
(userInfo.type == "Organization") ? CommonUtils.getLocale(context).user_dynamic_group : CommonUtils.getLocale(context).user_dynamic_title,
332+
(userInfo.type == "Organization")
333+
? CommonUtils.getLocale(context).user_dynamic_group
334+
: CommonUtils.getLocale(context).user_dynamic_title,
328335
style: GSYConstant.normalTextBold,
329336
overflow: TextOverflow.ellipsis,
330337
),

0 commit comments

Comments
 (0)