Skip to content

Commit 644bf0c

Browse files
committed
fix theme color scheme
1 parent 171ac2a commit 644bf0c

File tree

8 files changed

+56
-27
lines changed

8 files changed

+56
-27
lines changed

lib/page/comment/comment_page.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ class _CommentPageState extends State<CommentPage> {
268268
)
269269
: Container(
270270
child: Center(
271-
child: CircularProgressIndicator(),
271+
child: CircularProgressIndicator(
272+
color: Theme.of(context).accentColor,
273+
),
272274
),
273275
);
274276
},
@@ -296,7 +298,8 @@ class _CommentPageState extends State<CommentPage> {
296298
padding: const EdgeInsets.only(bottom: 2.0, right: 8.0),
297299
child: Theme(
298300
data: Theme.of(context).copyWith(
299-
primaryColor: Theme.of(context).accentColor),
301+
colorScheme: Theme.of(context).colorScheme.copyWith(primary: Theme.of(context).accentColor),
302+
),
300303
child: TextField(
301304
controller: _editController,
302305
decoration: InputDecoration(

lib/page/picture/illust_lighting_page.dart

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,15 @@ class _IllustLightingPageState extends State<IllustLightingPage>
238238
if (data == null)
239239
return Container(
240240
child: Center(
241-
child: CircularProgressIndicator(),
241+
child: CircularProgressIndicator(
242+
color: Theme.of(context).accentColor,
243+
),
242244
),
243245
);
244246
return CustomScrollView(
245247
controller: _scrollController,
246248
slivers: [
247-
if (userSetting.isBangs ||
248-
((data.width / data.height) > 5))
249+
if (userSetting.isBangs || ((data.width / data.height) > 5))
249250
SliverToBoxAdapter(
250251
child: Container(height: MediaQuery.of(context).padding.top)),
251252
if (data.type == "ugoira")
@@ -277,7 +278,9 @@ class _IllustLightingPageState extends State<IllustLightingPage>
277278
Widget placeWidget = Container(
278279
height: 150,
279280
child: Center(
280-
child: CircularProgressIndicator(),
281+
child: CircularProgressIndicator(
282+
color: Theme.of(context).accentColor,
283+
),
281284
),
282285
);
283286
return InkWell(
@@ -469,7 +472,9 @@ class _IllustLightingPageState extends State<IllustLightingPage>
469472
child: Container(
470473
height: 200,
471474
child: Center(
472-
child: CircularProgressIndicator(),
475+
child: CircularProgressIndicator(
476+
color: Theme.of(context).accentColor,
477+
),
473478
),
474479
),
475480
)

lib/page/picture/tag_for_illust_page.dart

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,23 @@ class _TagForIllustPageState extends State<TagForIllustPage> {
5959
.copyWith(primaryColor: Theme.of(context).accentColor),
6060
child: Padding(
6161
padding: EdgeInsets.all(8.0),
62-
child: TextField(
63-
controller: textEditingController,
64-
decoration: InputDecoration(
65-
suffixIcon: IconButton(
66-
icon: Icon(Icons.add),
67-
onPressed: () {
68-
final value = textEditingController.value.text.trim();
69-
if (value.isNotEmpty)
70-
_store.insert(TagsR(isRegistered: true, name: value));
71-
textEditingController.clear();
72-
},
73-
)),
62+
child: Theme(
63+
data: Theme.of(context).copyWith(
64+
colorScheme: Theme.of(context).colorScheme.copyWith(primary: Theme.of(context).accentColor),
65+
),
66+
child: TextField(
67+
controller: textEditingController,
68+
decoration: InputDecoration(
69+
suffixIcon: IconButton(
70+
icon: Icon(Icons.add),
71+
onPressed: () {
72+
final value = textEditingController.value.text.trim();
73+
if (value.isNotEmpty)
74+
_store.insert(TagsR(isRegistered: true, name: value));
75+
textEditingController.clear();
76+
},
77+
)),
78+
),
7479
),
7580
),
7681
),

lib/page/saucenao/saucenao_page.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class _SauceNaoPageState extends State<SauceNaoPage> {
6161
return Scaffold(
6262
floatingActionButton: FloatingActionButton(
6363
child: Icon(Icons.add_photo_alternate),
64+
backgroundColor: Theme.of(context).accentColor,
6465
onPressed: () {
6566
_store.findImage();
6667
},

lib/page/search/result_illust_list.dart

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,11 @@ class _ResultIllustListState extends State<ResultIllustList> {
176176
children: <Widget>[
177177
TextButton(
178178
onPressed: () {},
179-
child: Text(I18n.of(context).date_duration)),
179+
child: Text(
180+
I18n.of(context).date_duration,
181+
style:
182+
TextStyle(color: Theme.of(context).accentColor),
183+
)),
180184
TextButton(
181185
onPressed: () {
182186
setState(() {
@@ -189,7 +193,9 @@ class _ResultIllustListState extends State<ResultIllustList> {
189193
});
190194
Navigator.of(context).pop();
191195
},
192-
child: Text(I18n.of(context).apply))
196+
child: Text(I18n.of(context).apply,
197+
style: TextStyle(
198+
color: Theme.of(context).accentColor)))
193199
],
194200
),
195201
Expanded(
@@ -235,7 +241,9 @@ class _ResultIllustListState extends State<ResultIllustList> {
235241
children: <Widget>[
236242
TextButton(
237243
onPressed: () {},
238-
child: Text(I18n.of(context).filter)),
244+
child: Text(I18n.of(context).filter,
245+
style: TextStyle(
246+
color: Theme.of(context).accentColor))),
239247
TextButton(
240248
onPressed: () {
241249
setState(() {
@@ -252,7 +260,9 @@ class _ResultIllustListState extends State<ResultIllustList> {
252260
});
253261
Navigator.of(context).pop();
254262
},
255-
child: Text(I18n.of(context).apply)),
263+
child: Text(I18n.of(context).apply,
264+
style: TextStyle(
265+
color: Theme.of(context).accentColor))),
256266
],
257267
),
258268
Padding(

lib/page/search/suggest/search_suggestion_page.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class _SearchSuggestionPageState extends State<SearchSuggestionPage> {
7777
onPressed: () {
7878
_sauceStore.findImage();
7979
},
80+
backgroundColor: Theme.of(context).accentColor,
8081
child: Icon(Icons.add_photo_alternate),
8182
),
8283
body: Container(
@@ -160,6 +161,7 @@ class _SearchSuggestionPageState extends State<SearchSuggestionPage> {
160161
focusNode: node,
161162
keyboardType: inputType,
162163
autofocus: true,
164+
cursorColor: Theme.of(context).accentColor,
163165
onTap: () {
164166
FocusScope.of(context).requestFocus(node);
165167
},
@@ -187,6 +189,7 @@ class _SearchSuggestionPageState extends State<SearchSuggestionPage> {
187189
)));
188190
},
189191
decoration: InputDecoration(
192+
border: InputBorder.none,
190193
hintText: I18n.of(context).search_word_or_paste_link,
191194
));
192195
}

lib/page/user/users_page.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ class _UsersPageState extends State<UsersPage>
154154
appBar: AppBar(),
155155
body: Container(
156156
child: Center(
157-
child: CircularProgressIndicator(),
157+
child: CircularProgressIndicator(
158+
color: Theme.of(context).accentColor,
159+
),
158160
)),
159161
);
160162
}
@@ -457,7 +459,9 @@ class _UsersPageState extends State<UsersPage>
457459
child: userStore.userDetail == null
458460
? Container(
459461
padding: const EdgeInsets.only(right: 16.0, bottom: 4.0),
460-
child: CircularProgressIndicator(),
462+
child: CircularProgressIndicator(
463+
color: Theme.of(context).accentColor,
464+
),
461465
)
462466
: Padding(
463467
padding: const EdgeInsets.only(right: 16.0, bottom: 4.0),

lib/store/user_setting.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ abstract class _UserSettingBase with Store {
149149
primaryColor: Colors.white,
150150
appBarTheme: AppBarTheme(
151151
brightness: Brightness.light,
152-
// color: Colors.transparent,
153-
// elevation: 0.0,
154152
));
155153
@observable
156154
ThemeMode themeMode = ThemeMode.system;

0 commit comments

Comments
 (0)