Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.