restore previous behavior

--fixed local dock geometry updating in editing
mode. Now in runtime the struts are updating
correctly
pull/1/head
Michail Vourlakos 8 years ago
parent 3f2847b467
commit abf84a1d1e

@ -258,7 +258,7 @@ inline void VisibilityManagerPrivate::setDockRect(const QRect &dockRect)
this->dockRect = dockRect;
if ((mode == Dock::AlwaysVisible) && (!view->containment()->isUserConfiguring())) {
if (mode == Dock::AlwaysVisible) {
wm->setDockStruts(this->dockRect, view->containment()->location());
}
}

@ -247,8 +247,26 @@ Item{
dock.maskArea = newMaskArea;
if(normalState && !dock.visibility.isHidden){
//console.log("update mask area:"+newMaskArea);
if(normalState || plasmoid.userConfiguring){
//the shadows size must be removed from the maskArea
//before updating the localDockGeometry
if (plasmoid.userConfiguring) {
if (plasmoid.formFactor === PlasmaCore.Types.Vertical) {
newMaskArea.width = newMaskArea.width - editModeVisual.shadowSize;
} else {
newMaskArea.height = newMaskArea.height - editModeVisual.shadowSize;
}
if (plasmoid.location === PlasmaCore.Types.BottomEdge) {
newMaskArea.y = newMaskArea.y + editModeVisual.shadowSize;
} else if (plasmoid.location === PlasmaCore.Types.RightEdge) {
newMaskArea.x = newMaskArea.x + editModeVisual.shadowSize;
}
}
dock.setLocalDockGeometry(newMaskArea);
// console.log("update dock geometry:"+newMaskArea);
}
}
}

Loading…
Cancel
Save