Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/package/contents/ui/ItemListView.qml
Show All 21 Lines | |||||
22 | import org.kde.plasma.core 2.0 as PlasmaCore | 22 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | 23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
24 | import org.kde.plasma.extras 2.0 as PlasmaExtras | 24 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
25 | import org.kde.kquickcontrolsaddons 2.0 | 25 | import org.kde.kquickcontrolsaddons 2.0 | ||
26 | 26 | | |||
27 | FocusScope { | 27 | FocusScope { | ||
28 | id: itemList | 28 | id: itemList | ||
29 | 29 | | |||
30 | width: units.gridUnit * 14 | 30 | property real minimumWidth: units.gridUnit * 14 | ||
31 | property real maximumWidth: minimumWidth * 2 | ||||
32 | | ||||
33 | width: minimumWidth | ||||
31 | height: listView.contentHeight | 34 | height: listView.contentHeight | ||
32 | 35 | | |||
33 | signal exited | 36 | signal exited | ||
34 | signal keyNavigationAtListEnd | 37 | signal keyNavigationAtListEnd | ||
35 | signal appendSearchText(string text) | 38 | signal appendSearchText(string text) | ||
36 | 39 | | |||
37 | property Item focusParent: null | 40 | property Item focusParent: null | ||
38 | property QtObject dialog: null | 41 | property QtObject dialog: null | ||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 137 | ListView { | |||
139 | 142 | | |||
140 | currentIndex: -1 | 143 | currentIndex: -1 | ||
141 | 144 | | |||
142 | boundsBehavior: Flickable.StopAtBounds | 145 | boundsBehavior: Flickable.StopAtBounds | ||
143 | snapMode: ListView.SnapToItem | 146 | snapMode: ListView.SnapToItem | ||
144 | spacing: 0 | 147 | spacing: 0 | ||
145 | keyNavigationWraps: (dialog != null) | 148 | keyNavigationWraps: (dialog != null) | ||
146 | 149 | | |||
147 | delegate: ItemListDelegate {} | 150 | delegate: ItemListDelegate { | ||
151 | onFullTextWidthChanged: { | ||||
152 | if (fullTextWidth > itemList.width) itemList.width = Math.min(fullTextWidth, itemList.maximumWidth); | ||||
153 | } | ||||
154 | } | ||||
148 | 155 | | |||
149 | highlight: PlasmaComponents.Highlight { | 156 | highlight: PlasmaComponents.Highlight { | ||
150 | visible: listView.currentItem && !listView.currentItem.isSeparator | 157 | visible: listView.currentItem && !listView.currentItem.isSeparator | ||
151 | } | 158 | } | ||
152 | 159 | | |||
153 | highlightMoveDuration: 0 | 160 | highlightMoveDuration: 0 | ||
154 | 161 | | |||
155 | onCountChanged: { | 162 | onCountChanged: { | ||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |