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:
Uwe Rathmann 2023-02-02 18:44:08 +01:00
parent 5a78a365e3
commit e7c2cd0eba

View File

@ -113,6 +113,7 @@ QskBoxShapeMetrics QskBoxShapeMetrics::toAbsolute( const QSizeF& size ) const no
{
if ( m_aspectRatioMode != Qt::IgnoreAspectRatio )
{
#if 0
if ( ( m_aspectRatioMode == Qt::KeepAspectRatioByExpanding ) &&
( radius.width() >= radius.height() ) )
{
@ -122,8 +123,20 @@ QskBoxShapeMetrics QskBoxShapeMetrics::toAbsolute( const QSizeF& size ) const no
{
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.rheight() = ry;
}