|
|
@ -153,6 +153,10 @@ void Positioner::init()
|
|
|
|
syncGeometry();
|
|
|
|
syncGeometry();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(m_view, &Latte::View::editThicknessChanged, this, [&]() {
|
|
|
|
|
|
|
|
updateCanvasGeometry(m_lastAvailableScreenRect);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
connect(m_view, &Latte::View::normalThicknessChanged, this, [&]() {
|
|
|
|
connect(m_view, &Latte::View::normalThicknessChanged, this, [&]() {
|
|
|
|
if (m_view->behaveAsPlasmaPanel()) {
|
|
|
|
if (m_view->behaveAsPlasmaPanel()) {
|
|
|
|
syncGeometry();
|
|
|
|
syncGeometry();
|
|
|
@ -479,11 +483,15 @@ void Positioner::immediateSyncGeometry()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
validateTopBottomBorders(availableScreenRect, freeRegion);
|
|
|
|
validateTopBottomBorders(availableScreenRect, freeRegion);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_lastAvailableScreenRegion = freeRegion;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
m_view->effects()->setForceTopBorder(false);
|
|
|
|
m_view->effects()->setForceTopBorder(false);
|
|
|
|
m_view->effects()->setForceBottomBorder(false);
|
|
|
|
m_view->effects()->setForceBottomBorder(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_lastAvailableScreenRect = availableScreenRect;
|
|
|
|
|
|
|
|
|
|
|
|
m_view->effects()->updateEnabledBorders();
|
|
|
|
m_view->effects()->updateEnabledBorders();
|
|
|
|
|
|
|
|
|
|
|
|
resizeWindow(availableScreenRect);
|
|
|
|
resizeWindow(availableScreenRect);
|
|
|
@ -593,6 +601,10 @@ void Positioner::validateTopBottomBorders(QRect availableScreenRect, QRegion ava
|
|
|
|
|
|
|
|
|
|
|
|
void Positioner::updateCanvasGeometry(QRect availableScreenRect)
|
|
|
|
void Positioner::updateCanvasGeometry(QRect availableScreenRect)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (availableScreenRect.isEmpty()) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QRect canvas;
|
|
|
|
QRect canvas;
|
|
|
|
QRect screenGeometry{m_view->screen()->geometry()};
|
|
|
|
QRect screenGeometry{m_view->screen()->geometry()};
|
|
|
|
int thickness{m_view->editThickness()};
|
|
|
|
int thickness{m_view->editThickness()};
|
|
|
|