mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-21 08:38:37 +00:00
opt: RepaintBoundary (#1840)
* opt: RepaintBoundary * fix [skip ci] * opt time width * opt: video position * update --------- Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
a63ca93762
commit
d7d9655f81
@@ -997,12 +997,15 @@ class _RenderBorderIndicator extends RenderBox {
|
||||
final size = this.size;
|
||||
final canvas = context.canvas;
|
||||
final width = size.width / 2;
|
||||
if (!_isLeft) {
|
||||
canvas.translate(width, 0);
|
||||
}
|
||||
|
||||
BoxBorder.paintNonUniformBorder(
|
||||
canvas,
|
||||
Rect.fromLTRB(0, 0, width, size.height),
|
||||
Rect.fromLTWH(
|
||||
offset.dx + (_isLeft ? 0 : width),
|
||||
offset.dy,
|
||||
width,
|
||||
size.height,
|
||||
),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: _isLeft ? _radius : .zero,
|
||||
topRight: _isLeft ? .zero : _radius,
|
||||
@@ -1012,9 +1015,6 @@ class _RenderBorderIndicator extends RenderBox {
|
||||
color: Colors.white38,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool get isRepaintBoundary => true;
|
||||
}
|
||||
|
||||
class LiveDanmaku extends StatefulWidget {
|
||||
|
||||
@@ -66,22 +66,25 @@ class ActionItem extends StatelessWidget {
|
||||
child = SizedBox.square(dimension: 28, child: child);
|
||||
}
|
||||
|
||||
child = InkWell(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||
onTap: _isThumbsUp ? null : onTap,
|
||||
onLongPress: _isThumbsUp ? null : onLongPress,
|
||||
onSecondaryTap: PlatformUtils.isMobile || _isThumbsUp
|
||||
? null
|
||||
: onLongPress,
|
||||
onTapDown: _isThumbsUp ? (_) => onStartTriple!() : null,
|
||||
onTapUp: _isThumbsUp ? (_) => onCancelTriple!(true) : null,
|
||||
onTapCancel: _isThumbsUp ? onCancelTriple : null,
|
||||
child: expand
|
||||
? Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [child, _buildText(theme)],
|
||||
)
|
||||
: child,
|
||||
child = Material(
|
||||
type: .transparency,
|
||||
child: InkWell(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||
onTap: _isThumbsUp ? null : onTap,
|
||||
onLongPress: _isThumbsUp ? null : onLongPress,
|
||||
onSecondaryTap: PlatformUtils.isMobile || _isThumbsUp
|
||||
? null
|
||||
: onLongPress,
|
||||
onTapDown: _isThumbsUp ? (_) => onStartTriple!() : null,
|
||||
onTapUp: _isThumbsUp ? (_) => onCancelTriple!(true) : null,
|
||||
onTapCancel: _isThumbsUp ? onCancelTriple : null,
|
||||
child: expand
|
||||
? Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [child, _buildText(theme)],
|
||||
)
|
||||
: child,
|
||||
),
|
||||
);
|
||||
return expand ? Expanded(child: child) : child;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user