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