Changeset View
Changeset View
Standalone View
Standalone View
applets/clipboard/contents/ui/ClipboardItemDelegate.qml
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 27 | PlasmaComponents.ListItem { | |||
---|---|---|---|---|---|
42 | 42 | | |||
43 | enabled: true | 43 | enabled: true | ||
44 | 44 | | |||
45 | onClicked: { | 45 | onClicked: { | ||
46 | menuItem.itemSelected(UuidRole); | 46 | menuItem.itemSelected(UuidRole); | ||
47 | if (plasmoid.hideOnWindowDeactivate) | 47 | if (plasmoid.hideOnWindowDeactivate) | ||
48 | plasmoid.expanded = false; | 48 | plasmoid.expanded = false; | ||
49 | } | 49 | } | ||
50 | onContainsMouseChanged: { | 50 | function onContainsMouseChanged() { | ||
51 | if (containsMouse) { | 51 | if (containsMouse) { | ||
52 | menuListView.currentIndex = index | 52 | menuListView.currentIndex = index | ||
53 | } else { | 53 | } else { | ||
54 | menuListView.currentIndex = -1 | 54 | menuListView.currentIndex = -1 | ||
55 | } | 55 | } | ||
56 | } | 56 | } | ||
57 | 57 | | |||
58 | ListView.onIsCurrentItemChanged: { | 58 | ListView.onIsCurrentItemChanged: { | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
110 | Loader { | 110 | Loader { | ||
111 | id: toolButtonsLoader | 111 | id: toolButtonsLoader | ||
112 | anchors { | 112 | anchors { | ||
113 | right: label.right | 113 | right: label.right | ||
114 | verticalCenter: parent.verticalCenter | 114 | verticalCenter: parent.verticalCenter | ||
115 | } | 115 | } | ||
116 | source: "DelegateToolButtons.qml" | 116 | source: "DelegateToolButtons.qml" | ||
117 | active: menuItem.ListView.isCurrentItem | 117 | active: menuItem.ListView.isCurrentItem | ||
118 | onActiveChanged: { | 118 | function onActiveChanged() { | ||
119 | if (active) { | 119 | if (active) { | ||
120 | // break binding, once it was loaded, never unload | 120 | // break binding, once it was loaded, never unload | ||
121 | active = true; | 121 | active = true; | ||
122 | } | 122 | } | ||
123 | } | 123 | } | ||
124 | } | 124 | } | ||
125 | } | 125 | } |