on xenial help sign in
Auto scroll. Maximum height to bottom of screen
d67b8beNick Dedekind
qml/ApplicationMenus/MenuPopup.qml+26−3
@@ -66,7 +66,7 @@ UbuntuShape {
66 property real __minimumWidth: units.gu(20)
66 property real __minimumWidth: units.gu(20)
67 property real __maximumWidth: Screen.width * 0.7
67 property real __maximumWidth: Screen.width * 0.7
68 property real __minimumHeight: units.gu(2)
68 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
70
70
71 signal dismissAll()
71 signal dismissAll()
72
72
@@ -147,8 +147,20 @@ UbuntuShape {
147 }
147 }
148
148
149 MouseArea {
149 MouseArea {
150+ id: previousMA
150 anchors.fill: parent
151 anchors.fill: parent
152+ hoverEnabled: enabled
151− onPressed: {
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!")
152 var item = menuColumn.childAt(0, listView.contentY);
164 var item = menuColumn.childAt(0, listView.contentY);
153 if (item) {
165 if (item) {
154 var previousItem = item;
166 var previousItem = item;
@@ -349,8 +361,19 @@ UbuntuShape {
349 }
361 }
350
362
351 MouseArea {
363 MouseArea {
364+ id: nextMA
352 anchors.fill: parent
365 anchors.fill: parent
366+ hoverEnabled: enabled
353− onPressed: {
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() {
354 var item = menuColumn.childAt(0, listView.contentY + listView.height);
377 var item = menuColumn.childAt(0, listView.contentY + listView.height);
355 if (item) {
378 if (item) {
356 var nextItem = item;
379 var nextItem = item;