1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-24 18:03:53 +03:00

reset view::positioner::slideoffset for Dock case

--when the View is changing from Panel to Dock mode,
panel slideoffset should update also
This commit is contained in:
Michail Vourlakos 2021-05-21 17:18:48 +03:00
parent a001eab39c
commit 7f994dfa7e

View File

@ -162,6 +162,13 @@ void Positioner::init()
connect(m_view, &Latte::View::behaveAsPlasmaPanelChanged, this, &Positioner::syncGeometry);
connect(m_view, &Latte::View::maxThicknessChanged, this, &Positioner::syncGeometry);
connect(m_view, &Latte::View::behaveAsPlasmaPanelChanged, this, [&]() {
if (!m_view->behaveAsPlasmaPanel() && m_slideOffset != 0) {
m_slideOffset = 0;
syncGeometry();
}
});
connect(m_view, &Latte::View::offsetChanged, this, [&]() {
updatePosition(m_lastAvailableScreenRect);
});