using Circular/Elliptic
This commit is contained in:
parent
d4e746e7c5
commit
776468953d
@ -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 );
|
||||
|
||||
|
@ -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++ )
|
||||
{
|
||||
|
@ -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 )
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user