Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/package/contents/ui/ItemListView.qml
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 41 | property int itemHeight: Math.ceil((Math.max(theme.mSize(theme.defaultFont).height, units.iconSizes.small) | |||
---|---|---|---|---|---|
43 | listItemSvg.margins.top + listItemSvg.margins.bottom)) / 2) * 2 | 43 | listItemSvg.margins.top + listItemSvg.margins.bottom)) / 2) * 2 | ||
44 | property int separatorHeight: lineSvg.horLineHeight + (2 * units.smallSpacing) | 44 | property int separatorHeight: lineSvg.horLineHeight + (2 * units.smallSpacing) | ||
45 | 45 | | |||
46 | property alias currentIndex: listView.currentIndex | 46 | property alias currentIndex: listView.currentIndex | ||
47 | property alias currentItem: listView.currentItem | 47 | property alias currentItem: listView.currentItem | ||
48 | property alias keyNavigationWraps: listView.keyNavigationWraps | 48 | property alias keyNavigationWraps: listView.keyNavigationWraps | ||
49 | property alias showChildDialogs: listView.showChildDialogs | 49 | property alias showChildDialogs: listView.showChildDialogs | ||
50 | property alias model: listView.model | 50 | property alias model: listView.model | ||
51 | property alias count: listView.count | ||||
51 | property alias containsMouse: listener.containsMouse | 52 | property alias containsMouse: listener.containsMouse | ||
52 | property alias resetOnExitDelay: resetIndexTimer.interval | 53 | property alias resetOnExitDelay: resetIndexTimer.interval | ||
53 | 54 | | |||
54 | onFocusParentChanged: { | 55 | onFocusParentChanged: { | ||
55 | appendSearchText.connect(focusParent.appendSearchText); | 56 | appendSearchText.connect(focusParent.appendSearchText); | ||
56 | } | 57 | } | ||
57 | 58 | | |||
58 | Timer { | 59 | Timer { | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 110 | MouseEventListener { | |||
113 | 114 | | |||
114 | hoverEnabled: true | 115 | hoverEnabled: true | ||
115 | 116 | | |||
116 | onContainsMouseChanged: { | 117 | onContainsMouseChanged: { | ||
117 | listView.eligibleWidth = listView.width; | 118 | listView.eligibleWidth = listView.width; | ||
118 | 119 | | |||
119 | if (containsMouse) { | 120 | if (containsMouse) { | ||
120 | resetIndexTimer.stop(); | 121 | resetIndexTimer.stop(); | ||
122 | itemList.forceActiveFocus(); | ||||
121 | } else if ((!childDialog || !dialog) | 123 | } else if ((!childDialog || !dialog) | ||
122 | && (!currentItem || !currentItem.menu.opened)) { | 124 | && (!currentItem || !currentItem.menu.opened)) { | ||
123 | resetIndexTimer.start(); | 125 | resetIndexTimer.start(); | ||
124 | } | 126 | } | ||
125 | } | 127 | } | ||
126 | 128 | | |||
127 | PlasmaExtras.ScrollArea { | 129 | PlasmaExtras.ScrollArea { | ||
128 | anchors.fill: parent | 130 | anchors.fill: parent | ||
Show All 22 Lines | 134 | ListView { | |||
151 | } | 153 | } | ||
152 | 154 | | |||
153 | onCountChanged: { | 155 | onCountChanged: { | ||
154 | currentIndex = -1; | 156 | currentIndex = -1; | ||
155 | } | 157 | } | ||
156 | 158 | | |||
157 | onCurrentIndexChanged: { | 159 | onCurrentIndexChanged: { | ||
158 | if (currentIndex != -1) { | 160 | if (currentIndex != -1) { | ||
159 | itemList.forceActiveFocus(); | | |||
160 | | ||||
161 | if (childDialog) { | 161 | if (childDialog) { | ||
162 | if (currentItem && currentItem.hasChildren) { | 162 | if (currentItem && currentItem.hasChildren) { | ||
163 | childDialog.model = model.modelForRow(currentIndex); | 163 | childDialog.model = model.modelForRow(currentIndex); | ||
164 | childDialog.visualParent = listView.currentItem; | 164 | childDialog.visualParent = listView.currentItem; | ||
165 | } else { | 165 | } else { | ||
166 | childDialog.delayedDestroy(); | 166 | childDialog.delayedDestroy(); | ||
167 | } | 167 | } | ||
168 | 168 | | |||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |