Merge branch 'scratch'

v0.6
Michail Vourlakos 8 years ago
commit 890fe896b0

@ -24,12 +24,11 @@
</entry>
<entry name="panelVisibility" type="Enum">
<choices>
<choice name="BelowActive"/>
<choice name="BelowMaximized"/>
<choice name="LetWindowsCover"/>
<choice name="WindowsGoBelow"/>
<choice name="AutoHide"/>
<choice name="AlwaysVisible"/>
<choice name="AutoHide"/>
<choice name="DodgeActive"/>
<choice name="DodgeMaximized"/>
<choice name="DodgeAllWindows"/>
</choices>
<default>0</default>
</entry>

@ -26,7 +26,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kquickcontrolsaddons 2.0
import org.kde.latte.dock 0.1 as LatteDock
import org.kde.latte.dock 0.1 as Latte
Item{
id:barLine
@ -43,8 +43,8 @@ Item{
width: root.isHorizontal ? panelWidth : smallSize
height: root.isVertical ? panelHeight : smallSize
property int spacing: (root.panelAlignment === LatteDock.Types.Center
|| plasmoid.configuration.panelPosition === LatteDock.Types.Double) ?
property int spacing: (root.panelAlignment === Latte.Dock.Center
|| plasmoid.configuration.panelPosition === Latte.Dock.Double) ?
root.panelEdgeSpacing : root.panelEdgeSpacing/2
property int smallSize: Math.max(3.7*root.statesLineSize, 16)
@ -133,7 +133,7 @@ Item{
///Left
State {
name: "leftCenter"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteDock.Types.Center)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Center)
AnchorChanges {
target: barLine
@ -151,7 +151,7 @@ Item{
///Left
State {
name: "leftTop"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteDock.Types.Top)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Top)
AnchorChanges {
target: barLine
@ -169,7 +169,7 @@ Item{
///Left
State {
name: "leftBottom"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteDock.Types.Bottom)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Bottom)
AnchorChanges {
target: barLine
@ -186,7 +186,7 @@ Item{
},
State {
name: "leftDouble"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: barLine
@ -204,7 +204,7 @@ Item{
///Right
State {
name: "rightCenter"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteDock.Types.Center)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Center)
AnchorChanges {
target: barLine
@ -221,7 +221,7 @@ Item{
},
State {
name: "rightTop"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteDock.Types.Top)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Top)
AnchorChanges {
target: barLine
@ -238,7 +238,7 @@ Item{
},
State {
name: "rightBottom"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteDock.Types.Bottom)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Bottom)
AnchorChanges {
target: barLine
@ -255,7 +255,7 @@ Item{
},
State {
name: "rightDouble"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: barLine
@ -273,7 +273,7 @@ Item{
///Bottom
State {
name: "bottomCenter"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteDock.Types.Center)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Center)
AnchorChanges {
target: barLine
@ -290,7 +290,7 @@ Item{
},
State {
name: "bottomLeft"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteDock.Types.Left)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Left)
AnchorChanges {
target: barLine
@ -307,7 +307,7 @@ Item{
},
State {
name: "bottomRight"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteDock.Types.Right)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Right)
AnchorChanges {
target: barLine
@ -324,7 +324,7 @@ Item{
},
State {
name: "bottomDouble"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: barLine
@ -342,7 +342,7 @@ Item{
///Top
State {
name: "topCenter"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteDock.Types.Center)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Center)
AnchorChanges {
target: barLine
@ -359,7 +359,7 @@ Item{
},
State {
name: "topLeft"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteDock.Types.Left)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Left)
AnchorChanges {
target: barLine
@ -376,7 +376,7 @@ Item{
},
State {
name: "topRight"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteDock.Types.Right)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Right)
AnchorChanges {
target: barLine
@ -393,7 +393,7 @@ Item{
},
State {
name: "topDouble"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: barLine

@ -6,7 +6,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.taskmanager 0.1 as TaskManager
import org.kde.latte.dock 0.1 as LatteDock
import org.kde.latte.dock 0.1 as Latte
Item{
id: manager
@ -90,7 +90,7 @@ Item{
function slotIsHoveredChanged() {
if(window.isHovered) {
//stop parent window timer for auto hiding
if ((window.visibility.panelVisibility === LatteDock.Types.AutoHide)|| window.visibility.isDockWindowType) {
if ((window.visibility.panelVisibility === Latte.Dock.AutoHide)|| window.visibility.isDockWindowType) {
if(hideMagicWindowInAutoHide.forcedDisableHiding) {
hideMagicWindowInAutoHide.forcedDisableHiding = false;
window.visibility.disableHiding = false;
@ -112,7 +112,7 @@ Item{
function slotMustBeRaised() {
if (window) {
if ((window.visibility.panelVisibility === LatteDock.Types.AutoHide) || window.visibility.isDockWindowType) {
if ((window.visibility.panelVisibility === Latte.Dock.AutoHide) || window.visibility.isDockWindowType) {
slidingAnimationAutoHiddenIn.init();
} else {
slidingAnimation.init(true,false);
@ -126,7 +126,7 @@ Item{
function slotMustBeLowered() {
if (window) {
if ((window.visibility.panelVisibility === LatteDock.Types.AutoHide) || window.visibility.isDockWindowType ) {
if ((window.visibility.panelVisibility === Latte.Dock.AutoHide) || window.visibility.isDockWindowType ) {
slidingAnimationAutoHiddenOut.init();
} else {
slidingAnimation.init(false,false);
@ -135,7 +135,7 @@ Item{
}
function slotPanelVisibilityChanged() {
if (window.visibility.panelVisibility !== LatteDock.Types.AutoHide) {
if (window.visibility.panelVisibility !== Latte.Dock.AutoHide) {
window.visibility.isAutoHidden = false;
}
}
@ -168,9 +168,9 @@ Item{
if (normalState && plasmoid.immutable) {
//count panel length
if(root.isHorizontal) {
tempLength = plasmoid.configuration.panelPosition === LatteDock.Types.Double ? layoutsContainer.width + 0.5*space : mainLayout.width + space;
tempLength = plasmoid.configuration.panelPosition === Latte.Dock.Double ? layoutsContainer.width + 0.5*space : mainLayout.width + space;
} else {
tempLength = plasmoid.configuration.panelPosition === LatteDock.Types.Double ? layoutsContainer.height + 0.5*space : mainLayout.height + space;
tempLength = plasmoid.configuration.panelPosition === Latte.Dock.Double ? layoutsContainer.height + 0.5*space : mainLayout.height + space;
}
tempThickness = thicknessNormalOriginal;
@ -179,7 +179,7 @@ Item{
tempThickness = thicknessMidOriginal;
}
if (window.visibility.isAutoHidden && ((window.visibility.panelVisibility === LatteDock.Types.AutoHide) || window.visibility.isDockWindowType)) {
if (window.visibility.isAutoHidden && ((window.visibility.panelVisibility === Latte.Dock.AutoHide) || window.visibility.isDockWindowType)) {
tempThickness = thicknessAutoHidden;
}
@ -191,13 +191,13 @@ Item{
localY = 0;
}
if (plasmoid.configuration.panelPosition === LatteDock.Types.Double) {
if (plasmoid.configuration.panelPosition === Latte.Dock.Double) {
localX = (window.width/2) - (layoutsContainer.width/2) - 0.25*space;
} else if (root.panelAlignment === LatteDock.Types.Left) {
} else if (root.panelAlignment === Latte.Dock.Left) {
localX = 0;
} else if (root.panelAlignment === LatteDock.Types.Center) {
} else if (root.panelAlignment === Latte.Dock.Center) {
localX = (window.width/2) - (mainLayout.width/2) - (space/2);
} else if (root.panelAlignment === LatteDock.Types.Right) {
} else if (root.panelAlignment === Latte.Dock.Right) {
localX = window.width - mainLayout.width - (space/2);
}
} else if ((plasmoid.location === PlasmaCore.Types.LeftEdge) || (plasmoid.location === PlasmaCore.Types.RightEdge)){
@ -207,13 +207,13 @@ Item{
localX = window.width - tempThickness;
}
if (plasmoid.configuration.panelPosition === LatteDock.Types.Double) {
if (plasmoid.configuration.panelPosition === Latte.Dock.Double) {
localY = (window.height/2) - (layoutsContainer.height/2) - 0.25*space;
} else if (root.panelAlignment === LatteDock.Types.Top) {
} else if (root.panelAlignment === Latte.Dock.Top) {
localY = 0;
} else if (root.panelAlignment === LatteDock.Types.Center) {
} else if (root.panelAlignment === Latte.Dock.Center) {
localY = (window.height/2) - (mainLayout.height/2) - (space/2);
} else if (root.panelAlignment === LatteDock.Types.Bottom) {
} else if (root.panelAlignment === Latte.Dock.Bottom) {
localY = window.height - mainLayout.height - (space/2);
}
}
@ -439,7 +439,7 @@ Item{
interval: manager.inStartup ? 1000 : 500
onTriggered: {
layoutsContainer.opacity = 1;
if ((window.visibility.panelVisibility !== LatteDock.Types.AutoHide) && !window.visibility.isDockWindowType) {
if ((window.visibility.panelVisibility !== Latte.Dock.AutoHide) && !window.visibility.isDockWindowType) {
slidingAnimation.init(true,false);
} else {
slidingAnimationAutoHiddenIn.init();

@ -26,7 +26,7 @@ import org.kde.kquickcontrolsaddons 2.0
import org.kde.draganddrop 2.0 as DragDrop
import org.kde.plasma.plasmoid 2.0
import org.kde.latte.dock 0.1 as LatteDock
import org.kde.latte.dock 0.1 as Latte
import "LayoutManager.js" as LayoutManager
@ -74,11 +74,11 @@ DragDrop.DropArea {
property int themePanelSize: plasmoid.configuration.panelSize
///FIXME: <delete> I can't remember why this is needed, maybe for the anchorings!!! In order for the Double Layout to not mess the anchorings...
property int mainLayoutPosition: !plasmoid.immutable ? LatteDock.Types.Center : (root.isVertical ? LatteDock.Types.Top : LatteDock.Types.Left)
property int mainLayoutPosition: !plasmoid.immutable ? Latte.Dock.Center : (root.isVertical ? Latte.Dock.Top : Latte.Dock.Left)
///FIXME: <delete>
//property int panelAlignment: plasmoid.configuration.panelPosition !== LatteDock.Types.Double ? plasmoid.configuration.panelPosition : mainLayoutPosition
//property int panelAlignment: plasmoid.configuration.panelPosition !== Latte.Dock.Double ? plasmoid.configuration.panelPosition : mainLayoutPosition
property int panelAlignment: plasmoid.immutable ? plasmoid.configuration.panelPosition : LatteDock.Types.Center
property int panelAlignment: plasmoid.immutable ? plasmoid.configuration.panelPosition : Latte.Dock.Center
// property int panelAlignment: plasmoid.configuration.panelPosition
@ -107,12 +107,12 @@ DragDrop.DropArea {
///END properties from nowDock
/* Layout.preferredWidth: plasmoid.immutable ?
(plasmoid.configuration.panelPosition === LatteDock.Types.Double ?
(plasmoid.configuration.panelPosition === Latte.Dock.Double ?
layoutsContainer.width + 0.5*iconMargin : mainLayout.width + iconMargin) :
Screen.width //on unlocked state use the maximum
Layout.preferredHeight: plasmoid.immutable ?
(plasmoid.configuration.panelPosition === LatteDock.Types.Double ?
(plasmoid.configuration.panelPosition === Latte.Dock.Double ?
layoutsContainer.height + 0.5*iconMargin : mainLayout.height + iconMargin) :
Screen.height //on unlocked state use the maximum*/
@ -165,7 +165,7 @@ DragDrop.DropArea {
///Left Edge
State {
name: "leftCenter"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteDock.Types.Center)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Center)
AnchorChanges {
target: mainLayout
@ -178,7 +178,7 @@ DragDrop.DropArea {
},
State {
name: "leftTop"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteDock.Types.Top)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Top)
AnchorChanges {
target: mainLayout
@ -191,7 +191,7 @@ DragDrop.DropArea {
},
State {
name: "leftBottom"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteDock.Types.Bottom)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Bottom)
AnchorChanges {
target: mainLayout
@ -204,7 +204,7 @@ DragDrop.DropArea {
},
State {
name: "leftDouble"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: mainLayout
@ -218,7 +218,7 @@ DragDrop.DropArea {
///Right Edge
State {
name: "rightCenter"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteDock.Types.Center)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Center)
AnchorChanges {
target: mainLayout
@ -231,7 +231,7 @@ DragDrop.DropArea {
},
State {
name: "rightTop"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteDock.Types.Top)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Top)
AnchorChanges {
target: mainLayout
@ -244,7 +244,7 @@ DragDrop.DropArea {
},
State {
name: "rightBottom"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteDock.Types.Bottom)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Bottom)
AnchorChanges {
target: mainLayout
@ -257,7 +257,7 @@ DragDrop.DropArea {
},
State {
name: "rightDouble"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: mainLayout
@ -271,7 +271,7 @@ DragDrop.DropArea {
///Bottom Edge
State {
name: "bottomCenter"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteDock.Types.Center)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Center)
AnchorChanges {
target: mainLayout
@ -284,7 +284,7 @@ DragDrop.DropArea {
},
State {
name: "bottomLeft"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteDock.Types.Left)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Left)
AnchorChanges {
target: mainLayout
@ -297,7 +297,7 @@ DragDrop.DropArea {
},
State {
name: "bottomRight"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteDock.Types.Right)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Right)
AnchorChanges {
target: mainLayout
@ -310,7 +310,7 @@ DragDrop.DropArea {
},
State {
name: "bottomDouble"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: mainLayout
@ -324,7 +324,7 @@ DragDrop.DropArea {
///Top Edge
State {
name: "topCenter"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteDock.Types.Center)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Center)
AnchorChanges {
target: mainLayout
@ -337,7 +337,7 @@ DragDrop.DropArea {
},
State {
name: "topLeft"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteDock.Types.Left)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Left)
AnchorChanges {
target: mainLayout
@ -350,7 +350,7 @@ DragDrop.DropArea {
},
State {
name: "topRight"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteDock.Types.Right)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Right)
AnchorChanges {
target: mainLayout
@ -363,7 +363,7 @@ DragDrop.DropArea {
},
State {
name: "topDouble"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: mainLayout
@ -552,10 +552,10 @@ DragDrop.DropArea {
///to add applets
if (plasmoid.immutable) {
if(root.isHorizontal) {
root.Layout.preferredWidth = (plasmoid.configuration.panelPosition === LatteDock.Types.Double ?
root.Layout.preferredWidth = (plasmoid.configuration.panelPosition === Latte.Dock.Double ?
layoutsContainer.width + 0.5*iconMargin : mainLayout.width + iconMargin);
} else {
root.Layout.preferredHeight = (plasmoid.configuration.panelPosition === LatteDock.Types.Double ?
root.Layout.preferredHeight = (plasmoid.configuration.panelPosition === Latte.Dock.Double ?
layoutsContainer.height + 0.5*iconMargin : mainLayout.height + iconMargin);
}
} else {
@ -864,10 +864,10 @@ DragDrop.DropArea {
// console.log("------Entered check-----");
if (root.isVertical) {
layoutLength = (plasmoid.configuration.panelPosition === LatteDock.Types.Double) ?
layoutLength = (plasmoid.configuration.panelPosition === Latte.Dock.Double) ?
mainLayout.height+secondLayout.height : mainLayout.height
} else {
layoutLength = (plasmoid.configuration.panelPosition === LatteDock.Types.Double) ?
layoutLength = (plasmoid.configuration.panelPosition === Latte.Dock.Double) ?
mainLayout.width+secondLayout.width : mainLayout.width
}
@ -951,7 +951,7 @@ DragDrop.DropArea {
////BEGIN interfaces
LatteDock.WindowSystem {
Latte.WindowSystem {
id:windowSystem
}
@ -1018,7 +1018,7 @@ DragDrop.DropArea {
onExited: {
if (plasmoid.immutable && magicWin && !magicWin.isHovered
&& ((magicWin.panelVisibility === LatteDock.Types.AutoHide) || magicWin.isDockWindowType) ) {
&& ((magicWin.panelVisibility === Latte.Dock.AutoHide) || magicWin.isDockWindowType) ) {
hideMagicWindowInAutoHide.start();
}
}
@ -1029,7 +1029,7 @@ DragDrop.DropArea {
function showWindow() {
if (plasmoid.immutable && magicWin
&& ((magicWin.panelVisibility === LatteDock.Types.AutoHide) || magicWin.isDockWindowType) ) {
&& ((magicWin.panelVisibility === Latte.Dock.AutoHide) || magicWin.isDockWindowType) ) {
magicWin.updateMaskArea();
magicWin.mustBeRaised();
} else {
@ -1049,21 +1049,21 @@ DragDrop.DropArea {
signal updateScale(int delegateIndex, real newScale, real step)
// property bool parentMagicWinFlag: plasmoid.immutable && magicWin && !root.inStartup && windowSystem.compositingActive
//&& !(root.inStartup && magicWin.panelVisibility === LatteDock.Types.AutoHide)
//&& !(root.inStartup && magicWin.panelVisibility === Latte.Dock.AutoHide)
property int allCount: root.nowDock ? mainLayout.count-1+nowDock.tasksCount : mainLayout.count
property int currentSpot: -1000
property int hoveredIndex: -1
x: (plasmoid.configuration.panelPosition === LatteDock.Types.Double) && root.isHorizontal
x: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isHorizontal
&& plasmoid.immutable && windowSystem.compositingActive ?
(dockView.width/2) - (dockView.visibility.maxLength/2): 0
y: (plasmoid.configuration.panelPosition === LatteDock.Types.Double) && root.isVertical
y: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isVertical
&& plasmoid.immutable && windowSystem.compositingActive ?
(dockView.height/2) - (dockView.visibility.maxLength/2): 0
width: (plasmoid.configuration.panelPosition === LatteDock.Types.Double) && root.isHorizontal && plasmoid.immutable ?
width: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isHorizontal && plasmoid.immutable ?
dockView.visibility.maxLength : parent.width
height: (plasmoid.configuration.panelPosition === LatteDock.Types.Double) && root.isVertical && plasmoid.immutable ?
height: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isVertical && plasmoid.immutable ?
dockView.visibility.maxLength : parent.height
Component.onCompleted: {
@ -1159,7 +1159,7 @@ DragDrop.DropArea {
states:[
State {
name: "bottom"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: secondLayout
@ -1172,7 +1172,7 @@ DragDrop.DropArea {
},
State {
name: "left"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: secondLayout
@ -1185,7 +1185,7 @@ DragDrop.DropArea {
},
State {
name: "right"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: secondLayout
@ -1198,7 +1198,7 @@ DragDrop.DropArea {
},
State {
name: "top"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteDock.Types.Double)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Double)
AnchorChanges {
target: secondLayout
@ -1232,7 +1232,7 @@ DragDrop.DropArea {
var visibility = dockView.visibility;
if (plasmoid.immutable && !visibility.isHovered //&& !wholeArea.containsMouse
&& ((visibility.panelVisibility === LatteDock.Types.AutoHide) || visibility.isDockWindowType) ) {
&& ((visibility.panelVisibility === Latte.Dock.AutoHide) || visibility.isDockWindowType) ) {
visibility.mustBeLowered();
}
}

@ -12,7 +12,7 @@ include(KDEPackageAppTemplates)
set(lattedock-app_SRCS
../liblattedock/types.cpp
../liblattedock/dock.cpp
abstractinterface.cpp
xwindowinterface.cpp
visibilitymanager.cpp

@ -4,7 +4,7 @@
#include "xwindowinterface.h"
#include "plasmaquick/containmentview.h"
#include "../liblattedock/types.h"
#include "../liblattedock/dock.h"
#include <QDebug>
@ -21,8 +21,8 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view) :
m_childrenLength(-1),
m_view(view)
{
// m_windowSystem = new WindowSystem(this);
// connect(m_windowSystem, SIGNAL(compositingChanged()), this, SLOT(compositingChanged()));
// m_windowSystem = new WindowSystem(this);
// connect(m_windowSystem, SIGNAL(compositingChanged()), this, SLOT(compositingChanged()));
m_interface = new NowDock::XWindowInterface(m_view);
connect(m_interface, SIGNAL(windowInAttention(bool)), this, SLOT(setWindowInAttention(bool)));
@ -31,8 +31,8 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view) :
//fixes a bug in plasma-framework with wrong popups placement
m_interface->setDockNumber(2);
// connect(this, SIGNAL(screenChanged(QScreen *)), this, SLOT(screenChanged(QScreen *)));
// setPanelScreen(screen());
// connect(this, SIGNAL(screenChanged(QScreen *)), this, SLOT(screenChanged(QScreen *)));
// setPanelScreen(screen());
m_updateStateTimer.setSingleShot(true);
m_updateStateTimer.setInterval(900);
@ -43,10 +43,10 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view) :
connect(&m_initTimer, &QTimer::timeout, this, &VisibilityManager::initWindow);
connect(this, SIGNAL(panelVisibilityChanged()), this, SLOT(updateVisibilityFlags()));
setPanelVisibility(LatteDock::Types::BelowActive);
// updateVisibilityFlags();
setPanelVisibility(Latte::Dock::DodgeActive);
// updateVisibilityFlags();
// connect(this, SIGNAL(locationChanged()), this, SLOT(updateWindowPosition()));
// connect(this, SIGNAL(locationChanged()), this, SLOT(updateWindowPosition()));
connect(this, SIGNAL(windowInAttentionChanged()), this, SLOT(updateState()));
initialize();
@ -63,16 +63,16 @@ void VisibilityManager::setContainment(Plasma::Containment *containment)
}
m_containment = containment;
// setVisibility(mode);
// setVisibility(mode);
}
LatteDock::Types::Visibility VisibilityManager::panelVisibility() const
Latte::Dock::Visibility VisibilityManager::panelVisibility() const
{
return m_panelVisibility;
}
void VisibilityManager::setPanelVisibility(LatteDock::Types::Visibility state)
void VisibilityManager::setPanelVisibility(Latte::Dock::Visibility state)
{
if (m_panelVisibility == state) {
return;
@ -184,7 +184,7 @@ void VisibilityManager::initWindow()
{
updateVisibilityFlags();
// updateWindowPosition();
// updateWindowPosition();
// The initialization phase makes two passes because
// changing the window style and type wants a small delay
@ -249,7 +249,7 @@ void VisibilityManager::updateVisibilityFlags()
m_interface->setDockDefaultFlags(m_isDockWindowType);
// updateWindowPosition();
// updateWindowPosition();
if (!m_isDockWindowType) {
showOnTop();
}
@ -268,7 +268,7 @@ void VisibilityManager::updateState()
//update the dock behavior
switch (m_panelVisibility) {
case LatteDock::Types::BelowActive:
case Latte::Dock::DodgeActive:
if (!m_interface->desktopIsActive() && m_interface->dockIntersectsActiveWindow()) {
if (m_interface->dockIsOnTop() || (m_isDockWindowType && !m_isAutoHidden)) {
// qDebug() << m_isHovered << " - " << m_windowIsInAttention << " - "<< m_disableHiding;
@ -294,10 +294,10 @@ void VisibilityManager::updateState()
}
}
}
break;
case LatteDock::Types::BelowMaximized:
case Latte::Dock::DodgeMaximized:
if (!m_interface->desktopIsActive() && m_interface->activeIsMaximized() && m_interface->dockIntersectsActiveWindow()) {
if (m_interface->dockIsOnTop() || (m_isDockWindowType && !m_isAutoHidden)) {
if (!m_isHovered && !m_windowIsInAttention && !m_disableHiding) {
@ -318,50 +318,50 @@ void VisibilityManager::updateState()
showOnTop();
}
}
break;
case LatteDock::Types::LetWindowsCover:
//this is not supported in clean Dock Window Types such as in wayland case
if (m_isDockWindowType) {
return;
}
if (!m_isHovered && m_interface->dockIsOnTop()) {
if (m_interface->dockIsCovering()) {
if (!m_disableHiding) {
emit mustBeLowered();
}
} else {
showOnBottom();
/* case Latte::Dock::LetWindowsCover:
//this is not supported in clean Dock Window Types such as in wayland case
if (m_isDockWindowType) {
return;
}
} else if (m_windowIsInAttention) {
if (!m_interface->dockIsOnTop()) {
if (m_interface->dockIsCovered()) {
emit mustBeRaised();
if (!m_isHovered && m_interface->dockIsOnTop()) {
if (m_interface->dockIsCovering()) {
if (!m_disableHiding) {
emit mustBeLowered();
}
} else {
showOnTop();
showOnBottom();
}
} else if (m_windowIsInAttention) {
if (!m_interface->dockIsOnTop()) {
if (m_interface->dockIsCovered()) {
emit mustBeRaised();
} else {
showOnTop();
}
}
}
}
break;
case LatteDock::Types::WindowsGoBelow:
//Do nothing, the dock is OnTop state in every case
break;
case LatteDock::Types::AutoHide:
break;
case LatteDock::Types::WindowsGoBelow:
//Do nothing, the dock is OnTop state in every case
break;*/
case Latte::Dock::AutoHide:
if (m_windowIsInAttention && m_isAutoHidden) {
emit mustBeRaised();
} else if (!m_isHovered && !m_disableHiding) {
emit mustBeLowered();
}
break;
case LatteDock::Types::AlwaysVisible:
case Latte::Dock::AlwaysVisible:
//Do nothing, the dock in OnTop state in every case
break;
}
@ -389,9 +389,9 @@ void VisibilityManager::showOnBottom()
/***************/
void VisibilityManager::activeWindowChanged()
{
if ((m_panelVisibility == LatteDock::Types::WindowsGoBelow)
|| (m_panelVisibility == LatteDock::Types::AlwaysVisible)
|| (m_panelVisibility == LatteDock::Types::AutoHide)) {
// if ((m_panelVisibility == LatteDock::Types::WindowsGoBelow)
if ((m_panelVisibility == Latte::Dock::AlwaysVisible)
|| (m_panelVisibility == Latte::Dock::AutoHide)) {
return;
}
@ -407,8 +407,8 @@ void VisibilityManager::activeWindowChanged()
//the dock is totally hidden underneath
void VisibilityManager::showOnTopCheck()
{
if ((m_panelVisibility == LatteDock::Types::BelowActive) || (m_panelVisibility == LatteDock::Types::BelowMaximized)
|| (m_panelVisibility == LatteDock::Types::LetWindowsCover)) {
if ((m_panelVisibility == Latte::Dock::DodgeActive) || (m_panelVisibility == Latte::Dock::DodgeMaximized)) {
//|| (m_panelVisibility == Latte::Dock::LetWindowsCover)) {
if (m_interface->dockIsCovered(true)) {
m_updateStateTimer.stop();
setIsHovered(true);
@ -430,7 +430,7 @@ bool VisibilityManager::event(QEvent *event)
m_updateStateTimer.stop();
setIsHovered(true);
if ((m_panelVisibility == LatteDock::Types::AutoHide) || (m_isDockWindowType)) {
if ((m_panelVisibility == Latte::Dock::AutoHide) || (m_isDockWindowType)) {
if (m_isAutoHidden) {
emit mustBeRaised();
}
@ -440,8 +440,8 @@ bool VisibilityManager::event(QEvent *event)
} else if (event->type() == QEvent::Leave) {
setIsHovered(false);
if ((m_panelVisibility != LatteDock::Types::WindowsGoBelow)
&& (m_panelVisibility != LatteDock::Types::AlwaysVisible)) {
// if ((m_panelVisibility != LatteDock::Types::WindowsGoBelow) &&
if (m_panelVisibility != Latte::Dock::AlwaysVisible) {
m_updateStateTimer.start();
}
}

@ -2,7 +2,7 @@
#define VISIBILITYMANAGER_H
#include <QObject>
#include "../liblattedock/types.h"
#include "../liblattedock/dock.h"
#include "abstractinterface.h"
#include "plasmaquick/containmentview.h"
@ -20,7 +20,7 @@ class VisibilityManager : public QObject {
Q_PROPERTY(bool isHovered READ isHovered NOTIFY isHoveredChanged)
Q_PROPERTY(bool windowInAttention READ windowInAttention WRITE setWindowInAttention NOTIFY windowInAttentionChanged)
Q_PROPERTY(LatteDock::Types::Visibility panelVisibility READ panelVisibility WRITE setPanelVisibility NOTIFY panelVisibilityChanged)
Q_PROPERTY(Latte::Dock::Visibility panelVisibility READ panelVisibility WRITE setPanelVisibility NOTIFY panelVisibilityChanged)
public:
explicit VisibilityManager(PlasmaQuick::ContainmentView *view);
@ -39,10 +39,10 @@ public:
bool windowInAttention() const;
LatteDock::Types::Visibility panelVisibility() const;
Latte::Dock::Visibility panelVisibility() const;
void setContainment(Plasma::Containment *contaiment);
void setMaskArea(QRect area);
void setPanelVisibility(LatteDock::Types::Visibility state);
void setPanelVisibility(Latte::Dock::Visibility state);
public slots:
Q_INVOKABLE void initialize();
@ -94,10 +94,9 @@ private:
PlasmaQuick::ContainmentView *m_view;
NowDock::AbstractInterface *m_interface;
LatteDock::Types::Visibility m_panelVisibility;
Latte::Dock::Visibility m_panelVisibility;
};
#endif

@ -13,7 +13,7 @@ set(CMAKE_AUTOMOC ON)
set(lattedock_SRCS
lattedockplugin.cpp
windowsystem.cpp
types.cpp
dock.cpp
)
add_library(lattedockplugin SHARED ${lattedock_SRCS})

@ -0,0 +1 @@
#include "dock.h"

@ -0,0 +1,52 @@
#ifndef DOCK_H
#define DOCK_H
#include <QObject>
#include <QMetaEnum>
#include <QMetaType>
namespace Latte {
class Dock {
Q_GADGET
public:
Dock() = delete;
~Dock() {}
enum Visibility {
AlwaysVisible = 0,
AutoHide,
DodgeActive,
DodgeMaximized,
DodgeAllWindows
};
Q_ENUM(Visibility)
enum Alignment {
Center = 0,
Left,
Right,
Top,
Bottom,
Double = 10
};
Q_ENUM(Alignment)
enum VisibilityState {
/*!
* @brief the dock is visible
*/
Visible = 1,
/*!
* @brief the dock is hidden
*/
Hidden = 0
};
Q_ENUM(VisibilityState)
};
}//end of namespace
#endif

@ -1,6 +1,6 @@
#include "lattedockplugin.h"
#include "windowsystem.h"
#include "types.h"
#include "dock.h"
#include <qqml.h>
@ -8,7 +8,7 @@ void LatteDockPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.latte.dock"));
qmlRegisterUncreatableType<LatteDock::Types>(uri, 0, 1, "Types", "LatteDock Types uncreatable");
qmlRegisterUncreatableType<Latte::Dock>(uri, 0, 1, "Dock", "Latte Dock Types uncreatable");
qmlRegisterType<LatteDock::WindowSystem>(uri, 0, 1, "WindowSystem");
qmlRegisterType<Latte::WindowSystem>(uri, 0, 1, "WindowSystem");
}

@ -1 +0,0 @@
#include "types.h"

@ -1,53 +0,0 @@
#ifndef TYPES_H
#define TYPES_H
#include <QObject>
#include <QMetaEnum>
#include <QMetaType>
namespace LatteDock {
class Types {
Q_GADGET
public:
Types() = delete;
~Types() {}
enum Visibility {
BelowActive = 0, /** always visible except if ovelaps with the active window, no area reserved */
BelowMaximized, /** always visible except if ovelaps with an active maximize window, no area reserved */
LetWindowsCover, /** always visible, windows will go over the panel, no area reserved */
WindowsGoBelow, /** default, always visible, windows will go under the panel, no area reserved */
AutoHide, /** the panel will be shownn only if the mouse cursor is on screen edges */
AlwaysVisible, /** always visible panel, "Normal" plasma panel, accompanies plasma's "Always Visible" */
};
Q_ENUM(Visibility)
enum Alignment {
Center = 0,
Left,
Right,
Top,
Bottom,
Double = 10
};
Q_ENUM(Alignment)
enum VisibilityState {
/*!
* @brief the dock is visible
*/
Visible = 1,
/*!
* @brief the dock is hidden
*/
Hidden = 0
};
Q_ENUM(VisibilityState)
};
}//end of namespace
#endif

@ -2,7 +2,7 @@
#include <KWindowSystem>
namespace LatteDock {
namespace Latte {
WindowSystem::WindowSystem(QObject *parent) :
QObject(parent)

@ -3,7 +3,7 @@
#include <QObject>
namespace LatteDock {
namespace Latte {
class WindowSystem : public QObject {
Q_OBJECT

@ -29,7 +29,7 @@ import org.kde.plasma.private.taskmanager 0.1 as TaskManagerApplet
import org.kde.activities 0.1 as Activities
import org.kde.latte.dock 0.1 as LatteDock
import org.kde.latte.dock 0.1 as Latte
import "../code/tools.js" as TaskTools
import "../code/activitiesTools.js" as ActivitiesTools
@ -217,7 +217,7 @@ Item {
// FIXME: at some point this must be dropped with NowDock plugin
////BEGIN interfaces
LatteDock.WindowSystem{
Latte.WindowSystem{
id:windowSystem
}
@ -994,7 +994,7 @@ Item {
///Bottom Edge
State {
name: "bottomCenter"
when: (panel.position === PlasmaCore.Types.BottomPosition && userPanelPosition===LatteDock.Types.Center)
when: (panel.position === PlasmaCore.Types.BottomPosition && userPanelPosition===Latte.Dock.Center)
AnchorChanges {
target: barLine
@ -1007,7 +1007,7 @@ Item {
},
State {
name: "bottomLeft"
when: (panel.position === PlasmaCore.Types.BottomPosition && userPanelPosition===LatteDock.Types.Left)
when: (panel.position === PlasmaCore.Types.BottomPosition && userPanelPosition===Latte.Dock.Left)
AnchorChanges {
target: barLine
@ -1020,7 +1020,7 @@ Item {
},
State {
name: "bottomRight"
when: (panel.position === PlasmaCore.Types.BottomPosition && userPanelPosition===LatteDock.Types.Right)
when: (panel.position === PlasmaCore.Types.BottomPosition && userPanelPosition===Latte.Dock.Right)
AnchorChanges {
target: barLine
@ -1034,7 +1034,7 @@ Item {
///Top Edge
State {
name: "topCenter"
when: (panel.position === PlasmaCore.Types.TopPosition && userPanelPosition===LatteDock.Types.Center)
when: (panel.position === PlasmaCore.Types.TopPosition && userPanelPosition===Latte.Dock.Center)
AnchorChanges {
target: barLine
@ -1047,7 +1047,7 @@ Item {
},
State {
name: "topLeft"
when: (panel.position === PlasmaCore.Types.TopPosition && userPanelPosition===LatteDock.Types.Left)
when: (panel.position === PlasmaCore.Types.TopPosition && userPanelPosition===Latte.Dock.Left)
AnchorChanges {
target: barLine
@ -1060,7 +1060,7 @@ Item {
},
State {
name: "topRight"
when: (panel.position === PlasmaCore.Types.TopPosition && userPanelPosition===LatteDock.Types.Right)
when: (panel.position === PlasmaCore.Types.TopPosition && userPanelPosition===Latte.Dock.Right)
AnchorChanges {
target: barLine
@ -1074,7 +1074,7 @@ Item {
////Left Edge
State {
name: "leftCenter"
when: (panel.position === PlasmaCore.Types.LeftPosition && userPanelPosition===LatteDock.Types.Center)
when: (panel.position === PlasmaCore.Types.LeftPosition && userPanelPosition===Latte.Dock.Center)
AnchorChanges {
target: barLine
@ -1087,7 +1087,7 @@ Item {
},
State {
name: "leftTop"
when: (panel.position === PlasmaCore.Types.LeftPosition && userPanelPosition===LatteDock.Types.Top)
when: (panel.position === PlasmaCore.Types.LeftPosition && userPanelPosition===Latte.Dock.Top)
AnchorChanges {
target: barLine
@ -1100,7 +1100,7 @@ Item {
},
State {
name: "leftBottom"
when: (panel.position === PlasmaCore.Types.LeftPosition && userPanelPosition===LatteDock.Types.Bottom)
when: (panel.position === PlasmaCore.Types.LeftPosition && userPanelPosition===Latte.Dock.Bottom)
AnchorChanges {
target: barLine
@ -1114,7 +1114,7 @@ Item {
///Right Edge
State {
name: "rightCenter"
when: (panel.position === PlasmaCore.Types.RightPosition && userPanelPosition===LatteDock.Types.Center)
when: (panel.position === PlasmaCore.Types.RightPosition && userPanelPosition===Latte.Dock.Center)
AnchorChanges {
target: barLine
@ -1127,7 +1127,7 @@ Item {
},
State {
name: "rightTop"
when: (panel.position === PlasmaCore.Types.RightPosition && userPanelPosition===LatteDock.Types.Top)
when: (panel.position === PlasmaCore.Types.RightPosition && userPanelPosition===Latte.Dock.Top)
AnchorChanges {
target: barLine
@ -1140,7 +1140,7 @@ Item {
},
State {
name: "rightBottom"
when: (panel.position === PlasmaCore.Types.RightPosition && userPanelPosition===LatteDock.Types.Bottom)
when: (panel.position === PlasmaCore.Types.RightPosition && userPanelPosition===Latte.Dock.Bottom)
AnchorChanges {
target: barLine

@ -8,7 +8,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.plasmoid 2.0
import org.kde.latte.dock 0.1 as LatteDock
import org.kde.latte.dock 0.1 as Latte
PlasmaCore.FrameSvgItem {
imagePath: "dialogs/background"
@ -65,28 +65,28 @@ PlasmaCore.FrameSvgItem {
function updatePanelPositionVisual(){
if((panelPosition == LatteDock.Types.Left)||(panelPosition == LatteDock.Types.Top)){
if((panelPosition == Latte.Dock.Left)||(panelPosition == Latte.Dock.Top)){
firstPosition.checked = true;
centerPosition.checked = false;
lastPosition.checked = false;
splitTwoPosition.checked = false;
removeInternalViewSplitter();
}
else if(panelPosition == LatteDock.Types.Center){
else if(panelPosition == Latte.Dock.Center){
firstPosition.checked = false;
centerPosition.checked = true;
lastPosition.checked = false;
splitTwoPosition.checked = false;
removeInternalViewSplitter();
}
else if((panelPosition == LatteDock.Types.Right)||(panelPosition == LatteDock.Types.Bottom)){
else if((panelPosition == Latte.Dock.Right)||(panelPosition == Latte.Dock.Bottom)){
firstPosition.checked = false;
centerPosition.checked = false;
lastPosition.checked = true;
splitTwoPosition.checked = false;
removeInternalViewSplitter();
}
else if (panelPosition == LatteDock.Types.Double){
else if (panelPosition == Latte.Dock.Double){
firstPosition.checked = false;
centerPosition.checked = false;
lastPosition.checked = false;
@ -112,9 +112,9 @@ PlasmaCore.FrameSvgItem {
onCheckedChanged: {
if(checked && !parent.inStartup){
if(panelIsVertical)
plasmoid.configuration.panelPosition = LatteDock.Types.Top
plasmoid.configuration.panelPosition = Latte.Dock.Top
else
plasmoid.configuration.panelPosition = LatteDock.Types.Left
plasmoid.configuration.panelPosition = Latte.Dock.Left
}
}
onClicked: checked=true;
@ -127,7 +127,7 @@ PlasmaCore.FrameSvgItem {
onCheckedChanged: {
if(checked && !parent.inStartup){
plasmoid.configuration.panelPosition = LatteDock.Types.Center
plasmoid.configuration.panelPosition = Latte.Dock.Center
}
}
onClicked: checked=true;
@ -141,9 +141,9 @@ PlasmaCore.FrameSvgItem {
onCheckedChanged: {
if(checked && !parent.inStartup){
if(panelIsVertical)
plasmoid.configuration.panelPosition = LatteDock.Types.Bottom
plasmoid.configuration.panelPosition = Latte.Dock.Bottom
else
plasmoid.configuration.panelPosition = LatteDock.Types.Right
plasmoid.configuration.panelPosition = Latte.Dock.Right
}
}
onClicked: checked=true;
@ -157,7 +157,7 @@ PlasmaCore.FrameSvgItem {
onCheckedChanged: {
if(checked && !parent.inStartup){
plasmoid.configuration.panelPosition = LatteDock.Types.Double;
plasmoid.configuration.panelPosition = Latte.Dock.Double;
}
}
onClicked: checked=true;
@ -165,13 +165,11 @@ PlasmaCore.FrameSvgItem {
}
}
// BelowActive = 0, /** always visible except if ovelaps with the active window, no area reserved */
// BelowMaximized, /** always visible except if ovelaps with an active maximize window, no area reserved */
// LetWindowsCover, /** always visible, windows will go over the panel, no area reserved */
// WindowsGoBelow, /** default, always visible, windows will go under the panel, no area reserved */
// AutoHide, /** the panel will be shownn only if the mouse cursor is on screen edges */
// AlwaysVisible, /** always visible panel, "Normal" plasma panel, accompanies plasma's "Always Visible" */
//AlwaysVisible = 0,
//AutoHide,
//DodgeActive,
//DodgeMaximized,
//DodgeAllWindows
/********** Panel Visibility ****************/
Column{
@ -183,7 +181,7 @@ PlasmaCore.FrameSvgItem {
}
//user set Panel Visibility
// 0-BelowActive, 1-BelowMaximized, 2-LetWindowsCover, 3-WindowsGoBelow, 4-AutoHide, 5-AlwaysVisible
// 0-AlwaysVisible, 1-AutoHide, 2-DodgeActive, 3-DodgeMaximized, 4-DodgeAllWindows
Flow{
width: parent.width
spacing: 2
@ -218,10 +216,10 @@ PlasmaCore.FrameSvgItem {
else
fifthState.checked = false;
if (panelVisibility === 5)
/* if (panelVisibility === 5)
sixthState.checked = true;
else
sixthState.checked = false;
sixthState.checked = false;*/
}
onPanelVisibilityChanged: updatePanelVisibilityVisual();
@ -234,7 +232,7 @@ PlasmaCore.FrameSvgItem {
PlasmaComponents.Button{
id: firstState
checkable: true
text: i18n("Below Active")
text: i18n("Always Visible")
width: (parent.width / 2) - 1
onCheckedChanged: {
@ -247,7 +245,7 @@ PlasmaCore.FrameSvgItem {
PlasmaComponents.Button{
id: secondState
checkable: true
text: i18n("Below Maximized")
text: i18n("Auto Hide")
width: (parent.width / 2) - 1
onCheckedChanged: {
@ -260,7 +258,7 @@ PlasmaCore.FrameSvgItem {
PlasmaComponents.Button{
id: thirdState
checkable: true
text: i18n("Let Windows Cover")
text: i18n("Dodge Active")
width: (parent.width / 2) - 1
onCheckedChanged: {
@ -274,7 +272,7 @@ PlasmaCore.FrameSvgItem {
PlasmaComponents.Button{
id: fourthState
checkable: true
text: i18n("Windows Go Below")
text: i18n("Dodge Maximized")
width: (parent.width/2) - 1
onCheckedChanged: {
@ -288,7 +286,7 @@ PlasmaCore.FrameSvgItem {
PlasmaComponents.Button{
id: fifthState
checkable: true
text: i18n("Auto Hide")
text: i18n("Dodge All Windows")
width: (parent.width/2) - 1
onCheckedChanged: {
@ -298,7 +296,7 @@ PlasmaCore.FrameSvgItem {
}
onClicked: checked=true;
}
PlasmaComponents.Button{
/* PlasmaComponents.Button{
id: sixthState
checkable: true
text: i18n("Always Visible")
@ -310,7 +308,7 @@ PlasmaCore.FrameSvgItem {
}
}
onClicked: checked=true;
}
}*/
}
}

Loading…
Cancel
Save