replace Double with Justify

pull/1/head
Michail Vourlakos 8 years ago
parent a758c5875f
commit 33d5eab539

@ -48,7 +48,7 @@ Item {
property bool startEdge: index < secondLayout.beginIndex ? (index === 0)&&(mainLayout.count > 1) :
(index === secondLayout.beginIndex)&&(secondLayout.count > 1)
//applet is in ending edge
property bool endEdge: plasmoid.configuration.panelPosition !== Latte.Dock.Double ? (index === mainLayout.count - 1)&&(mainLayout.count>1) :
property bool endEdge: plasmoid.configuration.panelPosition !== Latte.Dock.Justify ? (index === mainLayout.count - 1)&&(mainLayout.count>1) :
((index === mainLayout.count - 2)&&(mainLayout.count>2))||((index === secondLayout.beginIndex+secondLayout.count-1)&&(secondLayout.count>1))

@ -46,7 +46,7 @@ Item{
height: root.isVertical ? panelHeight : smallSize
property int spacing: (root.panelAlignment === Latte.Dock.Center
|| plasmoid.configuration.panelPosition === Latte.Dock.Double) ?
|| plasmoid.configuration.panelPosition === Latte.Dock.Justify) ?
root.panelEdgeSpacing : root.panelEdgeSpacing/2
property int smallSize: Math.max(3.7*root.statesLineSize, 16)
@ -188,7 +188,7 @@ Item{
},
State {
name: "leftDouble"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: barLine
@ -257,7 +257,7 @@ Item{
},
State {
name: "rightDouble"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: barLine
@ -326,7 +326,7 @@ Item{
},
State {
name: "bottomDouble"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: barLine
@ -395,7 +395,7 @@ Item{
},
State {
name: "topDouble"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: barLine

@ -134,9 +134,9 @@ Item{
//console.log("entered normal state...");
//count panel length
if(root.isHorizontal) {
tempLength = plasmoid.configuration.panelPosition === Latte.Dock.Double ? layoutsContainer.width + 0.5*space : mainLayout.width + space;
tempLength = plasmoid.configuration.panelPosition === Latte.Dock.Justify ? layoutsContainer.width + 0.5*space : mainLayout.width + space;
} else {
tempLength = plasmoid.configuration.panelPosition === Latte.Dock.Double ? layoutsContainer.height + 0.5*space : mainLayout.height + space;
tempLength = plasmoid.configuration.panelPosition === Latte.Dock.Justify ? layoutsContainer.height + 0.5*space : mainLayout.height + space;
}
tempThickness = thicknessNormalOriginal;
@ -157,7 +157,7 @@ Item{
localY = 0;
}
if (plasmoid.configuration.panelPosition === Latte.Dock.Double) {
if (plasmoid.configuration.panelPosition === Latte.Dock.Justify) {
localX = (dock.width/2) - (layoutsContainer.width/2) - 0.25*space;
} else if (root.panelAlignment === Latte.Dock.Left) {
localX = 0;
@ -173,7 +173,7 @@ Item{
localX = dock.width - tempThickness;
}
if (plasmoid.configuration.panelPosition === Latte.Dock.Double) {
if (plasmoid.configuration.panelPosition === Latte.Dock.Justify) {
localY = (dock.height/2) - (layoutsContainer.height/2) - 0.25*space;
} else if (root.panelAlignment === Latte.Dock.Top) {
localY = 0;

@ -78,10 +78,10 @@ DragDrop.DropArea {
///FIXME: <delete both> 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 ? Latte.Dock.Center : (root.isVertical ? Latte.Dock.Top : Latte.Dock.Left)
//property int panelAlignment: plasmoid.configuration.panelPosition !== Latte.Dock.Double ? plasmoid.configuration.panelPosition : mainLayoutPosition
//property int panelAlignment: plasmoid.configuration.panelPosition !== Latte.Dock.Justify ? plasmoid.configuration.panelPosition : mainLayoutPosition
property int panelAlignment: !root.editMode ? plasmoid.configuration.panelPosition :
( plasmoid.configuration.panelPosition === Latte.Dock.Double ?
( plasmoid.configuration.panelPosition === Latte.Dock.Justify ?
Latte.Dock.Center :plasmoid.configuration.panelPosition )
property real zoomFactor: (windowSystem.compositingActive && durationTime>0) ? ( 1 + (plasmoid.configuration.zoomLevel / 20) ) : 1
@ -123,12 +123,12 @@ DragDrop.DropArea {
///END properties from nowDock
/* Layout.preferredWidth: plasmoid.immutable ?
(plasmoid.configuration.panelPosition === Latte.Dock.Double ?
(plasmoid.configuration.panelPosition === Latte.Dock.Justify ?
layoutsContainer.width + 0.5*iconMargin : mainLayout.width + iconMargin) :
Screen.width //on unlocked state use the maximum
Layout.preferredHeight: plasmoid.immutable ?
(plasmoid.configuration.panelPosition === Latte.Dock.Double ?
(plasmoid.configuration.panelPosition === Latte.Dock.Justify ?
layoutsContainer.height + 0.5*iconMargin : mainLayout.height + iconMargin) :
Screen.height //on unlocked state use the maximum*/
@ -220,7 +220,7 @@ DragDrop.DropArea {
},
State {
name: "leftDouble"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: mainLayout
@ -273,7 +273,7 @@ DragDrop.DropArea {
},
State {
name: "rightDouble"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: mainLayout
@ -326,7 +326,7 @@ DragDrop.DropArea {
},
State {
name: "bottomDouble"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: mainLayout
@ -379,7 +379,7 @@ DragDrop.DropArea {
},
State {
name: "topDouble"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: mainLayout
@ -605,10 +605,10 @@ DragDrop.DropArea {
///to add applets
if (plasmoid.immutable) {
if(root.isHorizontal) {
root.Layout.preferredWidth = (plasmoid.configuration.panelPosition === Latte.Dock.Double ?
root.Layout.preferredWidth = (plasmoid.configuration.panelPosition === Latte.Dock.Justify ?
layoutsContainer.width + 0.5*iconMargin : mainLayout.width + iconMargin);
} else {
root.Layout.preferredHeight = (plasmoid.configuration.panelPosition === Latte.Dock.Double ?
root.Layout.preferredHeight = (plasmoid.configuration.panelPosition === Latte.Dock.Justify ?
layoutsContainer.height + 0.5*iconMargin : mainLayout.height + iconMargin);
}
} else {
@ -887,10 +887,10 @@ DragDrop.DropArea {
// console.log("------Entered check-----");
if (root.isVertical) {
layoutLength = (plasmoid.configuration.panelPosition === Latte.Dock.Double) ?
layoutLength = (plasmoid.configuration.panelPosition === Latte.Dock.Justify) ?
mainLayout.height+secondLayout.height : mainLayout.height
} else {
layoutLength = (plasmoid.configuration.panelPosition === Latte.Dock.Double) ?
layoutLength = (plasmoid.configuration.panelPosition === Latte.Dock.Justify) ?
mainLayout.width+secondLayout.width : mainLayout.width
}
@ -1057,15 +1057,15 @@ DragDrop.DropArea {
property int currentSpot: -1000
property int hoveredIndex: -1
x: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isHorizontal
x: (plasmoid.configuration.panelPosition === Latte.Dock.Justify) && root.isHorizontal
&& !root.editMode && windowSystem.compositingActive ?
(dock.width/2) - (dock.maxLength/2): 0
y: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isVertical
y: (plasmoid.configuration.panelPosition === Latte.Dock.Justify) && root.isVertical
&& !root.editMode && windowSystem.compositingActive ?
(dock.height/2) - (dock.maxLength/2): 0
width: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isHorizontal && !root.editMode ?
width: (plasmoid.configuration.panelPosition === Latte.Dock.Justify) && root.isHorizontal && !root.editMode ?
dock.maxLength : parent.width
height: (plasmoid.configuration.panelPosition === Latte.Dock.Double) && root.isVertical && !root.editMode ?
height: (plasmoid.configuration.panelPosition === Latte.Dock.Justify) && root.isVertical && !root.editMode ?
dock.maxLength : parent.height
Loader{
@ -1132,7 +1132,7 @@ DragDrop.DropArea {
states:[
State {
name: "bottom"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: secondLayout
@ -1145,7 +1145,7 @@ DragDrop.DropArea {
},
State {
name: "left"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: secondLayout
@ -1158,7 +1158,7 @@ DragDrop.DropArea {
},
State {
name: "right"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: secondLayout
@ -1171,7 +1171,7 @@ DragDrop.DropArea {
},
State {
name: "top"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Double)
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Justify)
AnchorChanges {
target: secondLayout

@ -50,7 +50,7 @@ public:
Right,
Top,
Bottom,
Double = 10
Justify = 10
};
Q_ENUM(Alignment)

@ -211,7 +211,7 @@ PlasmaComponents.Page{
splitTwoPosition.checked = false;
dock.removeInternalViewSplitter();
}
else if (panelPosition == Latte.Dock.Double){
else if (panelPosition == Latte.Dock.Justify){
firstPosition.checked = false;
centerPosition.checked = false;
lastPosition.checked = false;
@ -232,7 +232,7 @@ PlasmaComponents.Page{
id: firstPosition
checkable: true
text: panelIsVertical ? i18n("Top") : i18n("Left")
width: (parent.width / 3) - 1
width: (parent.width / 4) - 2
onCheckedChanged: {
if(checked && !parent.inStartup){
@ -248,7 +248,7 @@ PlasmaComponents.Page{
id: centerPosition
checkable: true
text: i18n("Center")
width: (parent.width / 3) - 1
width: (parent.width / 4) - 2
onCheckedChanged: {
if(checked && !parent.inStartup){
@ -261,7 +261,7 @@ PlasmaComponents.Page{
id: lastPosition
checkable: true
text: panelIsVertical ? i18n("Bottom") : i18n("Right")
width: (parent.width / 3) - 2
width: (parent.width / 4) - 2
onCheckedChanged: {
if(checked && !parent.inStartup){
@ -277,12 +277,12 @@ PlasmaComponents.Page{
PlasmaComponents.Button{
id: splitTwoPosition
checkable: true
text: panelIsVertical ? i18n("Top")+ " | "+ i18n("Bottom") : i18n("Left") +" | "+ i18n("Right")
width: parent.width
text: i18n("Justify")
width: (parent.width / 4)
onCheckedChanged: {
if(checked && !parent.inStartup){
plasmoid.configuration.panelPosition = Latte.Dock.Double;
plasmoid.configuration.panelPosition = Latte.Dock.Justify;
}
}
onClicked: checked=true;

Loading…
Cancel
Save