Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/ConnectionItem.qml
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Line(s) | 110 | PlasmaComponents.Button { | |||
---|---|---|---|---|---|
113 | opacity: connectionView.currentVisibleButtonIndex == index ? 1 : 0 | 113 | opacity: connectionView.currentVisibleButtonIndex == index ? 1 : 0 | ||
114 | visible: opacity != 0 | 114 | visible: opacity != 0 | ||
115 | text: (ConnectionState == PlasmaNM.Enums.Deactivated) ? i18n("Connect") : i18n("Disconnect") | 115 | text: (ConnectionState == PlasmaNM.Enums.Deactivated) ? i18n("Connect") : i18n("Disconnect") | ||
116 | 116 | | |||
117 | Behavior on opacity { NumberAnimation { duration: units.shortDuration } } | 117 | Behavior on opacity { NumberAnimation { duration: units.shortDuration } } | ||
118 | 118 | | |||
119 | onClicked: changeState() | 119 | onClicked: changeState() | ||
120 | } | 120 | } | ||
121 | | ||||
122 | MouseArea { | ||||
123 | acceptedButtons: Qt.RightButton | ||||
124 | Layout.alignment: Qt.AlignTop | Qt.AlignLeft | ||||
125 | width: parent.width | ||||
126 | height: parent.height | ||||
127 | onPressed: { | ||||
128 | contextMenu.visualParent = parent | ||||
129 | contextMenu.open(mouse.x, mouse.y) | ||||
130 | } | ||||
131 | } | ||||
121 | } | 132 | } | ||
122 | 133 | | |||
134 | ColumnLayout { | ||||
135 | Layout.fillHeight: true | ||||
123 | PlasmaCore.SvgItem { | 136 | PlasmaCore.SvgItem { | ||
124 | id: separator | 137 | id: separator | ||
125 | height: lineSvg.elementSize("horizontal-line").height | 138 | height: lineSvg.elementSize("horizontal-line").height | ||
126 | Layout.fillWidth: true | 139 | Layout.fillWidth: true | ||
127 | Layout.maximumHeight: height | 140 | Layout.maximumHeight: height | ||
128 | elementId: "horizontal-line" | 141 | elementId: "horizontal-line" | ||
129 | svg: PlasmaCore.Svg { id: lineSvg; imagePath: "widgets/line" } | 142 | svg: PlasmaCore.Svg { id: lineSvg; imagePath: "widgets/line" } | ||
130 | visible: connectionItem.expanded | 143 | visible: connectionItem.expanded | ||
131 | opacity: visible | 144 | opacity: visible | ||
132 | } | 145 | } | ||
133 | 146 | | |||
134 | Loader { | 147 | Loader { | ||
135 | id: expandableComponentLoader | 148 | id: expandableComponentLoader | ||
136 | Layout.fillHeight: true | 149 | Layout.fillHeight: true | ||
137 | Layout.fillWidth: true | 150 | Layout.fillWidth: true | ||
138 | height: childrenRect.height | 151 | height: childrenRect.height | ||
139 | } | 152 | } | ||
140 | } | 153 | } | ||
141 | | ||||
142 | MouseArea { | | |||
143 | acceptedButtons: Qt.RightButton | | |||
144 | anchors.fill: parent | | |||
145 | onPressed: { | | |||
146 | contextMenu.visualParent = parent | | |||
147 | contextMenu.open() | | |||
148 | } | | |||
149 | } | 154 | } | ||
150 | 155 | | |||
156 | | ||||
151 | PlasmaComponents.Menu { | 157 | PlasmaComponents.Menu { | ||
152 | id: contextMenu | 158 | id: contextMenu | ||
153 | PlasmaComponents.MenuItem { | 159 | PlasmaComponents.MenuItem { | ||
154 | text: ItemUniqueName | 160 | text: ItemUniqueName | ||
155 | enabled: false | 161 | enabled: false | ||
156 | } | 162 | } | ||
157 | PlasmaComponents.MenuItem { | 163 | PlasmaComponents.MenuItem { | ||
158 | text: stateChangeButton.text | 164 | text: stateChangeButton.text | ||
▲ Show 20 Lines • Show All 246 Lines • Show Last 20 Lines |