Skip to content

Commit 7383a0c

Browse files
committed
资源调整
1 parent fa19aef commit 7383a0c

15 files changed

+95
-127
lines changed

lib/common/style/GSYStyle.dart

Lines changed: 57 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,17 @@ class GSYColors {
1414
static const int primaryDarkValue = 0xFF121917;
1515

1616
static const int cardWhite = 0xFFFFFFFF;
17-
1817
static const int textWhite = 0xFFFFFFFF;
18+
static const int miWhite = 0xffececec;
19+
static const int white = 0xFFFFFFFF;
20+
static const int actionBlue = 0xff267aff;
21+
static const int subTextColor = 0xff959595;
22+
static const int subLightTextColor = 0xffc4c4c4;
1923

20-
static const miWhite = 0xffececec;
21-
static const white = 0xFFFFFFFF;
22-
static const transparentColor = 0x00000000;
23-
24-
static const mainBackgroundColor = miWhite;
25-
static const tabBackgroundColor = 0xffffffff;
26-
static const cardBackgroundColor = 0xFFFFFFFF;
27-
static const cardShadowColor = 0xff000000;
28-
static const actionBlue = 0xff267aff;
29-
30-
static const lineColor = 0xff42464b;
31-
32-
static const webDraculaBackgroundColor = 0xff282a36;
33-
34-
static const selectedColor = primaryDarkValue;
24+
static const int mainBackgroundColor = miWhite;
3525

36-
static const titleTextColor = miWhite;
37-
static const mainTextColor = primaryDarkValue;
38-
static const subTextColor = 0xff959595;
39-
static const subLightTextColor = 0xffc4c4c4;
40-
static const TextColorWhite = 0xFFFFFFFF;
41-
static const TextColorMiWhtte = miWhite;
42-
43-
static const tabSelectedColor = primaryValue;
44-
static const tabUnSelectColor = 0xffa6aaaf;
26+
static const int mainTextColor = primaryDarkValue;
27+
static const int textColorWhite = white;
4528

4629
static const MaterialColor primarySwatch = const MaterialColor(
4730
primaryValue,
@@ -62,39 +45,24 @@ class GSYColors {
6245

6346
///文本样式
6447
class GSYConstant {
65-
// navbar 高度
66-
static const iosnavHeaderHeight = 70.0;
67-
static const andrnavHeaderHeight = 70.0;
6848

69-
static const largetTextSize = 30.0;
49+
static const lagerTextSize = 30.0;
7050
static const bigTextSize = 23.0;
7151
static const normalTextSize = 18.0;
7252
static const middleTextWhiteSize = 16.0;
7353
static const smallTextSize = 14.0;
7454
static const minTextSize = 12.0;
7555

76-
// tabBar 高度
77-
static const tabBarHeight = 44.0;
78-
static const tabIconSize = 20.0;
7956

80-
static const normalIconSize = 40.0;
81-
static const bigIconSize = 50.0;
82-
static const largeIconSize = 80.0;
83-
static const smallIconSize = 30.0;
84-
static const minIconSize = 20.0;
85-
static const littleIconSize = 10.0;
57+
static const minText = TextStyle(
58+
color: Color(GSYColors.subTextColor),
59+
fontSize: minTextSize,
60+
);
8661

87-
static const normalMarginEdge = 10.0;
88-
static const normalNumberOfLine = 4.0;
8962

90-
static const titleTextStyle = TextStyle(
91-
color: Color(GSYColors.titleTextColor),
92-
fontSize: normalTextSize,
93-
fontWeight: FontWeight.bold,
94-
);
9563

9664
static const smallTextWhite = TextStyle(
97-
color: Color(GSYColors.TextColorWhite),
65+
color: Color(GSYColors.textColorWhite),
9866
fontSize: smallTextSize,
9967
);
10068

@@ -109,37 +77,62 @@ class GSYConstant {
10977
fontWeight: FontWeight.bold,
11078
);
11179

112-
static const subLightSmallText = TextStyle(
80+
static const smallSubLightText = TextStyle(
11381
color: Color(GSYColors.subLightTextColor),
11482
fontSize: smallTextSize,
11583
);
11684

117-
static const actionLightSmallText = TextStyle(
85+
static const smallActionLightText = TextStyle(
11886
color: Color(GSYColors.actionBlue),
11987
fontSize: smallTextSize,
12088
);
12189

122-
123-
static const miLightSmallText = TextStyle(
90+
static const smallMiLightText = TextStyle(
12491
color: Color(GSYColors.miWhite),
12592
fontSize: smallTextSize,
12693
);
12794

128-
static const subSmallText = TextStyle(
95+
static const smallSubText = TextStyle(
12996
color: Color(GSYColors.subTextColor),
13097
fontSize: smallTextSize,
13198
);
13299

133-
static const minSmallText = TextStyle(
100+
101+
102+
static const middleText = TextStyle(
103+
color: Color(GSYColors.mainTextColor),
104+
fontSize: middleTextWhiteSize,
105+
);
106+
107+
static const middleTextWhite = TextStyle(
108+
color: Color(GSYColors.textColorWhite),
109+
fontSize: middleTextWhiteSize,
110+
);
111+
112+
static const middleSubText = TextStyle(
134113
color: Color(GSYColors.subTextColor),
135-
fontSize: minTextSize,
114+
fontSize: middleTextWhiteSize,
136115
);
137116

138-
static const middleText = TextStyle(
117+
static const middleTextBold = TextStyle(
139118
color: Color(GSYColors.mainTextColor),
140119
fontSize: middleTextWhiteSize,
120+
fontWeight: FontWeight.bold,
121+
);
122+
123+
static const middleTextWhiteBold = TextStyle(
124+
color: Color(GSYColors.textColorWhite),
125+
fontSize: middleTextWhiteSize,
126+
fontWeight: FontWeight.bold,
141127
);
142128

129+
static const middleSubTextBold = TextStyle(
130+
color: Color(GSYColors.subTextColor),
131+
fontSize: middleTextWhiteSize,
132+
fontWeight: FontWeight.bold,
133+
);
134+
135+
143136
static const normalText = TextStyle(
144137
color: Color(GSYColors.mainTextColor),
145138
fontSize: normalTextSize,
@@ -151,13 +144,13 @@ class GSYConstant {
151144
fontWeight: FontWeight.bold,
152145
);
153146

154-
static const subNormalText = TextStyle(
147+
static const normalSubText = TextStyle(
155148
color: Color(GSYColors.subTextColor),
156149
fontSize: normalTextSize,
157150
);
158151

159152
static const normalTextWhite = TextStyle(
160-
color: Color(GSYColors.TextColorWhite),
153+
color: Color(GSYColors.textColorWhite),
161154
fontSize: normalTextSize,
162155
);
163156

@@ -178,35 +171,8 @@ class GSYConstant {
178171
fontSize: normalTextSize,
179172
);
180173

181-
static const middleTextWhite = TextStyle(
182-
color: Color(GSYColors.TextColorWhite),
183-
fontSize: middleTextWhiteSize,
184-
);
185-
186-
static const middleSubText = TextStyle(
187-
color: Color(GSYColors.subTextColor),
188-
fontSize: middleTextWhiteSize,
189-
);
190-
191-
static const middleTextBold = TextStyle(
192-
color: Color(GSYColors.mainTextColor),
193-
fontSize: middleTextWhiteSize,
194-
fontWeight:FontWeight.bold,
195-
);
196174

197175

198-
static const middleTextWhiteBold = TextStyle(
199-
color: Color(GSYColors.TextColorWhite),
200-
fontSize: middleTextWhiteSize,
201-
fontWeight:FontWeight.bold,
202-
);
203-
204-
static const middleSubTextBold = TextStyle(
205-
color: Color(GSYColors.subTextColor),
206-
fontSize: middleTextWhiteSize,
207-
fontWeight:FontWeight.bold,
208-
);
209-
210176
static const largeText = TextStyle(
211177
color: Color(GSYColors.mainTextColor),
212178
fontSize: bigTextSize,
@@ -219,28 +185,30 @@ class GSYConstant {
219185
);
220186

221187
static const largeTextWhite = TextStyle(
222-
color: Color(GSYColors.TextColorWhite),
188+
color: Color(GSYColors.textColorWhite),
223189
fontSize: bigTextSize,
224190
);
225191

226192
static const largeTextWhiteBold = TextStyle(
227-
color: Color(GSYColors.TextColorWhite),
193+
color: Color(GSYColors.textColorWhite),
228194
fontSize: bigTextSize,
229195
fontWeight: FontWeight.bold,
230196
);
231197

198+
199+
200+
232201
static const largeLargeTextWhite = TextStyle(
233-
color: Color(GSYColors.TextColorWhite),
234-
fontSize: largetTextSize,
202+
color: Color(GSYColors.textColorWhite),
203+
fontSize: lagerTextSize,
235204
fontWeight: FontWeight.bold,
236205
);
237206

238207
static const largeLargeText = TextStyle(
239208
color: Color(GSYColors.primaryValue),
240-
fontSize: largetTextSize,
209+
fontSize: lagerTextSize,
241210
fontWeight: FontWeight.bold,
242211
);
243-
244212
}
245213

246214
///字符文本

lib/page/RepositoryFileListPage.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class RepositoryDetailFileListPageState extends GSYListState<RepositoryDetailFil
5555
return new GSYCardItem(
5656
margin: EdgeInsets.only(left: 10.0, top: 5.0, right: 10.0, bottom: 5.0),
5757
child: new ListTile(
58-
title: new Text(fileItemViewModel.name, style: GSYConstant.subSmallText),
58+
title: new Text(fileItemViewModel.name, style: GSYConstant.smallSubText),
5959
leading: new Icon(
6060
iconData,
6161
size: 16.0,

lib/page/UserProfilePage.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class _UserProfileState extends State<UserProfileInfo> {
3535
new Container(
3636
width: 10.0,
3737
),
38-
new Text(title, style: GSYConstant.subNormalText),
38+
new Text(title, style: GSYConstant.normalSubText),
3939
new Container(
4040
width: 10.0,
4141
),

lib/widget/EventItem.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class EventItem extends StatelessWidget {
3030
: new Container(
3131
child: new Text(
3232
eventViewModel.actionDes,
33-
style: GSYConstant.subSmallText,
33+
style: GSYConstant.smallSubText,
3434
maxLines: 3,
3535
),
3636
margin: new EdgeInsets.only(top: 6.0, bottom: 2.0),
@@ -59,7 +59,7 @@ class EventItem extends StatelessWidget {
5959
children: <Widget>[
6060
userImage,
6161
new Expanded(child: new Text(eventViewModel.actionUser, style: GSYConstant.smallTextBold)),
62-
new Text(eventViewModel.actionTime, style: GSYConstant.subSmallText),
62+
new Text(eventViewModel.actionTime, style: GSYConstant.smallSubText),
6363
],
6464
),
6565
new Container(

lib/widget/GSYMarkdownWidget.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class GSYMarkdownWidget extends StatelessWidget {
4949
h6: GSYConstant.smallTextWhite,
5050
em: const TextStyle(fontStyle: FontStyle.italic),
5151
strong: GSYConstant.middleTextWhiteBold,
52-
code: GSYConstant.subSmallText,
52+
code: GSYConstant.smallSubText,
5353
);
5454
}
5555

@@ -63,7 +63,7 @@ class GSYMarkdownWidget extends StatelessWidget {
6363
h5: GSYConstant.smallText,
6464
h6: GSYConstant.smallText,
6565
strong: GSYConstant.middleTextBold,
66-
code: GSYConstant.subSmallText,
66+
code: GSYConstant.smallSubText,
6767
);
6868
}
6969

@@ -78,7 +78,7 @@ class GSYMarkdownWidget extends StatelessWidget {
7878
h6: GSYConstant.smallTextWhite,
7979
em: const TextStyle(fontStyle: FontStyle.italic),
8080
strong: GSYConstant.middleTextWhiteBold,
81-
code: GSYConstant.subSmallText,
81+
code: GSYConstant.smallSubText,
8282
);
8383
}
8484

lib/widget/HomeDrawer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class HomeDrawer extends StatelessWidget {
5555
),
5656
accountEmail: new Text(
5757
user.email ?? user.name ?? "---",
58-
style: GSYConstant.subNormalText,
58+
style: GSYConstant.normalSubText,
5959
),
6060
//用户名
6161
//用户邮箱

lib/widget/IssueEditDIalog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class _IssueEditDialogState extends State<IssueEditDialog> {
168168
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
169169
padding: EdgeInsets.all(4.0),
170170
constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0),
171-
child: new Text(GSYStrings.app_cancel, style: GSYConstant.subNormalText),
171+
child: new Text(GSYStrings.app_cancel, style: GSYConstant.normalSubText),
172172
onPressed: () {
173173
Navigator.pop(context);
174174
})),

lib/widget/IssueHeaderItem.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class IssueHeaderItem extends StatelessWidget {
6666
: new Container(
6767
child: new Text(
6868
"Close By " + issueHeaderViewModel.closedBy,
69-
style: GSYConstant.subSmallText,
69+
style: GSYConstant.smallSubText,
7070
),
7171
margin: new EdgeInsets.only(right: 5.0, top: 10.0, bottom: 10.0),
7272
alignment: Alignment.topRight);
@@ -107,7 +107,7 @@ class IssueHeaderItem extends StatelessWidget {
107107
///时间
108108
new Text(
109109
issueHeaderViewModel.actionTime,
110-
style: GSYConstant.subSmallText,
110+
style: GSYConstant.smallSubText,
111111
overflow: TextOverflow.ellipsis,
112112
),
113113
],

lib/widget/IssueItem.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ class IssueItem extends StatelessWidget {
5353

5454
///issue标号
5555
new Expanded(
56-
child: new Text(issueItemViewModel.issueTag, style: GSYConstant.subSmallText),
56+
child: new Text(issueItemViewModel.issueTag, style: GSYConstant.smallSubText),
5757
),
5858

5959
///评论数
6060
new GSYIConText(
6161
GSYICons.ISSUE_ITEM_COMMENT,
6262
issueItemViewModel.commentCount,
63-
GSYConstant.subSmallText,
63+
GSYConstant.smallSubText,
6464
Color(GSYColors.subTextColor),
6565
15.0,
6666
padding: 2.0,
@@ -75,7 +75,7 @@ class IssueItem extends StatelessWidget {
7575
? new Container(
7676
child: new Text(
7777
issueItemViewModel.issueComment,
78-
style: GSYConstant.subSmallText,
78+
style: GSYConstant.smallSubText,
7979
maxLines: limitComment ? 2 : 1000,
8080
),
8181
margin: new EdgeInsets.only(top: 6.0, bottom: 2.0),
@@ -111,7 +111,7 @@ class IssueItem extends StatelessWidget {
111111
new Expanded(child: new Text(issueItemViewModel.actionUser, style: GSYConstant.smallTextBold)),
112112
new Text(
113113
issueItemViewModel.actionTime,
114-
style: GSYConstant.subSmallText,
114+
style: GSYConstant.smallSubText,
115115
maxLines: 2,
116116
overflow: TextOverflow.ellipsis,
117117
),

lib/widget/PushCoedItem.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ class PushCodeItem extends StatelessWidget {
2323
margin: EdgeInsets.only(left: 10.0, top: 5.0, right: 10.0, bottom: 0.0),
2424
child: new Text(
2525
pushCodeItemViewModel.path,
26-
style: GSYConstant.subLightSmallText,
26+
style: GSYConstant.smallSubLightText,
2727
),
2828
),
2929
new GSYCardItem(
3030
///修改文件名
3131
margin: EdgeInsets.only(left: 10.0, top: 5.0, right: 10.0, bottom: 5.0),
3232
child: new ListTile(
33-
title: new Text(pushCodeItemViewModel.name, style: GSYConstant.subSmallText),
33+
title: new Text(pushCodeItemViewModel.name, style: GSYConstant.smallSubText),
3434
leading: new Icon(
3535
GSYICons.REPOS_ITEM_FILE,
3636
size: 15.0,

0 commit comments

Comments
 (0)