~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-big-radius

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/Popups/1.3/Popover.qml

  • Committer: Tarmac
  • Author(s): Christian Dywan
  • Date: 2015-07-03 15:39:34 UTC
  • mfrom: (1543.2.4 uut.popoverPonterTarget)
  • Revision ID: tarmac-20150703153934-rc7j35ewuqj7fgt3
Popover sizing should depend on whether it has a target.

Approved by PS Jenkins bot, Tim Peeters.

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
 
192
192
        // private
193
193
        function updatePosition() {
 
194
            if (pointerTarget && pointerTarget.parent)
 
195
                popover.y = (popover.parent.height - popover.height) / 2;
194
196
            var pos = new InternalPopupUtils.CallerPositioning(foreground, pointer, dismissArea, caller, pointerTarget, edgeMargins, callerMargin);
195
197
            pos.auto();
196
198
        }
200
202
    __eventGrabber.enabled: autoClose
201
203
    __closeOnDismissAreaPress: true
202
204
 
 
205
    y: parent ? (parent.height - height) / 2 : 0
 
206
 
203
207
    StyledItem {
204
208
        id: foreground
205
209
        activeFocusOnPress: true