~zsombi/ubuntu-ui-toolkit/dialogFacelift

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/Popups/1.2/Dialog.qml

  • Committer: Tarmac
  • Author(s): Christian Dywan
  • Date: 2015-11-25 16:59:41 UTC
  • mfrom: (1724.2.1 uut.monologs)
  • Revision ID: tarmac-20151125165941-z2pyfn43jj1celwy
Explicitly handle keyboard anchoring in dialog foreground. Fixes: https://bugs.launchpad.net/bugs/1376763.

Approved by PS Jenkins bot, Zsombor Egri.

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
        activeFocusOnPress: true
157
157
        width: Math.min(minimumWidth, dialog.width)
158
158
        anchors.centerIn: parent
 
159
        clip: true
 
160
        objectName: 'dialogForeground'
159
161
 
160
162
        // used in the style
161
163
        property string title
166
168
        property real margins: units.gu(4)
167
169
        property real itemSpacing: units.gu(2)
168
170
        property Item dismissArea: dialog.dismissArea
 
171
        property real keyboardHeight: dialog.anchorToKeyboard && UbuntuApplication.inputMethod.visible ? UbuntuApplication.inputMethod.keyboardRectangle.height : 0
169
172
 
170
 
        height: Math.min(contentsColumn.height + foreground.margins, dialog.height)
 
173
        height: Math.min(contentsColumn.height + foreground.margins, dialog.height - keyboardHeight)
171
174
 
172
175
        Flickable {
173
176
            anchors.fill: parent