diff --git a/examples/boxes/main.cpp b/examples/boxes/main.cpp index a365fa64..60eeddab 100644 --- a/examples/boxes/main.cpp +++ b/examples/boxes/main.cpp @@ -72,6 +72,7 @@ static void addTestRectangle( QskLinearBox* parent ) box->setBorderWidth( 10, 20, 40, 20 ); QskBoxShapeMetrics shape( 50, Qt::RelativeSize ); + shape.setScalingMode( QskBoxShapeMetrics::Elliptic ); shape.setRadius( Qt::BottomRightCorner, 30 ); shape.setRadius( Qt::TopRightCorner, 70 ); diff --git a/src/common/QskBoxShapeMetrics.cpp b/src/common/QskBoxShapeMetrics.cpp index 014bfc8b..d3027aae 100644 --- a/src/common/QskBoxShapeMetrics.cpp +++ b/src/common/QskBoxShapeMetrics.cpp @@ -100,7 +100,7 @@ QskBoxShapeMetrics QskBoxShapeMetrics::toAbsolute( const QSizeF& size ) const no return absoluted; } - if ( m_scalingMode == RoundedRectangle ) + if ( m_scalingMode == Circular ) { for ( int i = 0; i < 4; i++ ) { diff --git a/src/common/QskBoxShapeMetrics.h b/src/common/QskBoxShapeMetrics.h index ad021fba..c9b04c53 100644 --- a/src/common/QskBoxShapeMetrics.h +++ b/src/common/QskBoxShapeMetrics.h @@ -32,8 +32,8 @@ class QSK_EXPORT QskBoxShapeMetrics enum ScalingMode { // How to scale, when translating to Qt::AbsoluteSize - RoundedRectangle, - Ellipse + Circular, + Elliptic }; Q_ENUM( ScalingMode ); @@ -127,7 +127,7 @@ class QSK_EXPORT QskBoxShapeMetrics inline constexpr QskBoxShapeMetrics::QskBoxShapeMetrics() noexcept : m_radii{ { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 } } , m_sizeMode( Qt::AbsoluteSize ) - , m_scalingMode( RoundedRectangle ) + , m_scalingMode( Circular ) { } @@ -142,7 +142,7 @@ inline constexpr QskBoxShapeMetrics::QskBoxShapeMetrics( : m_radii{ { radiusX, radiusY }, { radiusX, radiusY }, { radiusX, radiusY }, { radiusX, radiusY } } , m_sizeMode( sizeMode ) - , m_scalingMode( RoundedRectangle ) + , m_scalingMode( Circular ) { } @@ -151,7 +151,7 @@ inline constexpr QskBoxShapeMetrics::QskBoxShapeMetrics( qreal topLeft, qreal to : m_radii{ { topLeft, topLeft }, { topRight, topRight }, { bottomLeft, bottomLeft }, { bottomRight, bottomRight } } , m_sizeMode( sizeMode ) - , m_scalingMode( RoundedRectangle ) + , m_scalingMode( Circular ) { }