@@ -28,18 +28,6 @@ UbuntuShape {
29 property alias unityMenuModel: repeater.model
29 property alias unityMenuModel: repeater.model
31− readonly property real __ajustedMinimumHeight: {
32− if (listView.contentHeight > __minimumHeight) {
33− return __minimumHeight;
35− return Math.max(listView.contentHeight, units.gu(2));
38− readonly property real __minimumWidth: units.gu(20)
39− readonly property real __maximumWidth: Screen.width * 0.7
40− readonly property real __minimumHeight: units.gu(30)
41− readonly property real __maximumHeight: Screen.height * 0.7
43 function show() {
31 function show() {
44 visible = true;
32 visible = true;
45 focusScope.forceActiveFocus();
33 focusScope.forceActiveFocus();
@@ -75,6 +63,11 @@ UbuntuShape {
75 property Item hoveredItem: null
63 property Item hoveredItem: null
76 readonly property int currentIndex: currentItem ? currentItem.__ownIndex : -1
64 readonly property int currentIndex: currentItem ? currentItem.__ownIndex : -1
66+ property real __minimumWidth: units.gu(20)
67+ property real __maximumWidth: Screen.width * 0.7
68+ property real __minimumHeight: units.gu(2)
69+ property real __maximumHeight: Screen.height * 0.7
78 signal dismissAll()
71 signal dismissAll()
80 onCurrentItemChanged: {
73 onCurrentItemChanged: {
@@ -121,7 +114,7 @@ UbuntuShape {
121 id: container
114 id: container
122 objectName: "container"
115 objectName: "container"
124− height: MathUtils.clamp(listView.contentHeight, __ajustedMinimumHeight, __maximumHeight)
117+ height: MathUtils.clamp(listView.contentHeight, d.__minimumHeight, d.__maximumHeight)
125 width: menuColumn.width
118 width: menuColumn.width
126 spacing: 0
119 spacing: 0
@@ -221,6 +214,8 @@ UbuntuShape {
221 id: menuColumn
214 id: menuColumn
222 spacing: 0
215 spacing: 0
217+ width: MathUtils.clamp(implicitWidth, d.__minimumWidth, d.__maximumWidth)
224 Repeater {
219 Repeater {
225 id: repeater
220 id: repeater
@@ -251,7 +246,7 @@ UbuntuShape {
251 menuData: model
246 menuData: model
252 objectName: loader.objectName + "-actionItem"
247 objectName: loader.objectName + "-actionItem"
254− width: MathUtils.clamp(implicitWidth, __minimumWidth, __maximumWidth)
249+ width: MathUtils.clamp(implicitWidth, d.__minimumWidth, d.__maximumWidth)
256 action.onTriggered: {
251 action.onTriggered: {
257 d.currentItem = loader;
252 d.currentItem = loader;