--- plasma-workspace-4.6.3/badplasma/desktop/shell/panelview.cpp 2011-04-01 03:52:43.000000000 -0700 +++ plasma-workspace-4.6.3/plasma/desktop/shell/panelview.cpp 2011-05-07 02:22:57.059399728 -0700 @@ -828,8 +828,8 @@ void PanelView::pinchContainment(const Q lastSize.writeEntry("max", m_lastMax); configNeedsSaving(); - const QString last = horizontal ? "Horizontal" + QString::number(sw) : - "Vertical" + QString::number(sh); + QString last = (horizontal ? "Horizontal" : "Vertical") + + QString::number(horizontal ? sw : sh); if (sizes.hasGroup(last)) { KConfigGroup thisSize(&sizes, last); @@ -850,7 +850,6 @@ void PanelView::pinchContainment(const Q (horizontal ? c->geometry().width() : c->geometry().height()) >= m_lastSeenSize) { // we are moving from a smaller space where we are 100% to a larger one - kDebug() << "we are moving from a smaller space where we are 100% to a larger one"; c->setMinimumSize(0, 0); c->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); @@ -867,35 +866,6 @@ void PanelView::pinchContainment(const Q c->setMinimumSize(min.width(), sh); } } - } else if (m_lastSeenSize > (horizontal ? sw : sh) && - (m_offset + (horizontal ? c->geometry().width() : - c->geometry().height())) > (horizontal ? sw : sh)) { - kDebug() << "we are moving from a bigger space to a smaller one where the panel won't fit!!"; - if ((horizontal ? c->geometry().width() : - c->geometry().height()) > (horizontal ? sw : sh)) { - kDebug() << "panel is larger than screen, adjusting panel size"; - setOffset(0); - c->setMinimumSize(0, 0); - c->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); - - if (horizontal) { - c->setMaximumSize(sw, max.height()); - c->resize(sw, c->geometry().height()); - if (min.width() == max.width()) { - c->setMinimumSize(sw, min.height()); - } - } else { - c->setMaximumSize(max.width(), sh); - c->resize(c->geometry().width(), sh); - if (min.height() == max.height()) { - c->setMinimumSize(min.width(), sh); - } - } - } else { - kDebug() << "reducing offset so the panel fits in screen"; - setOffset((horizontal ? sw : sh) - - (horizontal ? c->geometry().width() : c->geometry().height())); - } } }