diff options
| author | Alexey Zerkin <alexey.zerkin@qt.io> | 2025-12-05 08:21:08 +0200 |
|---|---|---|
| committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2025-12-06 19:05:27 +0000 |
| commit | 196a81a5ad87fd6824a74173f9b1dafdec33ba65 (patch) | |
| tree | c8b65bfb6a6a21c5a83eb66807a944dadf1e589f /src | |
| parent | d59d7b90f54723f16419fe6cfcbd1c5d6e9b64c3 (diff) | |
Update default values for {Ellipse,Star,Rectangle,RegularPolygon}Shape
Set the same width, height, fillColor, strokeColor and strokeWidth
values for rectangle, star, ellipse and regular polygon shapes
Task-number: QTBUG-142450
Change-Id: I1920d22e80944ee4f220b927b4c1fcbbe2bb077a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Diffstat (limited to 'src')
4 files changed, 13 insertions, 10 deletions
diff --git a/src/quickshapes/designhelpers/qquickellipseshape.cpp b/src/quickshapes/designhelpers/qquickellipseshape.cpp index 484666d15f..5c709d5b1d 100644 --- a/src/quickshapes/designhelpers/qquickellipseshape.cpp +++ b/src/quickshapes/designhelpers/qquickellipseshape.cpp @@ -577,14 +577,15 @@ QQuickEllipseShape::QQuickEllipseShape(QQuickItem *parent) setPreferredRendererType(CurveRenderer); - setWidth(100); - setHeight(100); + setWidth(200); + setHeight(200); d->path = new QQuickShapePath(this); d->path->setParent(this); d->path->setAsynchronous(true); - d->path->setStrokeWidth(4); + d->path->setStrokeWidth(1); d->path->setStrokeColor(QColorConstants::Black); + d->path->setFillColor(QColorConstants::White); d->sp.append(d->path); d->path->setParent(this); diff --git a/src/quickshapes/designhelpers/qquickrectangleshape.cpp b/src/quickshapes/designhelpers/qquickrectangleshape.cpp index ff327f1f41..e28d47bf6c 100644 --- a/src/quickshapes/designhelpers/qquickrectangleshape.cpp +++ b/src/quickshapes/designhelpers/qquickrectangleshape.cpp @@ -427,9 +427,9 @@ QQuickRectangleShape::QQuickRectangleShape(QQuickItem *parent) // Create the ShapePath. d->shapePath = new QQuickShapePath(this); d->shapePath->setObjectName("rectangleShapeShapePath"); - d->shapePath->setStrokeWidth(4); + d->shapePath->setStrokeWidth(1); d->shapePath->setStrokeColor(QColorConstants::Black); - d->shapePath->setFillColor(QColorConstants::Transparent); + d->shapePath->setFillColor(QColorConstants::White); d->shapePath->setJoinStyle(QQuickShapePath::BevelJoin); // Don't make it asynchronous, as it results in brief periods of incorrect rendering. @@ -453,7 +453,7 @@ QQuickRectangleShape::QQuickRectangleShape(QQuickItem *parent) d->extra.value().resourcesList.append(d->shapePath); setWidth(200); - setHeight(150); + setHeight(200); setPreferredRendererType(CurveRenderer); // QQuickShape::componentComplete sets up the connections to each path. diff --git a/src/quickshapes/designhelpers/qquickregularpolygonshape.cpp b/src/quickshapes/designhelpers/qquickregularpolygonshape.cpp index 29d5ba40fa..d52196a43d 100644 --- a/src/quickshapes/designhelpers/qquickregularpolygonshape.cpp +++ b/src/quickshapes/designhelpers/qquickregularpolygonshape.cpp @@ -223,8 +223,9 @@ QQuickRegularPolygonShape::QQuickRegularPolygonShape(QQuickItem *parent) d->path = new QQuickShapePath(this); d->path->setAsynchronous(true); - d->path->setStrokeWidth(4); - d->path->setStrokeColor(QColorConstants::Red); + d->path->setStrokeWidth(1); + d->path->setStrokeColor(QColorConstants::Black); + d->path->setFillColor(QColorConstants::White); d->sp.append(d->path); d->path->setParent(this); diff --git a/src/quickshapes/designhelpers/qquickstarshape.cpp b/src/quickshapes/designhelpers/qquickstarshape.cpp index bd7b7f5e2f..9866036e15 100644 --- a/src/quickshapes/designhelpers/qquickstarshape.cpp +++ b/src/quickshapes/designhelpers/qquickstarshape.cpp @@ -199,8 +199,9 @@ QQuickStarShape::QQuickStarShape(QQuickItem *parent) d->path = new QQuickShapePath(this); d->path->setAsynchronous(true); - d->path->setStrokeWidth(4); - d->path->setStrokeColor(QColorConstants::Red); + d->path->setStrokeWidth(1); + d->path->setStrokeColor(QColorConstants::Black); + d->path->setFillColor(QColorConstants::White); d->sp.append(d->path); d->path->setParent(this); |
