on xenial help sign in
Auto scroll. Maximum height to bottom of screen
commitd67b8be654a9ed62e63416821dd4a99b21f2bd8b authorNick Dedekind <nick.dedekind@canonical.com> dateMon 23 Jan 2017, 09:01 (10 years ago) parentc1fc94e
1 file changed+26−3
qml/ApplicationMenus/MenuPopup.qml+26−3
qml/ApplicationMenus/MenuPopup.qml+26−3
@@ -66,7 +66,7 @@ UbuntuShape {
6666 property real __minimumWidth: units.gu(20)
6767 property real __maximumWidth: Screen.width * 0.7
6868 property real __minimumHeight: units.gu(2)
69− property real __maximumHeight: Screen.height * 0.7
69+ property real __maximumHeight: Screen.height - mapToItem(null, 0, y).y
7070
7171 signal dismissAll()
7272
@@ -147,8 +147,20 @@ UbuntuShape {
147147 }
148148
149149 MouseArea {
150+ id: previousMA
150151 anchors.fill: parent
151− onPressed: {
152+ hoverEnabled: enabled
153+ onPressed: progress()
154+
155+ Timer {
156+ running: previousMA.containsMouse && !listView.atYBeginning
157+ interval: 1000
158+ repeat: true
159+ onTriggered: previousMA.progress()
160+ }
161+
162+ function progress() {
163+ console.log("progress!")
152164 var item = menuColumn.childAt(0, listView.contentY);
153165 if (item) {
154166 var previousItem = item;
@@ -349,8 +361,19 @@ UbuntuShape {
349361 }
350362
351363 MouseArea {
364+ id: nextMA
352365 anchors.fill: parent
353− onPressed: {
366+ hoverEnabled: enabled
367+ onPressed: progress()
368+
369+ Timer {
370+ running: nextMA.containsMouse && !listView.atYEnd
371+ interval: 1000
372+ repeat: true
373+ onTriggered: nextMA.progress()
374+ }
375+
376+ function progress() {
354377 var item = menuColumn.childAt(0, listView.contentY + listView.height);
355378 if (item) {
356379 var nextItem = item;