Merge lp:~mefrio-g/ubuntu-clock-app/fix-1272470 into lp:ubuntu-clock-app/saucy

Proposed by Mario Guerriero
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 309
Merged at revision: 309
Proposed branch: lp:~mefrio-g/ubuntu-clock-app/fix-1272470
Merge into: lp:ubuntu-clock-app/saucy
Diff against target: 44 lines (+14/-3)
1 file modified
ubuntu-clock-app.qml (+14/-3)
To merge this branch: bzr merge lp:~mefrio-g/ubuntu-clock-app/fix-1272470
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nekhelesh Ramananthan Approve
Review via email: mp+203796@code.launchpad.net

Commit message

To post a comment you must log in.
309. By Mario Guerriero

fix for the previous commit

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

lgtm and works as expected. Nice work Mario!

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu-clock-app.qml'
2--- ubuntu-clock-app.qml 2014-01-13 12:13:55 +0000
3+++ ubuntu-clock-app.qml 2014-01-29 17:28:05 +0000
4@@ -39,20 +39,31 @@
5 // Properties of this page
6 applicationName: "com.ubuntu.clock"
7
8- width: units.gu(50)
9- height: units.gu(75)
10+ width: minimumWidth
11+ height: minimumHeight
12+
13+ // StateSaver properties
14+ StateSaver.properties: "width, height"
15
16 headerColor: "#57365E"
17 backgroundColor: "#A55263"
18 footerColor: "#D75669"
19
20 // New properties of this page
21+ readonly property real minimumWidth: units.gu(50)
22+ readonly property real minimumHeight: units.gu(75)
23 property var now
24
25 // Initialization after page has loaded
26 Component.onCompleted: {
27 // Any init here
28 Utils.log("MainView loaded");
29+ // When root component is completed the StateSaver restore it to previous dimensions.
30+ // If it is too small, set height and width to a proper size.
31+ if((root.width < minimumWidth) || (root.height < minimumHeight)){
32+ root.width = minimumWidth
33+ root.height = minimumHeight
34+ }
35 }
36
37 actions: [
38@@ -217,4 +228,4 @@
39 }
40 }
41 }
42-}
43+}
44\ No newline at end of file

Subscribers

People subscribed via source and target branches