mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -96,6 +96,7 @@ class ProgressBar extends LeafRenderObjectWidget {
|
|||||||
this.timeLabelType,
|
this.timeLabelType,
|
||||||
this.timeLabelTextStyle,
|
this.timeLabelTextStyle,
|
||||||
this.timeLabelPadding = 0.0,
|
this.timeLabelPadding = 0.0,
|
||||||
|
this.textScaleFactor = 1.0,
|
||||||
});
|
});
|
||||||
|
|
||||||
/// The elapsed playing time of the media.
|
/// The elapsed playing time of the media.
|
||||||
@@ -252,12 +253,13 @@ class ProgressBar extends LeafRenderObjectWidget {
|
|||||||
/// the progress bar and a negative number will move them closer.
|
/// the progress bar and a negative number will move them closer.
|
||||||
final double timeLabelPadding;
|
final double timeLabelPadding;
|
||||||
|
|
||||||
|
final double textScaleFactor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
RenderObject createRenderObject(BuildContext context) {
|
RenderObject createRenderObject(BuildContext context) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
final primaryColor = theme.colorScheme.primary;
|
final primaryColor = theme.colorScheme.primary;
|
||||||
final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyLarge;
|
final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyLarge;
|
||||||
final textScaleFactor = MediaQuery.textScalerOf(context).scale(1);
|
|
||||||
return _RenderProgressBar(
|
return _RenderProgressBar(
|
||||||
progress: progress,
|
progress: progress,
|
||||||
total: total,
|
total: total,
|
||||||
@@ -291,7 +293,6 @@ class ProgressBar extends LeafRenderObjectWidget {
|
|||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
final primaryColor = theme.colorScheme.primary;
|
final primaryColor = theme.colorScheme.primary;
|
||||||
final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyLarge;
|
final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyLarge;
|
||||||
final textScaleFactor = MediaQuery.textScalerOf(context).scale(1);
|
|
||||||
(renderObject as _RenderProgressBar)
|
(renderObject as _RenderProgressBar)
|
||||||
..total = total
|
..total = total
|
||||||
..progress = progress
|
..progress = progress
|
||||||
|
|||||||
Reference in New Issue
Block a user