NOISSUE fix display of svg icons in instance toolbar

This commit is contained in:
Petr Mrázek 2017-11-14 01:03:32 +01:00
parent 322922e013
commit b000b33661

View File

@ -99,12 +99,7 @@ void LabeledToolButton::resizeEvent(QResizeEvent * event)
void LabeledToolButton::resetIcon() void LabeledToolButton::resetIcon()
{ {
// prevent the label from changing our height auto iconSz = m_icon.actualSize(QSize(160, 80));
auto sizes = m_icon.availableSizes();
if(sizes.count() > 0)
{
//auto maxSz = size();
auto iconSz = sizes[0];
float w = iconSz.width(); float w = iconSz.width();
float h = iconSz.height(); float h = iconSz.height();
float ar = w/h; float ar = w/h;
@ -118,4 +113,3 @@ void LabeledToolButton::resetIcon()
m_label->setMinimumHeight(80); m_label->setMinimumHeight(80);
m_label->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred ); m_label->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
} }
}