QskBoxShapeMetrics::toAbsolute reverted for the moment as the scaling of the buttons
is broken now. Only a temporary workaround as the other implementation was actually correct
This commit is contained in:
parent
5a78a365e3
commit
e7c2cd0eba
|
@ -113,6 +113,7 @@ QskBoxShapeMetrics QskBoxShapeMetrics::toAbsolute( const QSizeF& size ) const no
|
||||||
{
|
{
|
||||||
if ( m_aspectRatioMode != Qt::IgnoreAspectRatio )
|
if ( m_aspectRatioMode != Qt::IgnoreAspectRatio )
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if ( ( m_aspectRatioMode == Qt::KeepAspectRatioByExpanding ) &&
|
if ( ( m_aspectRatioMode == Qt::KeepAspectRatioByExpanding ) &&
|
||||||
( radius.width() >= radius.height() ) )
|
( radius.width() >= radius.height() ) )
|
||||||
{
|
{
|
||||||
|
@ -122,8 +123,20 @@ QskBoxShapeMetrics QskBoxShapeMetrics::toAbsolute( const QSizeF& size ) const no
|
||||||
{
|
{
|
||||||
ry = rx * radius.height() / radius.width();
|
ry = rx * radius.height() / radius.width();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
if ( m_aspectRatioMode == Qt::KeepAspectRatio )
|
||||||
|
{
|
||||||
|
rx = std::min( rx, ry );
|
||||||
|
ry = std::min( rx, ry );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rx = std::max( rx, ry );
|
||||||
|
ry = std::max( rx, ry );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
radius.rwidth() = rx;
|
radius.rwidth() = rx;
|
||||||
radius.rheight() = ry;
|
radius.rheight() = ry;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue