Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-12 20:56:19 +08:00
parent f6ca007815
commit 510bfe01be
34 changed files with 154 additions and 189 deletions

View File

@@ -176,14 +176,19 @@ class _PgcIntroPageState extends State<PgcIntroPage> {
child: Obx(() {
final isFav = introController.isFav.value;
return iconButton(
context: context,
size: 28,
iconSize: 26,
tooltip: '${isFav ? '取消' : ''}收藏',
onPressed: () => introController.onFavPugv(isFav),
icon: isFav ? Icons.star_rounded : Icons.star_border_rounded,
bgColor: isFav ? null : theme.colorScheme.onInverseSurface,
iconColor: isFav ? null : theme.colorScheme.onSurfaceVariant,
icon: isFav
? const Icon(Icons.star_rounded)
: const Icon(Icons.star_border_rounded),
bgColor: isFav
? theme.colorScheme.secondaryContainer
: theme.colorScheme.onInverseSurface,
iconColor: isFav
? theme.colorScheme.onSecondaryContainer
: theme.colorScheme.onSurfaceVariant,
);
}),
),

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
import 'package:PiliPlus/common/widgets/keep_alive_wrapper.dart';
import 'package:PiliPlus/common/widgets/page/tabs.dart';
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
@@ -70,14 +69,12 @@ class _IntroDetailState extends State<PgcIntroPanel>
},
),
),
iconButton(
context: context,
icon: Icons.clear,
IconButton(
tooltip: '关闭',
icon: const Icon(Icons.close, size: 20),
onPressed: Get.back,
iconSize: 22,
bgColor: Colors.transparent,
),
const SizedBox(width: 12),
const SizedBox(width: 2),
],
),
children: [

View File

@@ -75,19 +75,19 @@ class _MediaListPanelState extends State<MediaListPanel>
title: Text(widget.panelTitle ?? '稍后再看'),
backgroundColor: Colors.transparent,
actions: [
mediumButton(
iconButton(
tooltip: widget.desc ? '顺序播放' : '倒序播放',
icon: widget.desc
? MdiIcons.sortAscending
: MdiIcons.sortDescending,
? const Icon(MdiIcons.sortAscending)
: const Icon(MdiIcons.sortDescending),
onPressed: () {
Get.back();
widget.onReverse();
},
),
mediumButton(
iconButton(
tooltip: '关闭',
icon: Icons.close,
icon: const Icon(Icons.close),
onPressed: Get.back,
),
const SizedBox(width: 14),

View File

@@ -89,7 +89,7 @@ class _HorizontalMemberPageState extends State<HorizontalMemberPage> {
context: context,
onPressed: Get.back,
tooltip: '关闭',
icon: Icons.clear,
icon: const Icon(Icons.clear),
size: 32,
),
const SizedBox(width: 16),

View File

@@ -1,5 +1,4 @@
import 'package:PiliPlus/common/skeleton/video_reply.dart';
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
@@ -72,14 +71,12 @@ class _NoteListPageState extends State<NoteListPage>
),
),
actions: [
iconButton(
context: context,
IconButton(
tooltip: '关闭',
icon: Icons.clear,
icon: const Icon(Icons.close, size: 20),
onPressed: Get.back,
size: 32,
),
const SizedBox(width: 16),
const SizedBox(width: 2),
],
),
),

View File

@@ -76,7 +76,7 @@ class PostPanel extends CommonSlidePage {
context: context,
size: 26,
tooltip: '设为当前',
icon: Icons.my_location,
icon: const Icon(Icons.my_location),
onPressed: () {
updateSegment(
isFirst: isFirst,
@@ -90,7 +90,9 @@ class PostPanel extends CommonSlidePage {
context: context,
size: 26,
tooltip: isFirst ? '视频开头' : '视频结尾',
icon: isFirst ? Icons.first_page : Icons.last_page,
icon: isFirst
? const Icon(Icons.first_page)
: const Icon(Icons.last_page),
onPressed: () {
updateSegment(
isFirst: isFirst,
@@ -104,7 +106,7 @@ class PostPanel extends CommonSlidePage {
context: context,
size: 26,
tooltip: '编辑',
icon: Icons.edit,
icon: const Icon(Icons.edit),
onPressed: () async {
final res = await showDialog<String>(
context: context,
@@ -222,7 +224,7 @@ class _PostPanelState extends State<PostPanel>
);
});
},
icon: Icons.add,
icon: const Icon(Icons.add),
),
const SizedBox(width: 10),
iconButton(
@@ -230,7 +232,7 @@ class _PostPanelState extends State<PostPanel>
context: context,
tooltip: '关闭',
onPressed: Get.back,
icon: Icons.close,
icon: const Icon(Icons.close),
),
const SizedBox(width: 16),
],
@@ -494,7 +496,7 @@ class _PostPanelState extends State<PostPanel>
context: context,
size: 26,
tooltip: '移除',
icon: Icons.clear,
icon: const Icon(Icons.clear),
onPressed: () {
setState(() {
list.removeAt(index);
@@ -509,7 +511,7 @@ class _PostPanelState extends State<PostPanel>
context: context,
size: 26,
tooltip: '预览',
icon: Icons.preview_outlined,
icon: const Icon(Icons.preview_outlined),
onPressed: () async {
final videoCtr = widget.plPlayerController.videoPlayerController;
if (videoCtr != null) {

View File

@@ -334,16 +334,14 @@ class _SendDanmakuPanelState extends CommonTextPubPageState<SendDanmakuPanel> {
() {
final isEmoji = panelType.value == PanelType.emoji;
return iconButton(
context: context,
tooltip: '弹幕样式',
onPressed: () {
updatePanelType(
isEmoji ? PanelType.keyboard : PanelType.emoji,
);
},
bgColor: Colors.transparent,
iconSize: 24,
icon: Icons.text_format,
icon: const Icon(Icons.text_format),
iconColor: isEmoji
? themeData.colorScheme.primary
: themeData.colorScheme.onSurfaceVariant,
@@ -393,30 +391,26 @@ class _SendDanmakuPanelState extends CommonTextPubPageState<SendDanmakuPanel> {
Obx(
() => enablePublish.value
? iconButton(
context: context,
bgColor: Colors.transparent,
iconSize: 22,
iconColor: themeData.colorScheme.onSurfaceVariant,
onPressed: () {
editController.clear();
enablePublish.value = false;
},
icon: Icons.clear,
icon: const Icon(Icons.clear),
)
: const SizedBox.shrink(),
),
const SizedBox(width: 12),
Obx(
() => iconButton(
context: context,
tooltip: '发送',
bgColor: Colors.transparent,
iconSize: 22,
iconColor: enablePublish.value
? themeData.colorScheme.primary
: themeData.colorScheme.outline,
onPressed: enablePublish.value ? onPublish : null,
icon: Icons.send,
icon: const Icon(Icons.send),
),
),
],

View File

@@ -62,7 +62,7 @@ class _ViewPointsPageState extends State<ViewPointsPage>
iconButton(
context: context,
size: 30,
icon: Icons.clear,
icon: const Icon(Icons.clear),
tooltip: '关闭',
onPressed: Get.back,
),

View File

@@ -1373,9 +1373,8 @@ class HeaderControlState extends State<HeaderControl> {
bool isDanmaku = true,
}) {
return iconButton(
context: context,
tooltip: '默认值: $def',
icon: Icons.refresh,
icon: const Icon(Icons.refresh),
onPressed: () {
onPressed();
if (isDanmaku) {
@@ -1384,7 +1383,6 @@ class HeaderControlState extends State<HeaderControl> {
plPlayerController.putSubtitleSettings();
}
},
bgColor: Colors.transparent,
iconColor: theme.colorScheme.outline,
size: 24,
iconSize: 24,
@@ -1943,16 +1941,23 @@ class HeaderControlState extends State<HeaderControl> {
SliverPersistentHeader(
pinned: true,
delegate: CustomSliverPersistentHeaderDelegate(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 14,
vertical: 7,
child: Container(
height: 45,
padding: const EdgeInsets.symmetric(horizontal: 14),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: theme.colorScheme.outline.withValues(
alpha: 0.1,
),
),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text('弹幕列表'),
IconButton(
iconButton(
onPressed: () => setState(() {}),
icon: const Icon(Icons.refresh),
),
@@ -1965,6 +1970,7 @@ class HeaderControlState extends State<HeaderControl> {
?_buildDanmakuList(ctr.staticDanmaku),
?_buildDanmakuList(ctr.scrollDanmaku),
?_buildDanmakuList(ctr.specialDanmaku),
const SliverToBoxAdapter(child: SizedBox(height: 12)),
],
),
),
@@ -1985,12 +1991,15 @@ class HeaderControlState extends State<HeaderControl> {
dense: true,
contentPadding: const EdgeInsets.symmetric(horizontal: 14),
onLongPress: () => Utils.copyText(item.content.text),
title: Text(item.content.text),
title: Text(
item.content.text,
style: const TextStyle(fontSize: 14),
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
Builder(
builder: (context) => IconButton(
builder: (context) => iconButton(
onPressed: () async {
if (await HeaderControl.likeDanmaku(
extra,
@@ -2006,7 +2015,7 @@ class HeaderControlState extends State<HeaderControl> {
),
),
if (item.content.selfSend)
IconButton(
iconButton(
onPressed: () => HeaderControl.deleteDanmaku(
extra.id,
plPlayerController.cid!,
@@ -2014,7 +2023,7 @@ class HeaderControlState extends State<HeaderControl> {
icon: const Icon(Icons.delete_outline),
)
else
IconButton(
iconButton(
onPressed: () => HeaderControl.reportDanmaku(
extra,
context,