mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-21 10:50:30 +03:00
fix RTL layout for vertical and alignments
This commit is contained in:
parent
39a9bf4301
commit
920de6cd6e
@ -456,7 +456,9 @@ Item{
|
||||
},
|
||||
State {
|
||||
name: "bottomLeft"
|
||||
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Left)
|
||||
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)
|
||||
&&(((root.panelAlignment === Latte.Dock.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|
||||
|| ((root.panelAlignment === Latte.Dock.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
|
||||
|
||||
AnchorChanges {
|
||||
target: _mainLayout
|
||||
@ -470,7 +472,9 @@ Item{
|
||||
},
|
||||
State {
|
||||
name: "bottomRight"
|
||||
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Right)
|
||||
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)
|
||||
&&(((root.panelAlignment === Latte.Dock.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|
||||
||((root.panelAlignment === Latte.Dock.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
|
||||
|
||||
AnchorChanges {
|
||||
target: _mainLayout
|
||||
@ -499,7 +503,9 @@ Item{
|
||||
},
|
||||
State {
|
||||
name: "topLeft"
|
||||
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Left)
|
||||
when: (plasmoid.location === PlasmaCore.Types.TopEdge)
|
||||
&&(((root.panelAlignment === Latte.Dock.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|
||||
|| ((root.panelAlignment === Latte.Dock.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
|
||||
|
||||
AnchorChanges {
|
||||
target: _mainLayout
|
||||
@ -513,7 +519,9 @@ Item{
|
||||
},
|
||||
State {
|
||||
name: "topRight"
|
||||
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Right)
|
||||
when: (plasmoid.location === PlasmaCore.Types.TopEdge)
|
||||
&&(((root.panelAlignment === Latte.Dock.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|
||||
||((root.panelAlignment === Latte.Dock.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
|
||||
|
||||
AnchorChanges {
|
||||
target: _mainLayout
|
||||
|
@ -578,7 +578,9 @@ Item{
|
||||
},
|
||||
State {
|
||||
name: "bottomLeft"
|
||||
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Left)
|
||||
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)
|
||||
&&(((root.panelAlignment === Latte.Dock.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|
||||
|| ((root.panelAlignment === Latte.Dock.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
|
||||
|
||||
AnchorChanges {
|
||||
target: barLine
|
||||
@ -597,7 +599,9 @@ Item{
|
||||
},
|
||||
State {
|
||||
name: "bottomRight"
|
||||
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Dock.Right)
|
||||
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)
|
||||
&&(((root.panelAlignment === Latte.Dock.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|
||||
||((root.panelAlignment === Latte.Dock.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
|
||||
|
||||
AnchorChanges {
|
||||
target: barLine
|
||||
@ -652,7 +656,9 @@ Item{
|
||||
},
|
||||
State {
|
||||
name: "topLeft"
|
||||
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Left)
|
||||
when: (plasmoid.location === PlasmaCore.Types.TopEdge)
|
||||
&&(((root.panelAlignment === Latte.Dock.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|
||||
|| ((root.panelAlignment === Latte.Dock.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
|
||||
|
||||
AnchorChanges {
|
||||
target: barLine
|
||||
@ -670,7 +676,9 @@ Item{
|
||||
},
|
||||
State {
|
||||
name: "topRight"
|
||||
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Dock.Right)
|
||||
when: (plasmoid.location === PlasmaCore.Types.TopEdge)
|
||||
&&(((root.panelAlignment === Latte.Dock.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|
||||
||((root.panelAlignment === Latte.Dock.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
|
||||
|
||||
AnchorChanges {
|
||||
target: barLine
|
||||
|
@ -84,7 +84,7 @@ Item {
|
||||
//check if the mouse goes right or down according to the center
|
||||
var positiveDirection = ((currentMousePosition - center) >= 0 );
|
||||
|
||||
if (Qt.application.layoutDirection === Qt.RightToLeft) {
|
||||
if (Qt.application.layoutDirection === Qt.RightToLeft && !root.isVertical) {
|
||||
positiveDirection = !positiveDirection;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ DragDrop.DropArea {
|
||||
id: root
|
||||
objectName: "dockLayoutView"
|
||||
|
||||
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
|
||||
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft && !root.isVertical
|
||||
LayoutMirroring.childrenInherit: true
|
||||
|
||||
//// BEGIN SIGNALS
|
||||
|
@ -88,7 +88,7 @@ Item {
|
||||
//check if the mouse goes right or down according to the center
|
||||
var positiveDirection = ((currentMousePosition - center) >= 0 );
|
||||
|
||||
if (Qt.application.layoutDirection === Qt.RightToLeft) {
|
||||
if (Qt.application.layoutDirection === Qt.RightToLeft && !root.vertical) {
|
||||
positiveDirection = !positiveDirection;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ Item {
|
||||
Layout.minimumHeight: (userPanelPosition !== 0)&&(!latteDock) ? clearHeight : -1
|
||||
Layout.preferredWidth: (userPanelPosition !== 0)&&(!latteDock) ? tasksWidth : -1
|
||||
Layout.preferredHeight: (userPanelPosition !== 0)&&(!latteDock) ? tasksHeight : -1
|
||||
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
|
||||
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft && !root.vertical
|
||||
LayoutMirroring.childrenInherit: true
|
||||
|
||||
property bool debugLocation: false
|
||||
|
@ -303,7 +303,7 @@ Item{
|
||||
}
|
||||
property var mask: ShaderEffectSource {
|
||||
sourceItem: Item{
|
||||
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
|
||||
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft && !root.vertical
|
||||
LayoutMirroring.childrenInherit: true
|
||||
|
||||
width: iconImageBuffer.width
|
||||
|
Loading…
x
Reference in New Issue
Block a user