mirror of
https://github.com/git-touch/git-touch
synced 2025-01-31 08:04:51 +01:00
improvement: dark mode style
This commit is contained in:
parent
a1bf2555b7
commit
70ef6d3173
@ -350,7 +350,7 @@ class ThemeModel with ChangeNotifier {
|
||||
return Container(
|
||||
height: 216,
|
||||
child: CupertinoPicker(
|
||||
backgroundColor: CupertinoColors.white,
|
||||
backgroundColor: palette.background,
|
||||
children: groupItem.items.map((v) => Text(v.text)).toList(),
|
||||
itemExtent: 40,
|
||||
scrollController: FixedExtentScrollController(
|
||||
|
@ -8,11 +8,11 @@ import 'package:git_touch/scaffolds/refresh_stateful.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||
import 'package:git_touch/widgets/avatar.dart';
|
||||
import 'package:git_touch/widgets/label.dart';
|
||||
import 'package:git_touch/widgets/mutation_button.dart';
|
||||
import 'package:git_touch/widgets/link.dart';
|
||||
import 'package:git_touch/widgets/markdown_view.dart';
|
||||
import 'package:git_touch/widgets/table_view.dart';
|
||||
import 'package:primer/primer.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
@ -191,20 +191,11 @@ class RepositoryScreen extends StatelessWidget {
|
||||
spacing: 4,
|
||||
runSpacing: 4,
|
||||
children: repo.repositoryTopics.nodes.map((node) {
|
||||
return Container(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 4, horizontal: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: PrimerColors.blue000,
|
||||
borderRadius: BorderRadius.all(Radius.circular(4)),
|
||||
),
|
||||
child: Text(
|
||||
node.topic.name,
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
color: theme.palette.primary,
|
||||
),
|
||||
),
|
||||
return MyLabel(
|
||||
name: node.topic.name,
|
||||
// color: Colors.blue.shade50,
|
||||
color: theme.palette.grayBackground,
|
||||
textColor: theme.palette.primary,
|
||||
);
|
||||
}).toList(),
|
||||
)
|
||||
|
@ -91,7 +91,7 @@ class IssueItem extends StatelessWidget {
|
||||
runSpacing: 4,
|
||||
children: (payload['labels']['nodes'] as List)
|
||||
.map((label) {
|
||||
return Label(
|
||||
return MyLabel(
|
||||
name: label['name'],
|
||||
cssColor: label['color'],
|
||||
);
|
||||
|
@ -1,15 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
|
||||
class Label extends StatelessWidget {
|
||||
class MyLabel extends StatelessWidget {
|
||||
final String name;
|
||||
final Color color;
|
||||
final String cssColor;
|
||||
final Color textColor;
|
||||
|
||||
Label({
|
||||
MyLabel({
|
||||
@required this.name,
|
||||
this.color,
|
||||
this.cssColor,
|
||||
this.textColor,
|
||||
});
|
||||
|
||||
@override
|
||||
@ -25,8 +27,8 @@ class Label extends StatelessWidget {
|
||||
name,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: getFontColorByBrightness(_color),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: textColor ?? getFontColorByBrightness(_color),
|
||||
// fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -68,9 +68,11 @@ class _NotificationItemState extends State<NotificationItem> {
|
||||
}
|
||||
|
||||
Widget _buildCheckIcon() {
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
return Icon(
|
||||
payload.unread ? Octicons.check : Octicons.primitive_dot,
|
||||
color: loading ? Colors.black12 : Colors.black45,
|
||||
color:
|
||||
loading ? theme.palette.grayBackground : theme.palette.tertiaryText,
|
||||
size: 24,
|
||||
);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class TimelineItem extends StatelessWidget {
|
||||
|
||||
InlineSpan _buildLabel(p) {
|
||||
return WidgetSpan(
|
||||
child: Label(
|
||||
child: MyLabel(
|
||||
name: p['label']['name'],
|
||||
cssColor: p['label']['color'],
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user