~nik90/ubuntu-clock-app/add-timer-placeholder-text

« back to all changes in this revision

Viewing changes to ubuntu-clock-app.qml

  • Committer: Tarmac
  • Author(s): Mario Guerriero
  • Date: 2014-01-29 17:38:18 UTC
  • mfrom: (308.2.1 ubuntu-clock-app)
  • Revision ID: tarmac-20140129173818-z668ktvkp6fn4mcw
Fixes bug 1272470. Fixes: https://bugs.launchpad.net/bugs/1272470.

Approved by Ubuntu Phone Apps Jenkins Bot, Nekhelesh Ramananthan.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    // Properties of this page
40
40
    applicationName: "com.ubuntu.clock"
41
41
 
42
 
    width: units.gu(50)
43
 
    height: units.gu(75)
 
42
    width: minimumWidth
 
43
    height: minimumHeight
 
44
 
 
45
    // StateSaver properties
 
46
    StateSaver.properties: "width, height"
44
47
 
45
48
    headerColor: "#57365E"
46
49
    backgroundColor: "#A55263"
47
50
    footerColor: "#D75669"
48
51
 
49
52
    // New properties of this page
 
53
    readonly property real minimumWidth: units.gu(50)
 
54
    readonly property real minimumHeight: units.gu(75)
50
55
    property var now
51
56
 
52
57
    // Initialization after page has loaded
53
58
    Component.onCompleted: {
54
59
        // Any init here
55
60
        Utils.log("MainView loaded");
 
61
        // When root component is completed the StateSaver restore it to previous dimensions.
 
62
        // If it is too small, set height and width to a proper size.
 
63
        if((root.width < minimumWidth) || (root.height < minimumHeight)){
 
64
            root.width = minimumWidth
 
65
            root.height = minimumHeight
 
66
        }
56
67
    }
57
68
 
58
69
    actions: [
217
228
            }
218
229
        }
219
230
    }
220
 
}
 
231
}
 
 
b'\\ No newline at end of file'