on xenial help sign in
Cool equation
28d9cb4Josh Arenson
qml/Greeter/SessionsList.qml+21−17
@@ -75,31 +75,35 @@ Item {
75
75
76 headerPositioning: ListView.OverlayHeader
76 headerPositioning: ListView.OverlayHeader
77
77
78+ highlight: Component {
78− highlight: Rectangle {
79+ Rectangle {
79− color:"transparent"
80+ color:"transparent"
80− border {
81+ border {
81− color: theme.palette.normal.positionText
82+ color: theme.palette.normal.positionText
82− width: units.gu(0.2)
83+ width: units.gu(0.2)
83− }
84+ }
84
85
85− visible: sessionsList.currentItem.visible
86+ visible: sessionsList.currentItem.visible
87+ }
86 }
88 }
87
89
90+ property real contentBottom: contentY + height
88 delegate: ListItem {
91 delegate: ListItem {
89 id: delegate
92 id: delegate
90
93
91 divider.visible: false
94 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− */
101
95
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)
102− MouseArea {
106+ MouseArea {
103 anchors.fill: parent
107 anchors.fill: parent
104 onClicked: {
108 onClicked: {
105 sessionsList.currentIndex = index
109 sessionsList.currentIndex = index