Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/ConnectionItem.qml
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 41 | (Type == PlasmaNM.Enums.Wired || | |||
---|---|---|---|---|---|
43 | Type == PlasmaNM.Enums.Gsm || | 43 | Type == PlasmaNM.Enums.Gsm || | ||
44 | Type == PlasmaNM.Enums.Cdma) | 44 | Type == PlasmaNM.Enums.Cdma) | ||
45 | property bool visibleDetails: false | 45 | property bool visibleDetails: false | ||
46 | property bool visiblePasswordDialog: false | 46 | property bool visiblePasswordDialog: false | ||
47 | 47 | | |||
48 | property real rxBytes: 0 | 48 | property real rxBytes: 0 | ||
49 | property real txBytes: 0 | 49 | property real txBytes: 0 | ||
50 | 50 | | |||
51 | checked: connectionItem.containsMouse | | |||
52 | enabled: true | 51 | enabled: true | ||
53 | height: expanded ? baseHeight + separator.height + expandableComponentLoader.height + (2 * Math.round(units.gridUnit / 3)) : baseHeight | 52 | height: expanded ? baseHeight + separator.height + expandableComponentLoader.height + (2 * Math.round(units.gridUnit / 3)) : baseHeight | ||
54 | 53 | | |||
54 | onContainsMouseChanged: { | ||||
ngraham: `ConnectionItem.qml` already has `onContainsMouseChanged` (at the bottom of the file); add the… | |||||
55 | if (containsMouse) { | ||||
56 | devicesView.currentIndex = index | ||||
57 | } else { | ||||
58 | devicesView.currentIndex = -1 | ||||
59 | } | ||||
60 | } | ||||
55 | ColumnLayout { | 61 | ColumnLayout { | ||
56 | anchors.fill: parent | 62 | anchors.fill: parent | ||
57 | 63 | | |||
58 | RowLayout { | 64 | RowLayout { | ||
59 | Layout.fillWidth: true | 65 | Layout.fillWidth: true | ||
60 | spacing: Math.round(units.gridUnit / 2) | 66 | spacing: Math.round(units.gridUnit / 2) | ||
61 | 67 | | |||
62 | PlasmaCore.SvgItem { | 68 | PlasmaCore.SvgItem { | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 107 | PlasmaComponents.BusyIndicator { | |||
106 | running: plasmoid.expanded && !stateChangeButton.visible && ConnectionState == PlasmaNM.Enums.Activating | 112 | running: plasmoid.expanded && !stateChangeButton.visible && ConnectionState == PlasmaNM.Enums.Activating | ||
107 | visible: running | 113 | visible: running | ||
108 | opacity: visible | 114 | opacity: visible | ||
109 | } | 115 | } | ||
110 | 116 | | |||
111 | PlasmaComponents.Button { | 117 | PlasmaComponents.Button { | ||
112 | id: stateChangeButton | 118 | id: stateChangeButton | ||
113 | Layout.alignment: Qt.AlignVCenter | Qt.AlignRight | 119 | Layout.alignment: Qt.AlignVCenter | Qt.AlignRight | ||
120 | Layout.rightMargin: Math.round(units.gridUnit / 2) | ||||
114 | opacity: connectionView.currentVisibleButtonIndex == index ? 1 : 0 | 121 | opacity: connectionView.currentVisibleButtonIndex == index ? 1 : 0 | ||
115 | visible: opacity != 0 | 122 | visible: opacity != 0 | ||
116 | text: (ConnectionState == PlasmaNM.Enums.Deactivated) ? i18n("Connect") : i18n("Disconnect") | 123 | text: (ConnectionState == PlasmaNM.Enums.Deactivated) ? i18n("Connect") : i18n("Disconnect") | ||
117 | 124 | | |||
118 | Behavior on opacity { NumberAnimation { duration: units.shortDuration } } | 125 | Behavior on opacity { NumberAnimation { duration: units.shortDuration } } | ||
119 | 126 | | |||
120 | onClicked: changeState() | 127 | onClicked: changeState() | ||
121 | } | 128 | } | ||
▲ Show 20 Lines • Show All 325 Lines • Show Last 20 Lines |
ConnectionItem.qml already has onContainsMouseChanged (at the bottom of the file); add the new stuff there.