mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 首页间距调整、弱化部分颜色
This commit is contained in:
@@ -40,7 +40,7 @@ class PBadge extends StatelessWidget {
|
|||||||
color = Colors.white;
|
color = Colors.white;
|
||||||
}
|
}
|
||||||
if (type == 'color') {
|
if (type == 'color') {
|
||||||
bgColor = t.primaryContainer.withOpacity(0.6);
|
bgColor = t.primaryContainer.withOpacity(0.5);
|
||||||
color = t.primary;
|
color = t.primary;
|
||||||
}
|
}
|
||||||
if (type == 'line') {
|
if (type == 'line') {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ class StatDanMu extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Map<String, Color> colorObject = {
|
Map<String, Color> colorObject = {
|
||||||
'white': Colors.white,
|
'white': Colors.white,
|
||||||
'gray': Theme.of(context).colorScheme.outline,
|
'gray': Theme.of(context).colorScheme.outline.withOpacity(0.8),
|
||||||
'black': Theme.of(context).colorScheme.onBackground.withOpacity(0.8),
|
'black': Theme.of(context).colorScheme.onBackground.withOpacity(0.7),
|
||||||
};
|
};
|
||||||
Color color = colorObject[theme]!;
|
Color color = colorObject[theme]!;
|
||||||
return Row(
|
return Row(
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ class StatView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Map<String, Color> colorObject = {
|
Map<String, Color> colorObject = {
|
||||||
'white': Colors.white,
|
'white': Colors.white,
|
||||||
'gray': Theme.of(context).colorScheme.outline,
|
'gray': Theme.of(context).colorScheme.outline.withOpacity(0.8),
|
||||||
'black': Theme.of(context).colorScheme.onBackground.withOpacity(0.8),
|
'black': Theme.of(context).colorScheme.onBackground.withOpacity(0.7),
|
||||||
};
|
};
|
||||||
Color color = colorObject[theme]!;
|
Color color = colorObject[theme]!;
|
||||||
return Row(
|
return Row(
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class VideoCardV extends StatelessWidget {
|
|||||||
if (videoItem.goto == 'av')
|
if (videoItem.goto == 'av')
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 1,
|
bottom: 0,
|
||||||
child: VideoPopupMenu(
|
child: VideoPopupMenu(
|
||||||
size: 30,
|
size: 30,
|
||||||
iconSize: 16,
|
iconSize: 16,
|
||||||
@@ -206,7 +206,7 @@ class VideoContent extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(5, 8, 5, 4),
|
padding: const EdgeInsets.fromLTRB(6, 5, 6, 5),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
@@ -219,7 +219,7 @@ class VideoContent extends StatelessWidget {
|
|||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
height: 1.42,
|
height: 1.38,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -268,7 +268,7 @@ class VideoContent extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Text(
|
child: Text(
|
||||||
videoItem.owner.name,
|
videoItem.owner.name.toString(),
|
||||||
// semanticsLabel: "Up主:${videoItem.owner.name}",
|
// semanticsLabel: "Up主:${videoItem.owner.name}",
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.clip,
|
overflow: TextOverflow.clip,
|
||||||
@@ -321,7 +321,7 @@ class VideoStat extends StatelessWidget {
|
|||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize,
|
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize,
|
||||||
color: Theme.of(context).colorScheme.outline,
|
color: Theme.of(context).colorScheme.outline.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
text: Utils.formatTimestampToRelativeTime(videoItem.pubdate)),
|
text: Utils.formatTimestampToRelativeTime(videoItem.pubdate)),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class _LivePageState extends State<LivePage>
|
|||||||
return Container(
|
return Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
margin: const EdgeInsets.only(
|
margin: const EdgeInsets.only(
|
||||||
left: StyleString.safeSpace, right: StyleString.safeSpace),
|
left: StyleString.cardSpace, right: StyleString.cardSpace),
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(StyleString.imgRadius),
|
borderRadius: BorderRadius.all(StyleString.imgRadius),
|
||||||
),
|
),
|
||||||
@@ -143,9 +143,9 @@ class _LivePageState extends State<LivePage>
|
|||||||
return SliverGrid(
|
return SliverGrid(
|
||||||
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
// 行间距
|
// 行间距
|
||||||
mainAxisSpacing: StyleString.safeSpace,
|
mainAxisSpacing: StyleString.cardSpace,
|
||||||
// 列间距
|
// 列间距
|
||||||
crossAxisSpacing: StyleString.safeSpace,
|
crossAxisSpacing: StyleString.cardSpace,
|
||||||
// 最大宽度
|
// 最大宽度
|
||||||
maxCrossAxisExtent: Grid.maxRowWidth,
|
maxCrossAxisExtent: Grid.maxRowWidth,
|
||||||
mainAxisExtent: Grid.calculateActualWidth(context, Grid.maxRowWidth, StyleString.safeSpace) / StyleString.aspectRatio+
|
mainAxisExtent: Grid.calculateActualWidth(context, Grid.maxRowWidth, StyleString.safeSpace) / StyleString.aspectRatio+
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class _RcmdPageState extends State<RcmdPage>
|
|||||||
slivers: [
|
slivers: [
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.fromLTRB(0, StyleString.safeSpace, 0, 0),
|
const EdgeInsets.fromLTRB(0, StyleString.cardSpace, 0, 0),
|
||||||
sliver: FutureBuilder(
|
sliver: FutureBuilder(
|
||||||
future: _futureBuilderFuture,
|
future: _futureBuilderFuture,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
@@ -145,19 +145,18 @@ class _RcmdPageState extends State<RcmdPage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget contentGrid(ctr, videoList) {
|
Widget contentGrid(ctr, videoList) {
|
||||||
|
|
||||||
return SliverGrid(
|
return SliverGrid(
|
||||||
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
// 行间距
|
// 行间距
|
||||||
mainAxisSpacing: StyleString.cardSpace,
|
mainAxisSpacing: StyleString.cardSpace,
|
||||||
// 列间距
|
// 列间距
|
||||||
crossAxisSpacing: StyleString.safeSpace,
|
crossAxisSpacing: StyleString.cardSpace,
|
||||||
// 最大宽度
|
// 最大宽度
|
||||||
maxCrossAxisExtent: Grid.maxRowWidth,
|
maxCrossAxisExtent: Grid.maxRowWidth,
|
||||||
mainAxisExtent: Grid.calculateActualWidth(
|
mainAxisExtent: Grid.calculateActualWidth(
|
||||||
context, Grid.maxRowWidth, StyleString.safeSpace) /
|
context, Grid.maxRowWidth, StyleString.safeSpace) /
|
||||||
StyleString.aspectRatio +
|
StyleString.aspectRatio +
|
||||||
MediaQuery.textScalerOf(context).scale(92),
|
MediaQuery.textScalerOf(context).scale(90),
|
||||||
),
|
),
|
||||||
delegate: SliverChildBuilderDelegate(
|
delegate: SliverChildBuilderDelegate(
|
||||||
(BuildContext context, int index) {
|
(BuildContext context, int index) {
|
||||||
|
|||||||
Reference in New Issue
Block a user