~aacid/unity8/closeMenusOnClick

« back to all changes in this revision

Viewing changes to qml/Stage/WindowResizeArea.qml

  • Committer: Daniel d'Andrada
  • Date: 2017-01-26 11:10:01 UTC
  • mto: (2768.1.36 unity8)
  • mto: This revision was merged to the branch mainline in revision 2774.
  • Revision ID: daniel.dandrada@canonical.com-20170126111001-58tdrv3epkpgid28
Initial support for child windows (menus, dialogs, tooltips)

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    // The area will anchor to it and manage resize events
33
33
    property Item target: null
34
34
    property int borderThickness: 0
35
 
    property real minimumY: -100000000 // By default, impose no limit
 
35
    property Item boundsItem
36
36
    property int minWidth: 0
37
37
    property int minHeight: 0
38
38
 
243
243
        }
244
244
 
245
245
        if (d.topBorder) {
246
 
            var newTargetY = Math.max(d.startY + deltaY, root.minimumY);
 
246
            var bounds = boundsItem.mapToItem(target.parent, 0, 0, boundsItem.width, boundsItem.height);
 
247
            var newTargetY = Math.max(d.startY + deltaY, bounds.y);
247
248
            var bottomBorderY = target.windowedY + target.height;
248
249
            if (bottomBorderY > newTargetY + d.minimumHeight) {
249
250
                if (bottomBorderY < newTargetY + d.maximumHeight) {