aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/Menu.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-05-11 07:05:08 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-05-11 08:28:47 +0000
commitd3a852fa25694134a5fc4bdc51a97abad19da775 (patch)
treee623a8cf0d7b4c07e391f826d7398f500397ad9b /src/imports/controls/Menu.qml
parent9eb7cff3dcdd6db967b57c6428cb5196ab45f2e0 (diff)
Menu: remove the extra margins
Since 0935e65, popup margins are negative by default. 0px or larger margins have to be set to keep a popup within the window bounds. In the same change, Menu gained also default margins. This seemed ok with context menus positioned at mouse coordinates, but doesn't look so nice in the Gallery example where the options menu was pushed too far out of top right corner. This change restores the old behavior that menus are kept within the window bounds with 0 margins. Change-Id: Ib728c22ebbdc2b9fa2d402eb4d4a11a638331a02 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/Menu.qml')
-rw-r--r--src/imports/controls/Menu.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/controls/Menu.qml b/src/imports/controls/Menu.qml
index 6558c745..e349a89d 100644
--- a/src/imports/controls/Menu.qml
+++ b/src/imports/controls/Menu.qml
@@ -46,7 +46,7 @@ T.Menu {
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding
- margins: 6
+ margins: 0
//! [contentItem]
contentItem: ListView {