mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-15 22:56:15 +08:00
@@ -44,6 +44,7 @@ class ActionItem extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (animation != null) {
|
if (animation != null) {
|
||||||
|
final primary = theme.colorScheme.primary;
|
||||||
child = Stack(
|
child = Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
@@ -53,7 +54,7 @@ class ActionItem extends StatelessWidget {
|
|||||||
builder: (context, child) => CustomPaint(
|
builder: (context, child) => CustomPaint(
|
||||||
size: const Size.square(28),
|
size: const Size.square(28),
|
||||||
painter: _ArcPainter(
|
painter: _ArcPainter(
|
||||||
color: theme.colorScheme.primary,
|
color: primary,
|
||||||
sweepAngle: animation!.value,
|
sweepAngle: animation!.value,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -117,6 +118,10 @@ class _ArcPainter extends CustomPainter {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void paint(Canvas canvas, Size size) {
|
void paint(Canvas canvas, Size size) {
|
||||||
|
if (sweepAngle == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final paint = Paint()
|
final paint = Paint()
|
||||||
..color = color
|
..color = color
|
||||||
..strokeWidth = 2
|
..strokeWidth = 2
|
||||||
|
|||||||
@@ -1952,15 +1952,12 @@ Widget buildViewPointWidget(
|
|||||||
try {
|
try {
|
||||||
double seg = event.localPosition.dx / constraints.maxWidth;
|
double seg = event.localPosition.dx / constraints.maxWidth;
|
||||||
Segment item = plPlayerController.viewPointList
|
Segment item = plPlayerController.viewPointList
|
||||||
.where((item) {
|
.where((item) => item.start >= seg)
|
||||||
return item.start >= seg;
|
|
||||||
})
|
|
||||||
.reduce((a, b) => a.start < b.start ? a : b);
|
.reduce((a, b) => a.start < b.start ? a : b);
|
||||||
if (item.from != null) {
|
if (item.from != null) {
|
||||||
plPlayerController.danmakuController?.clear();
|
plPlayerController
|
||||||
plPlayerController.videoPlayerController?.seek(
|
..danmakuController?.clear()
|
||||||
Duration(seconds: item.from!),
|
..videoPlayerController?.seek(Duration(seconds: item.from!));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
// if (kDebugMode) debugPrint('${item.title},,${item.from}');
|
// if (kDebugMode) debugPrint('${item.title},,${item.from}');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user