Consistency change

Deal with length like we deal with thickness
This commit is contained in:
Aleix Pol 2013-12-18 01:08:58 +01:00
parent de868b6047
commit d988b6f5da

View File

@ -188,15 +188,9 @@ void PanelView::setLength(int value)
return;
}
if (formFactor() == Plasma::Types::Vertical) {
setHeight(value);
} else {
setWidth(value);
}
config().writeEntry("length", value);
emit lengthChanged();
m_corona->requestApplicationConfigSync();
m_strutsTimer->start(STRUTSTIMERDELAY);
positionPanel();
}
int PanelView::maximumLength() const
@ -291,6 +285,7 @@ void PanelView::positionPanel()
QScreen *s = screen();
const int oldThickness = thickness();
const int oldLength = length();
switch (containment()->location()) {
case Plasma::Types::TopEdge:
@ -369,6 +364,14 @@ void PanelView::positionPanel()
}
emit thicknessChanged();
}
if (length() != oldLength) {
if (formFactor() == Plasma::Types::Vertical) {
setHeight(length());
} else {
setWidth(length());
}
emit length();
}
}
void PanelView::restore()