on xenial help sign in
Cool equation
commit28d9cb4a75caf59d9a43f9e3f932f39b03c550cb authorJosh Arenson <joshua.arenson@canonical.com> dateWed 6 Jul 2016, 17:27 (10 years ago) parentd365dfc
1 file changed+21−17
qml/Greeter/SessionsList.qml+21−17
qml/Greeter/SessionsList.qml+21−17
@@ -75,31 +75,35 @@ Item {
7575
7676 headerPositioning: ListView.OverlayHeader
7777
78− highlight: Rectangle {
79− color:"transparent"
80− border {
81− color: theme.palette.normal.positionText
82− width: units.gu(0.2)
83− }
78+ highlight: Component {
79+ Rectangle {
80+ color:"transparent"
81+ border {
82+ color: theme.palette.normal.positionText
83+ width: units.gu(0.2)
84+ }
8485
85− visible: sessionsList.currentItem.visible
86+ visible: sessionsList.currentItem.visible
87+ }
8688 }
8789
90+ property real contentBottom: contentY + height
8891 delegate: ListItem {
8992 id: delegate
9093
9194 divider.visible: false
92− visible: y > sessionsList.headerItem.y
93− + sessionsList.headerItem.height
94− - sessionsList.anchors.margins
95−
96− /*property bool showHighlight: visible &&
97− (sessionsList.currentIndex * height)
98− - sessionsList.contentY
99− < sessionsList.height + sessionsList.anchors.margins
100− */
10195
102− MouseArea {
96+ /*visible: y > sessionsList.headerItem.y
97+ + sessionsList.headerItem.height
98+ - sessionsList.anchors.margins*/
99+
100+ property real jam: sessionsList.headerItem.height
101+ visible: (
102+ (y >= sessionsList.contentY && y <= sessionsList.contentBottom)
103+ || (y + height - jam >= sessionsList.contentY
104+ && y + height <= sessionsList.contentBottom))
105+ //onIsVisibleChanged: console.log(index + ":" + isVisible)
106+ MouseArea {
103107 anchors.fill: parent
104108 onClicked: {
105109 sessionsList.currentIndex = index