resize the panel in one single go

This commit is contained in:
Marco Martin 2014-02-13 15:48:20 +01:00
parent 59dbfeeab6
commit 4aa3360495

View File

@ -374,20 +374,13 @@ void PanelView::positionPanel()
m_strutsTimer->stop();
m_strutsTimer->start(STRUTSTIMERDELAY);
if (thickness() != oldThickness) {
if (formFactor() == Plasma::Types::Vertical) {
setWidth(thickness());
} else {
setHeight(thickness());
}
if (formFactor() == Plasma::Types::Vertical) {
resize(thickness(), length());
emit thicknessChanged();
emit length();
} else {
resize(length(), thickness());
emit thicknessChanged();
}
if (length() != oldLength) {
if (formFactor() == Plasma::Types::Vertical) {
setHeight(length());
} else {
setWidth(length());
}
emit length();
}
}