Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-21 14:26:29 +08:00
parent 0b1f6c4d0e
commit 7a65b777c9
21 changed files with 486 additions and 507 deletions

View File

@@ -662,8 +662,7 @@ class RenderProgressBar extends RenderBox implements MouseTrackerAnnotation {
Size computeDryLayout(BoxConstraints constraints) {
final desiredWidth = constraints.maxWidth;
final desiredHeight = _heightWhenNoLabels();
final desiredSize = Size(desiredWidth, desiredHeight);
return constraints.constrain(desiredSize);
return constraints.constrainDimensions(desiredWidth, desiredHeight);
}
double _heightWhenNoLabels() {

View File

@@ -185,7 +185,7 @@ class RenderViewPointProgressBar
@override
void performLayout() {
size = constraints.constrain(Size(constraints.maxWidth, _barHeight));
size = constraints.constrainDimensions(constraints.maxWidth, _barHeight);
}
static const double _barHeight = 15.0;
@@ -334,7 +334,6 @@ class BaseRenderProgressBar<T extends BaseSegment> extends RenderBox {
BaseRenderProgressBar({
required double height,
required List<T> segments,
ValueSetter<int>? onSeek,
}) : _height = height,
_segments = segments;
@@ -356,7 +355,7 @@ class BaseRenderProgressBar<T extends BaseSegment> extends RenderBox {
@override
void performLayout() {
size = constraints.constrain(Size(constraints.maxWidth, height));
size = constraints.constrainDimensions(constraints.maxWidth, height);
}
@override

View File

@@ -96,7 +96,7 @@ class RenderProgressBar extends RenderBox {
}
double _radius;
double get borderRadius => _radius;
double get radius => _radius;
set radius(double value) {
if (_radius == value) return;
_radius = value;
@@ -113,7 +113,7 @@ class RenderProgressBar extends RenderBox {
@override
void performLayout() {
size = constraints.constrain(Size(constraints.maxWidth, _radius));
size = constraints.constrainDimensions(constraints.maxWidth, _radius);
}
@override