diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-05-06 16:29:21 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-05-10 12:47:20 +0000 |
commit | 0935e65a50f8a90569e300021ccaafabbead4e79 (patch) | |
tree | d059e88341ad2bb25904abf216fe892431c4dc5a /src/imports/controls/universal/ToolTip.qml | |
parent | 13bc1d6f34f6aa4425b318ea874270cd994ee336 (diff) |
Popup: use margins to determine whether to push inside window bounds
Previously, we were planning to introduce complex policy flags to make it
possible to specify whether a Popup is allowed to go outside the screen or not.
Using margins for that purpose avoids the need of introducing such dedicated
API just for that. From now on, margins are used to determine whether a popup
is pushed to fit inside the window bounds (margins removed), and implicit size
is used to determined whether a popup is resized to fit inside the window. In
other words, a popup with negative margins and no implicit size is allowed to
move outside the window bounds.
Change-Id: Ife1665755e4dae434751977ae3289eb1aa4f3c6d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/universal/ToolTip.qml')
-rw-r--r-- | src/imports/controls/universal/ToolTip.qml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/imports/controls/universal/ToolTip.qml b/src/imports/controls/universal/ToolTip.qml index ca87ae9f..705800c8 100644 --- a/src/imports/controls/universal/ToolTip.qml +++ b/src/imports/controls/universal/ToolTip.qml @@ -49,6 +49,7 @@ T.ToolTip { implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) + margins: 8 topPadding: 5 leftPadding: 8 rightPadding: 8 |