0

When I create a dialog with the Ubuntu SDK, like in the example below, the dialog covers the full mainview:

import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.Popups 0.1


MainView {
    id: root
    applicationName: "pd"

    width: units.gu(54)
    height: units.gu(96)

    Button {
        id: mb
        text: "Party Down"
        width: parent.width * 0.8
        anchors.centerIn: parent
        onClicked: PopupUtils.open(Qt.createComponent("fundialog.qml"), mb)
    }
}

fundialog.qml :

import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.Popups 0.1

Dialog {
    id: fundialog
    title: "Are we having fun yet?"
    width: units.gu(10)
    height: units.gu(10)
    Button {
        text: "Cancel"
        onClicked: PopupUtils.close(fundialog)
    }
}

enter image description here

I would like it to look as in the Ubuntu SDK Gallery:

enter image description here

However, I can't figure out where in the gallery code this behavior is fixed.

1 Answer 1

2

The Dialog will use the full screen if the screen is small, ie. if its width is smaller than a given width. This behaviour is not modifiable at the moment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .