mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 17:54:45 +00:00
[phonebook] Make use of the SectionScroller
This commit is contained in:
parent
f45474eba3
commit
4267242ac0
1 changed files with 11 additions and 4 deletions
|
|
@ -29,13 +29,16 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||||
|
|
||||||
PlasmaExtras.ScrollArea {
|
PlasmaExtras.ScrollArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
verticalScrollBarPolicy: Qt.ScrollBarAsNeeded
|
verticalScrollBarPolicy: Qt.ScrollBarAlwaysOff
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
id: contactsList
|
id: contactsList
|
||||||
|
|
||||||
property bool delegateSelected: false
|
property bool delegateSelected: false
|
||||||
|
|
||||||
|
|
||||||
|
section.property: "display"
|
||||||
|
section.criteria: ViewSection.FirstCharacter
|
||||||
clip: true
|
clip: true
|
||||||
model: PlasmaCore.SortFilterModel {
|
model: PlasmaCore.SortFilterModel {
|
||||||
sortRole: "display"
|
sortRole: "display"
|
||||||
|
|
@ -45,6 +48,10 @@ PlasmaExtras.ScrollArea {
|
||||||
}
|
}
|
||||||
|
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
highlight: PlasmaComponents.Highlight {
|
||||||
|
hover: contactsList.focus
|
||||||
|
}
|
||||||
|
highlightMoveDuration: 0
|
||||||
|
|
||||||
delegate: PlasmaComponents.ListItem {
|
delegate: PlasmaComponents.ListItem {
|
||||||
height: units.gridUnit * 6
|
height: units.gridUnit * 6
|
||||||
|
|
@ -172,9 +179,9 @@ PlasmaExtras.ScrollArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
highlight: PlasmaComponents.Highlight {
|
CustomSectionScroller {
|
||||||
hover: contactsList.focus
|
listView: contactsList
|
||||||
}
|
}
|
||||||
highlightMoveDuration: 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue