From 973c6c2536641d5e5dce2e4fd780dc91e82a1063 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Thu, 29 Dec 2016 15:41:00 +0200 Subject: [PATCH] restore Double Layout functionality --- app/nowdockview.h | 2 ++ containment/contents/ui/main.qml | 11 +++++++---- .../configuration/LatteDockConfiguration.qml.cmake | 10 ++++------ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/nowdockview.h b/app/nowdockview.h index 6df93990f..bd4c00724 100644 --- a/app/nowdockview.h +++ b/app/nowdockview.h @@ -123,6 +123,7 @@ protected: signals: // void visibilityChanged(); + void addInternalViewSplitter(); void alignmentChanged(); void compositingChanged(); void heightChanged(); @@ -131,6 +132,7 @@ signals: void maxLengthChanged(); void maxThicknessChanged(); void offsetChanged(); + void removeInternalViewSplitter(); void visibilityChanged(); void widthChanged(); diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index d89d0f868..4943f39e7 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -390,6 +390,9 @@ DragDrop.DropArea { onDockChanged: { if (dock) { + dock.onAddInternalViewSplitter.connect(addInternalViewSplitter); + dock.onRemoveInternalViewSplitter.connect(removeInternalViewSplitter); + dock.visibility.onDisableHidingChanged.connect(visibilityManager.slotDisableHidingChanged); dock.visibility.onIsHoveredChanged.connect(visibilityManager.slotIsHoveredChanged); dock.visibility.onMustBeLowered.connect(visibilityManager.slotMustBeLowered); @@ -1066,14 +1069,14 @@ DragDrop.DropArea { x: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isHorizontal && plasmoid.immutable && windowSystem.compositingActive ? - (dock.width/2) - (dock.visibility.maxLength/2): 0 + (dock.width/2) - (dock.maxLength/2): 0 y: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isVertical && plasmoid.immutable && windowSystem.compositingActive ? - (dock.height/2) - (dock.visibility.maxLength/2): 0 + (dock.height/2) - (dock.maxLength/2): 0 width: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isHorizontal && plasmoid.immutable ? - dock.visibility.maxLength : parent.width + dock.maxLength : parent.width height: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isVertical && plasmoid.immutable ? - dock.visibility.maxLength : parent.height + dock.maxLength : parent.height Component.onCompleted: { if(plasmoid.immutable) { diff --git a/shell/contents/configuration/LatteDockConfiguration.qml.cmake b/shell/contents/configuration/LatteDockConfiguration.qml.cmake index 9fc7573cb..e0bb4431a 100644 --- a/shell/contents/configuration/LatteDockConfiguration.qml.cmake +++ b/shell/contents/configuration/LatteDockConfiguration.qml.cmake @@ -19,8 +19,6 @@ PlasmaCore.FrameSvgItem { property bool panelIsVertical: plasmoid.formFactor === PlasmaCore.Types.Vertical signal updateThickness(); - signal removeInternalViewSplitter(); - signal addInternalViewSplitter(); Column{ id:mainColumn @@ -70,21 +68,21 @@ PlasmaCore.FrameSvgItem { centerPosition.checked = false; lastPosition.checked = false; splitTwoPosition.checked = false; - removeInternalViewSplitter(); + dock.removeInternalViewSplitter(); } else if(panelPosition == Latte.Dock.Center){ firstPosition.checked = false; centerPosition.checked = true; lastPosition.checked = false; splitTwoPosition.checked = false; - removeInternalViewSplitter(); + dock.removeInternalViewSplitter(); } else if((panelPosition == Latte.Dock.Right)||(panelPosition == Latte.Dock.Bottom)){ firstPosition.checked = false; centerPosition.checked = false; lastPosition.checked = true; splitTwoPosition.checked = false; - removeInternalViewSplitter(); + dock.removeInternalViewSplitter(); } else if (panelPosition == Latte.Dock.Double){ firstPosition.checked = false; @@ -92,7 +90,7 @@ PlasmaCore.FrameSvgItem { lastPosition.checked = false; splitTwoPosition.checked = true; //add the splitter visual - addInternalViewSplitter(-1); + dock.addInternalViewSplitter(); } }