Warning, /plasma/latte-dock/declarativeimports/abilities/client/appletabilities/ContainerGridBindings.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2021 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 import QtQuick 2.7 0007 0008 import org.kde.plasma.plasmoid 2.0 0009 import org.kde.plasma.core 2.0 as PlasmaCore 0010 0011 import org.kde.latte.core 0.2 as LatteCore 0012 0013 Item { 0014 Binding { 0015 target: _abilityContainer.layout 0016 property: "columns" 0017 value: plasmoid.formFactor === PlasmaCore.Types.Vertical ? 1 : 0 0018 } 0019 0020 Binding { 0021 target: _abilityContainer.layout 0022 property: "rows" 0023 value: plasmoid.formFactor === PlasmaCore.Types.Vertical ? 0 : 1 0024 } 0025 0026 Binding { 0027 target: _abilityContainer.layout 0028 property: "columnSpacing" 0029 value: 0 0030 } 0031 0032 Binding { 0033 target: _abilityContainer.layout 0034 property: "rowSpacing" 0035 value: 0 0036 } 0037 0038 Binding { 0039 target: _abilityContainer.layout 0040 property: "flow" 0041 value: plasmoid.formFactor === PlasmaCore.Types.Vertical ? Grid.TopToBottom : Grid.LeftToRight 0042 } 0043 0044 states: [ 0045 ///Left Edge 0046 State { 0047 name: "leftCenter" 0048 when: (_abilityContainer.location===PlasmaCore.Types.LeftEdge && _abilityContainer.alignment===LatteCore.Types.Center) 0049 0050 PropertyChanges{ 0051 target: _abilityContainer.layout; 0052 horizontalItemAlignment: Grid.AlignLeft; verticalItemAlignment: Grid.AlignVCenter; 0053 } 0054 }, 0055 State { 0056 name: "leftTop" 0057 when: (_abilityContainer.location===PlasmaCore.Types.LeftEdge && _abilityContainer.alignment===LatteCore.Types.Top) 0058 0059 PropertyChanges{ 0060 target: _abilityContainer.layout; 0061 horizontalItemAlignment: Grid.AlignLeft; verticalItemAlignment: Grid.AlignVCenter; 0062 } 0063 }, 0064 State { 0065 name: "leftBottom" 0066 when: (_abilityContainer.location===PlasmaCore.Types.LeftEdge && _abilityContainer.alignment===LatteCore.Types.Bottom) 0067 0068 PropertyChanges{ 0069 target: _abilityContainer.layout; 0070 horizontalItemAlignment: Grid.AlignLeft; verticalItemAlignment: Grid.AlignVCenter; 0071 } 0072 }, 0073 ///Right Edge 0074 State { 0075 name: "rightCenter" 0076 when: (_abilityContainer.location===PlasmaCore.Types.RightEdge && _abilityContainer.alignment===LatteCore.Types.Center) 0077 0078 PropertyChanges{ 0079 target: _abilityContainer.layout; 0080 horizontalItemAlignment: Grid.AlignRight; verticalItemAlignment: Grid.AlignVCenter; 0081 } 0082 }, 0083 State { 0084 name: "rightTop" 0085 when: (_abilityContainer.location===PlasmaCore.Types.RightEdge && _abilityContainer.alignment===LatteCore.Types.Top) 0086 0087 PropertyChanges{ 0088 target: _abilityContainer.layout; 0089 horizontalItemAlignment: Grid.AlignRight; verticalItemAlignment: Grid.AlignVCenter; 0090 } 0091 }, 0092 State { 0093 name: "rightBottom" 0094 when: (_abilityContainer.location===PlasmaCore.Types.RightEdge && _abilityContainer.alignment===LatteCore.Types.Bottom) 0095 0096 PropertyChanges{ 0097 target: _abilityContainer.layout; horizontalItemAlignment: Grid.AlignRight; verticalItemAlignment: Grid.AlignVCenter; 0098 } 0099 }, 0100 ///Bottom Edge 0101 State { 0102 name: "bottomCenter" 0103 when: (_abilityContainer.location===PlasmaCore.Types.BottomEdge && _abilityContainer.alignment===LatteCore.Types.Center) 0104 0105 PropertyChanges{ 0106 target: _abilityContainer.layout; 0107 horizontalItemAlignment: Grid.AlignHCenter; verticalItemAlignment: Grid.AlignBottom 0108 } 0109 }, 0110 State { 0111 name: "bottomLeft" 0112 when: (_abilityContainer.location===PlasmaCore.Types.BottomEdge && _abilityContainer.alignment===LatteCore.Types.Left) 0113 0114 PropertyChanges{ 0115 target: _abilityContainer.layout; 0116 horizontalItemAlignment: Grid.AlignHCenter; verticalItemAlignment: Grid.AlignBottom 0117 } 0118 }, 0119 State { 0120 name: "bottomRight" 0121 when: (_abilityContainer.location===PlasmaCore.Types.BottomEdge && _abilityContainer.alignment===LatteCore.Types.Right) 0122 0123 PropertyChanges{ 0124 target: _abilityContainer.layout; 0125 horizontalItemAlignment: Grid.AlignHCenter; verticalItemAlignment: Grid.AlignBottom 0126 } 0127 }, 0128 ///Top Edge 0129 State { 0130 name: "topCenter" 0131 when: (_abilityContainer.location===PlasmaCore.Types.TopEdge && _abilityContainer.alignment===LatteCore.Types.Center) 0132 0133 PropertyChanges{ 0134 target: _abilityContainer.layout; 0135 horizontalItemAlignment: Grid.AlignHCenter; verticalItemAlignment: Grid.AlignTop 0136 } 0137 }, 0138 State { 0139 name: "topLeft" 0140 when: (_abilityContainer.location===PlasmaCore.Types.TopEdge && _abilityContainer.alignment===LatteCore.Types.Left) 0141 0142 PropertyChanges{ 0143 target: _abilityContainer.layout; 0144 horizontalItemAlignment: Grid.AlignHCenter; verticalItemAlignment: Grid.AlignTop 0145 } 0146 }, 0147 State { 0148 name: "topRight" 0149 when: (_abilityContainer.location===PlasmaCore.Types.TopEdge && _abilityContainer.alignment===LatteCore.Types.Right) 0150 0151 PropertyChanges{ 0152 target: _abilityContainer.layout; 0153 horizontalItemAlignment: Grid.AlignHCenter; verticalItemAlignment: Grid.AlignTop 0154 } 0155 } 0156 ] 0157 ////////////////END states 0158 }