mod: title fontSize

This commit is contained in:
guozhigq
2023-07-26 11:43:16 +08:00
parent 9e5b7a405f
commit 57833160f7
18 changed files with 147 additions and 150 deletions

View File

@ -20,8 +20,7 @@ class StatDanMu extends StatelessWidget {
return Row( return Row(
children: [ children: [
Icon( Icon(
// CupertinoIcons.ellipses_bubble, Icons.subtitles_outlined,
Icons.subtitles_sharp,
size: 14, size: 14,
color: color, color: color,
), ),

View File

@ -20,8 +20,7 @@ class StatView extends StatelessWidget {
return Row( return Row(
children: [ children: [
Icon( Icon(
// CupertinoIcons.play_rectangle, Icons.play_circle_outlined,
Icons.play_circle_fill_outlined,
size: 13, size: 13,
color: color, color: color,
), ),

View File

@ -122,7 +122,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(10, 4, 6, 2), padding: const EdgeInsets.fromLTRB(10, 2, 6, 0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -130,8 +130,8 @@ class VideoContent extends StatelessWidget {
Text( Text(
videoItem.title, videoItem.title,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: const TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 0.3, letterSpacing: 0.3,
), ),
@ -149,6 +149,7 @@ class VideoContent extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 0.3,
color: i['type'] == 'em' color: i['type'] == 'em'
? Theme.of(context).colorScheme.primary ? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.onSurface, : Theme.of(context).colorScheme.onSurface,

View File

@ -52,15 +52,12 @@ class VideoCardV extends StatelessWidget {
}, },
child: Column( child: Column(
children: [ children: [
Container( ClipRRect(
clipBehavior: Clip.hardEdge, borderRadius: const BorderRadius.only(
decoration: const BoxDecoration( topLeft: StyleString.imgRadius,
borderRadius: BorderRadius.only( topRight: StyleString.imgRadius,
topLeft: StyleString.imgRadius, bottomLeft: StyleString.imgRadius,
topRight: StyleString.imgRadius, bottomRight: StyleString.imgRadius,
bottomLeft: StyleString.imgRadius,
bottomRight: StyleString.imgRadius,
),
), ),
child: AspectRatio( child: AspectRatio(
aspectRatio: StyleString.aspectRatio, aspectRatio: StyleString.aspectRatio,
@ -116,7 +113,7 @@ class VideoContent extends StatelessWidget {
return Expanded( return Expanded(
child: Padding( child: Padding(
// 多列 // 多列
padding: const EdgeInsets.fromLTRB(4, 5, 6, 10), padding: const EdgeInsets.fromLTRB(4, 5, 6, 6),
// 单列 // 单列
// padding: const EdgeInsets.fromLTRB(14, 10, 4, 8), // padding: const EdgeInsets.fromLTRB(14, 10, 4, 8),
child: Column( child: Column(
@ -126,79 +123,63 @@ class VideoContent extends StatelessWidget {
Text( Text(
videoItem.title, videoItem.title,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: const TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 0.3, letterSpacing: 0.3,
), ),
maxLines: Get.find<RcmdController>().crossAxisCount, maxLines: Get.find<RcmdController>().crossAxisCount,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
SizedBox(
height: 18, Row(
child: Row( children: [
children: [ if (videoItem.rcmdReason != null &&
if (videoItem.rcmdReason != null && videoItem.rcmdReason.content != '' ||
videoItem.rcmdReason.content != '') ...[ videoItem.isFollowed == 1) ...[
Container( Container(
padding: const EdgeInsets.fromLTRB(3, 1, 3, 1), padding: const EdgeInsets.fromLTRB(3, 0, 3, 0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.primaryContainer .primaryContainer
.withOpacity(0.6), .withOpacity(0.6),
borderRadius: BorderRadius.circular(3)), borderRadius: BorderRadius.circular(3)),
child: Text( child: Center(
videoItem.rcmdReason.content,
style: TextStyle(
fontSize:
Theme.of(context).textTheme.labelSmall!.fontSize,
color: Theme.of(context).colorScheme.primary,
),
),
),
const SizedBox(width: 4)
] else if (videoItem.isFollowed == 1) ...[
Container(
padding: const EdgeInsets.fromLTRB(3, 1, 3, 1),
decoration: BoxDecoration(
color: Theme.of(context)
.colorScheme
.primaryContainer
.withOpacity(0.6),
borderRadius: BorderRadius.circular(3)),
child: Text(
'已关注',
style: TextStyle(
fontSize:
Theme.of(context).textTheme.labelSmall!.fontSize,
color: Theme.of(context).colorScheme.primary,
),
),
),
const SizedBox(width: 4)
],
Expanded(
child: LayoutBuilder(builder:
(BuildContext context, BoxConstraints constraints) {
return SizedBox(
width: constraints.maxWidth,
child: Text( child: Text(
videoItem.owner.name, videoItem.rcmdReason != null &&
maxLines: 1, videoItem.rcmdReason.content != ''
? videoItem.rcmdReason.content
: '已关注',
style: TextStyle( style: TextStyle(
fontSize: Theme.of(context) fontSize: Theme.of(context)
.textTheme .textTheme
.labelMedium! .labelSmall!
.fontSize, .fontSize,
color: Theme.of(context).colorScheme.outline, color: Theme.of(context).colorScheme.primary,
), ),
), ),
); )),
}), const SizedBox(width: 4)
),
], ],
), Expanded(
child: LayoutBuilder(builder:
(BuildContext context, BoxConstraints constraints) {
return SizedBox(
width: constraints.maxWidth,
child: Text(
videoItem.owner.name,
maxLines: 1,
style: TextStyle(
fontSize:
Theme.of(context).textTheme.labelMedium!.fontSize,
color: Theme.of(context).colorScheme.outline,
),
),
);
}),
),
],
), ),
// Row( // Row(
// children: [ // children: [

View File

@ -34,6 +34,7 @@ class MyApp extends StatelessWidget {
return GetMaterialApp( return GetMaterialApp(
title: 'PiLiPaLa', title: 'PiLiPaLa',
theme: ThemeData( theme: ThemeData(
fontFamily: 'HarmonyOS',
colorScheme: lightDynamic ?? colorScheme: lightDynamic ??
ColorScheme.fromSeed( ColorScheme.fromSeed(
seedColor: Colors.green, seedColor: Colors.green,
@ -42,6 +43,7 @@ class MyApp extends StatelessWidget {
useMaterial3: true, useMaterial3: true,
), ),
darkTheme: ThemeData( darkTheme: ThemeData(
fontFamily: 'HarmonyOS',
colorScheme: darkDynamic ?? colorScheme: darkDynamic ??
ColorScheme.fromSeed( ColorScheme.fromSeed(
seedColor: Colors.green, seedColor: Colors.green,

View File

@ -76,9 +76,11 @@ class VideoContent extends StatelessWidget {
Text( Text(
favFolderItem.title, favFolderItem.title,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: const TextStyle(
fontSize: Theme.of(context).textTheme.titleSmall!.fontSize, fontSize: 13,
fontWeight: FontWeight.w500), fontWeight: FontWeight.w500,
letterSpacing: 0.3,
),
), ),
Text( Text(
'${favFolderItem.mediaCount}个内容', '${favFolderItem.mediaCount}个内容',

View File

@ -131,8 +131,8 @@ class VideoContent extends StatelessWidget {
Text( Text(
videoItem.title, videoItem.title,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: const TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 0.3, letterSpacing: 0.3,
), ),

View File

@ -11,13 +11,16 @@ Widget followItem({item}) {
leading: Hero( leading: Hero(
tag: heroTag, tag: heroTag,
child: NetworkImgLayer( child: NetworkImgLayer(
width: 38, width: 45,
height: 38, height: 45,
type: 'avatar', type: 'avatar',
src: item.face, src: item.face,
), ),
), ),
title: Text(item.uname), title: Text(
item.uname,
style: const TextStyle(fontSize: 14),
),
subtitle: Text( subtitle: Text(
item.sign, item.sign,
maxLines: 1, maxLines: 1,

View File

@ -59,7 +59,7 @@ class HistoryItem extends StatelessWidget {
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(
StyleString.cardSpace, 7, StyleString.cardSpace, 7), StyleString.cardSpace, 5, StyleString.cardSpace, 5),
child: LayoutBuilder( child: LayoutBuilder(
builder: (context, boxConstraints) { builder: (context, boxConstraints) {
double width = double width =
@ -121,12 +121,6 @@ class HistoryItem extends StatelessWidget {
}, },
), ),
), ),
Divider(
height: 1,
indent: 8,
endIndent: 12,
color: Theme.of(context).dividerColor.withOpacity(0.08),
)
], ],
), ),
); );
@ -148,8 +142,8 @@ class VideoContent extends StatelessWidget {
Text( Text(
videoItem.title, videoItem.title,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: const TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 0.3, letterSpacing: 0.3,
), ),

View File

@ -104,7 +104,7 @@ class LiveContent extends StatelessWidget {
return Expanded( return Expanded(
child: Padding( child: Padding(
// 多列 // 多列
padding: const EdgeInsets.fromLTRB(4, 5, 6, 8), padding: const EdgeInsets.fromLTRB(4, 5, 6, 6),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -112,15 +112,14 @@ class LiveContent extends StatelessWidget {
Text( Text(
liveItem.title, liveItem.title,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: const TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 0.3, letterSpacing: 0.3,
), ),
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
const SizedBox(height: 4),
Row( Row(
children: [ children: [
const UpTag(), const UpTag(),

View File

@ -12,8 +12,8 @@ Widget searchLivePanel(BuildContext context, ctr, list) {
controller: ctr!.scrollController, controller: ctr!.scrollController,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, crossAxisCount: 2,
crossAxisSpacing: StyleString.cardSpace, crossAxisSpacing: StyleString.cardSpace + 2,
mainAxisSpacing: StyleString.cardSpace, mainAxisSpacing: StyleString.cardSpace + 3,
mainAxisExtent: mainAxisExtent:
MediaQuery.of(context).size.width / 2 / StyleString.aspectRatio + MediaQuery.of(context).size.width / 2 / StyleString.aspectRatio +
65, 65,
@ -22,7 +22,7 @@ Widget searchLivePanel(BuildContext context, ctr, list) {
itemBuilder: (context, index) { itemBuilder: (context, index) {
var i = list![index]; var i = list![index];
return Card( return Card(
elevation: 0.8, elevation: 0,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: StyleString.mdRadius, borderRadius: StyleString.mdRadius,
@ -32,40 +32,46 @@ Widget searchLivePanel(BuildContext context, ctr, list) {
onTap: () {}, onTap: () {},
child: Column( child: Column(
children: [ children: [
AspectRatio( ClipRRect(
aspectRatio: StyleString.aspectRatio, borderRadius: const BorderRadius.only(
child: LayoutBuilder(builder: (context, boxConstraints) { topLeft: StyleString.imgRadius,
double maxWidth = boxConstraints.maxWidth; topRight: StyleString.imgRadius,
double maxHeight = boxConstraints.maxHeight; bottomLeft: StyleString.imgRadius,
return Stack( bottomRight: StyleString.imgRadius,
children: [ ),
Hero( child: AspectRatio(
tag: Utils.makeHeroTag(i.roomid), aspectRatio: StyleString.aspectRatio,
child: NetworkImgLayer( child: LayoutBuilder(builder: (context, boxConstraints) {
// 指定图片尺寸 double maxWidth = boxConstraints.maxWidth;
// src: videoItem.pic + '@${(maxWidth * 2).toInt()}w', double maxHeight = boxConstraints.maxHeight;
src: i.cover + '@.webp', return Stack(
type: 'emote', children: [
width: maxWidth, Hero(
height: maxHeight, tag: Utils.makeHeroTag(i.roomid),
), child: NetworkImgLayer(
), src: i.cover + '@.webp',
Positioned( type: 'emote',
left: 0, width: maxWidth,
right: 0, height: maxHeight,
bottom: 0,
child: AnimatedOpacity(
opacity: 1,
duration: const Duration(milliseconds: 200),
child: LiveStat(
online: i.online,
cateName: i.cateName,
), ),
), ),
), Positioned(
], left: 0,
); right: 0,
}), bottom: 0,
child: AnimatedOpacity(
opacity: 1,
duration: const Duration(milliseconds: 200),
child: LiveStat(
online: i.online,
cateName: i.cateName,
),
),
),
],
);
}),
),
), ),
LiveContent(liveItem: i) LiveContent(liveItem: i)
], ],
@ -84,7 +90,7 @@ class LiveContent extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Expanded( return Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB(8, 8, 6, 7), padding: const EdgeInsets.fromLTRB(4, 5, 6, 6),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -98,6 +104,7 @@ class LiveContent extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 0.3,
color: i['type'] == 'em' color: i['type'] == 'em'
? Theme.of(context).colorScheme.primary ? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.onSurface, : Theme.of(context).colorScheme.onSurface,

View File

@ -42,9 +42,8 @@ Widget searchUserPanel(BuildContext context, ctr, list) {
children: [ children: [
Text( Text(
i!.uname, i!.uname,
style: TextStyle( style: const TextStyle(
fontSize: fontSize: 14,
Theme.of(context).textTheme.titleMedium!.fontSize,
), ),
), ),
const SizedBox(width: 6), const SizedBox(width: 6),

View File

@ -126,7 +126,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SliverPadding( return SliverPadding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: StyleString.safeSpace, right: StyleString.safeSpace, top: 15), left: StyleString.safeSpace, right: StyleString.safeSpace, top: 13),
sliver: SliverToBoxAdapter( sliver: SliverToBoxAdapter(
child: !widget.loadingStatus || videoItem.isNotEmpty child: !widget.loadingStatus || videoItem.isNotEmpty
? Column( ? Column(
@ -149,12 +149,11 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
!widget.loadingStatus !widget.loadingStatus
? widget.videoDetail!.title ? widget.videoDetail!.title
: videoItem['title'], : videoItem['title'],
style: Theme.of(context) style: const TextStyle(
.textTheme fontSize: 18,
.titleMedium! letterSpacing: 0.3,
.copyWith( fontWeight: FontWeight.w500,
letterSpacing: 0.5, ),
fontWeight: FontWeight.w500),
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
@ -274,7 +273,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
!widget.loadingStatus !widget.loadingStatus
? widget.videoDetail!.owner!.name ? widget.videoDetail!.owner!.name
: videoItem['owner'].name, : videoItem['owner'].name,
style: const TextStyle(fontSize: 12.5), style: const TextStyle(fontSize: 13),
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
Text( Text(

View File

@ -50,8 +50,11 @@ class IntroDetail extends StatelessWidget {
children: [ children: [
Text( Text(
videoDetail!.title, videoDetail!.title,
style: Theme.of(context).textTheme.titleMedium!.copyWith( style: const TextStyle(
letterSpacing: 0.5, fontWeight: FontWeight.w500), fontSize: 18,
letterSpacing: 0.5,
fontWeight: FontWeight.w500,
),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Row( Row(

View File

@ -81,9 +81,7 @@ class MenuRow extends StatelessWidget {
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),
child: Text( child: Text(
text!, text!,
style: TextStyle( style: const TextStyle(fontSize: 13),
fontSize:
Theme.of(context).textTheme.labelMedium?.fontSize),
), ),
), ),
], ],

View File

@ -131,8 +131,18 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
floating: true, floating: true,
delegate: _MySliverPersistentHeaderDelegate( delegate: _MySliverPersistentHeaderDelegate(
child: Container( child: Container(
color: Theme.of(context).colorScheme.background, height: 45,
padding: const EdgeInsets.fromLTRB(12, 6, 10, 6), padding: const EdgeInsets.fromLTRB(12, 0, 6, 0),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
border: Border(
bottom: BorderSide(
color: Theme.of(context)
.colorScheme
.outline
.withOpacity(0.1)),
),
),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -156,9 +166,11 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
child: TextButton.icon( child: TextButton.icon(
onPressed: () => onPressed: () =>
_videoReplyController.queryBySort(), _videoReplyController.queryBySort(),
icon: const Icon(Icons.sort, size: 17), icon: const Icon(Icons.sort, size: 15),
label: Obx(() => Text( label: Obx(() => Text(
_videoReplyController.sortTypeLabel.value)), _videoReplyController.sortTypeLabel.value,
style: const TextStyle(fontSize: 12),
)),
), ),
) )
], ],

View File

@ -108,8 +108,7 @@ class ReplyItem extends StatelessWidget {
replyItem!.member!.vip!['vipStatus'] > 0 replyItem!.member!.vip!['vipStatus'] > 0
? Theme.of(context).colorScheme.primary ? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.outline, : Theme.of(context).colorScheme.outline,
fontSize: fontSize: 13,
Theme.of(context).textTheme.titleSmall!.fontSize,
), ),
), ),
const SizedBox(width: 6), const SizedBox(width: 6),

View File

@ -81,7 +81,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
if (widget.source == 'videoDetail') if (widget.source == 'videoDetail')
Container( Container(
height: 45, height: 45,
padding: const EdgeInsets.only(left: 14, right: 14), padding: const EdgeInsets.only(left: 12, right: 2),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [