mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: fontweight
This commit is contained in:
@@ -92,7 +92,7 @@ class LiveContent extends StatelessWidget {
|
||||
Text(
|
||||
liveItem.title as String,
|
||||
textAlign: TextAlign.start,
|
||||
style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w400),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
||||
@@ -46,26 +46,21 @@ class VideoCardH extends StatelessWidget {
|
||||
Semantics(
|
||||
label: Utils.videoItemSemantics(videoItem),
|
||||
excludeSemantics: true,
|
||||
child: GestureDetector(
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
onLongPress: () {
|
||||
if (longPress != null) {
|
||||
longPress!();
|
||||
}
|
||||
},
|
||||
// onLongPressEnd: (details) {
|
||||
// if (longPressEnd != null) {
|
||||
// longPressEnd!();
|
||||
// }
|
||||
// },
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
if (type == 'ketang') {
|
||||
SmartDialog.showToast('课堂视频暂不支持播放');
|
||||
return;
|
||||
}
|
||||
try {
|
||||
final int cid = videoItem.cid ??
|
||||
await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
||||
final int cid =
|
||||
videoItem.cid ?? await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
||||
Get.toNamed('/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {'videoItem': videoItem, 'heroTag': heroTag});
|
||||
} catch (err) {
|
||||
@@ -131,7 +126,7 @@ class VideoCardH extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
if (source == 'normal')
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
@@ -183,7 +178,7 @@ class VideoContent extends StatelessWidget {
|
||||
videoItem.title as String,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: Theme.of(context).textTheme.bodyMedium!.fontSize,
|
||||
height: 1.42,
|
||||
letterSpacing: 0.3,
|
||||
@@ -203,7 +198,7 @@ class VideoContent extends StatelessWidget {
|
||||
TextSpan(
|
||||
text: i['text'] as String,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
@@ -242,7 +237,7 @@ class VideoContent extends StatelessWidget {
|
||||
Expanded(
|
||||
flex: 0,
|
||||
child: Text(
|
||||
"${pubdate} ${showOwner ? videoItem.owner.name : ''}",
|
||||
"$pubdate ${showOwner ? videoItem.owner.name : ''}",
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w400,
|
||||
|
||||
@@ -217,7 +217,7 @@ class VideoContent extends StatelessWidget {
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1.38,
|
||||
)),
|
||||
),
|
||||
|
||||
@@ -159,7 +159,7 @@ class BangumiContent extends StatelessWidget {
|
||||
bangumiItem.title,
|
||||
textAlign: TextAlign.start,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontWeight: FontWeight.w400,
|
||||
letterSpacing: 0.3,
|
||||
),
|
||||
maxLines: 1,
|
||||
|
||||
@@ -102,7 +102,7 @@ class LiveContent extends StatelessWidget {
|
||||
liveItem.title,
|
||||
textAlign: TextAlign.start,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontWeight: FontWeight.w400,
|
||||
letterSpacing: 0.3,
|
||||
),
|
||||
maxLines: 2,
|
||||
|
||||
@@ -103,25 +103,24 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
|
||||
}
|
||||
|
||||
Widget _searchSuggest() {
|
||||
SSearchController ssCtr = _searchController;
|
||||
return Obx(
|
||||
() => ssCtr.searchSuggestList.isNotEmpty &&
|
||||
ssCtr.searchSuggestList.first.term != null &&
|
||||
ssCtr.controller.value.text != ''
|
||||
() => _searchController.searchSuggestList.isNotEmpty &&
|
||||
_searchController.searchSuggestList.first.term != null &&
|
||||
_searchController.controller.value.text != ''
|
||||
? ListView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount: ssCtr.searchSuggestList.length,
|
||||
itemCount: _searchController.searchSuggestList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return InkWell(
|
||||
customBorder: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
onTap: () => ssCtr
|
||||
.onClickKeyword(ssCtr.searchSuggestList[index].term!),
|
||||
onTap: () => _searchController.onClickKeyword(
|
||||
_searchController.searchSuggestList[index].term!),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 20, top: 9, bottom: 9),
|
||||
child: ssCtr.searchSuggestList[index].textRich,
|
||||
child: _searchController.searchSuggestList[index].textRich,
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -152,7 +151,7 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
|
||||
height: 34,
|
||||
child: TextButton.icon(
|
||||
style: ButtonStyle(
|
||||
padding: MaterialStateProperty.all(const EdgeInsets.only(
|
||||
padding: WidgetStateProperty.all(const EdgeInsets.only(
|
||||
left: 10, top: 6, bottom: 6, right: 10)),
|
||||
),
|
||||
onPressed: () => ctr.queryHotSearchList(),
|
||||
|
||||
@@ -126,6 +126,7 @@ class _SearchPanelState extends State<SearchPanel>
|
||||
errMsg: '没有相关数据',
|
||||
fn: () {
|
||||
setState(() {
|
||||
_futureBuilderFuture =
|
||||
_searchPanelController.onSearch();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -29,6 +29,7 @@ class ReplyItem extends StatelessWidget {
|
||||
this.showReplyRow = true,
|
||||
this.replyReply,
|
||||
this.replyType,
|
||||
this.needDivider = true,
|
||||
super.key,
|
||||
});
|
||||
final ReplyItemModel? replyItem;
|
||||
@@ -37,6 +38,7 @@ class ReplyItem extends StatelessWidget {
|
||||
final bool? showReplyRow;
|
||||
final Function? replyReply;
|
||||
final ReplyType? replyType;
|
||||
final bool needDivider;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -66,6 +68,7 @@ class ReplyItem extends StatelessWidget {
|
||||
padding: const EdgeInsets.fromLTRB(12, 14, 8, 5),
|
||||
child: content(context),
|
||||
),
|
||||
if (needDivider)
|
||||
Divider(
|
||||
indent: 55,
|
||||
endIndent: 15,
|
||||
|
||||
@@ -75,7 +75,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
|
||||
return Container(
|
||||
height:
|
||||
widget.source == 'videoDetail' ? Utils.getSheetHeight(context) : null,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
child: Column(
|
||||
children: [
|
||||
if (widget.source == 'videoDetail')
|
||||
@@ -125,6 +125,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
|
||||
},
|
||||
replyType: widget.replyType,
|
||||
replyReply: (replyItem) => replyReply(replyItem),
|
||||
needDivider: false,
|
||||
),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
|
||||
Reference in New Issue
Block a user