@@ -28,18 +28,6 @@ UbuntuShape {
2828
2929 property alias unityMenuModel: repeater.model
3030
31− readonly property real __ajustedMinimumHeight: {
32− if (listView.contentHeight > __minimumHeight) {
33− return __minimumHeight;
34− }
35− return Math.max(listView.contentHeight, units.gu(2));
36− }
37−
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
42−
4331 function show() {
4432 visible = true;
4533 focusScope.forceActiveFocus();
@@ -75,6 +63,11 @@ UbuntuShape {
7563 property Item hoveredItem: null
7664 readonly property int currentIndex: currentItem ? currentItem.__ownIndex : -1
7765
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
70+
7871 signal dismissAll()
7972
8073 onCurrentItemChanged: {
@@ -121,7 +114,7 @@ UbuntuShape {
121114 id: container
122115 objectName: "container"
123116
124− height: MathUtils.clamp(listView.contentHeight, __ajustedMinimumHeight, __maximumHeight)
117+ height: MathUtils.clamp(listView.contentHeight, d.__minimumHeight, d.__maximumHeight)
125118 width: menuColumn.width
126119 spacing: 0
127120
@@ -221,6 +214,8 @@ UbuntuShape {
221214 id: menuColumn
222215 spacing: 0
223216
217+ width: MathUtils.clamp(implicitWidth, d.__minimumWidth, d.__maximumWidth)
218+
224219 Repeater {
225220 id: repeater
226221
@@ -251,7 +246,7 @@ UbuntuShape {
251246 menuData: model
252247 objectName: loader.objectName + "-actionItem"
253248
254− width: MathUtils.clamp(implicitWidth, __minimumWidth, __maximumWidth)
249+ width: MathUtils.clamp(implicitWidth, d.__minimumWidth, d.__maximumWidth)
255250
256251 action.onTriggered: {
257252 d.currentItem = loader;