mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 12:07:11 +08:00
feat: audio page (#1518)
* feat: audio page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * opt ui Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * impl intro, share, fav Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * tweaks Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * load prev/next Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -361,6 +361,7 @@ class _RenderProgressBar extends RenderBox {
|
||||
_thumbColor = thumbColor,
|
||||
_thumbGlowColor = thumbGlowColor,
|
||||
_thumbGlowRadius = thumbGlowRadius,
|
||||
_paintThumbGlow = thumbGlowRadius > thumbRadius,
|
||||
_thumbCanPaintOutsideBar = thumbCanPaintOutsideBar {
|
||||
_drag = _EagerHorizontalDragGestureRecognizer()
|
||||
..onStart = _onDragStart
|
||||
@@ -621,11 +622,13 @@ class _RenderProgressBar extends RenderBox {
|
||||
}
|
||||
|
||||
/// The length of the radius of the pressed-down effect of the moveable thumb.
|
||||
bool _paintThumbGlow;
|
||||
double get thumbGlowRadius => _thumbGlowRadius;
|
||||
double _thumbGlowRadius;
|
||||
set thumbGlowRadius(double value) {
|
||||
if (_thumbGlowRadius == value) return;
|
||||
_thumbGlowRadius = value;
|
||||
_paintThumbGlow = value > _thumbRadius;
|
||||
markNeedsLayout();
|
||||
}
|
||||
|
||||
@@ -773,7 +776,7 @@ class _RenderProgressBar extends RenderBox {
|
||||
thumbDx = thumbDx.clamp(_thumbRadius, localSize.width - _thumbRadius);
|
||||
}
|
||||
final center = Offset(thumbDx, localSize.height / 2);
|
||||
if (_userIsDraggingThumb) {
|
||||
if (_userIsDraggingThumb && _paintThumbGlow) {
|
||||
final thumbGlowPaint = Paint()..color = thumbGlowColor;
|
||||
canvas.drawCircle(center, thumbGlowRadius, thumbGlowPaint);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user