Size set in Window{} is not respected in desktop mode

Bug #1584907 reported by Michal Predotka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity8 (Ubuntu)
Triaged
High
Unassigned

Bug Description

bq M10 rc-proposed r111

If I set width and height in Window component and run the app on tablet in desktop mode, the window size is not as I set.
I set width and height to be units.gu 70x70 but the result is 60x47. See the screenshot please. When I try the same app on my desktop running 16.04 the result is correct (70x70).

Code I used:

import QtQuick 2.4
import Ubuntu.Components 1.3
import QtQuick.Window 2.2

Window {
    id: root_window

    visible: true
    title: i18n.tr("My cool app's name")

    width: units.gu(70)
    height: units.gu(70)

    minimumWidth: units.gu(40)
    minimumHeight: units.gu(40)

    MainView {

        // Note! applicationName needs to match the "name" field of the click manifest
        applicationName: "windowsize.mivoligo"
        anchors.fill: parent

        Text {
            id: window_size

            text: "width = " + root_window.width / units.gu(1) + " height = " + root_window.height / units.gu(1)
            anchors.centerIn: parent
        }
    }
}

Revision history for this message
Michal Predotka (mpredotka) wrote :
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Note that those values are only honored the first time an application starts. if the user resizes it, that's what unity will remember.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

can you delete ~/.cache/unity/windowstatestorage.sqlite and try again?

Changed in unity8 (Ubuntu):
status: New → Incomplete
Revision history for this message
Michal Predotka (mpredotka) wrote :

This was the very first start. :)
I deleted the database and tried again just now and the result is the same 60x47.

Changed in unity8 (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.