Merge lp:~saviq/ubuntu-system-settings/dynamic-gu-support into lp:ubuntu-system-settings

Proposed by Michał Sawicz
Status: Merged
Approved by: Ken VanDine
Approved revision: 1596
Merged at revision: 1641
Proposed branch: lp:~saviq/ubuntu-system-settings/dynamic-gu-support
Merge into: lp:ubuntu-system-settings
Diff against target: 27 lines (+5/-5)
1 file modified
src/qml/MainWindow.qml (+5/-5)
To merge this branch: bzr merge lp:~saviq/ubuntu-system-settings/dynamic-gu-support
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+286521@code.launchpad.net

Commit message

Dynamic grid unit size support

Also let the view be resized between 40 and 50 GU wide, since that's what will happen on phones anyway.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/MainWindow.qml'
2--- src/qml/MainWindow.qml 2016-02-04 16:26:15 +0000
3+++ src/qml/MainWindow.qml 2016-02-18 15:21:46 +0000
4@@ -25,8 +25,8 @@
5
6 MainView {
7 id: main
8- width: units.gu(50)
9- height: units.gu(90)
10+ implicitWidth: units.gu(50)
11+ implicitHeight: units.gu(90)
12 applicationName: "ubuntu-system-settings"
13 objectName: "systemSettingsMainView"
14 automaticOrientation: true
15@@ -65,9 +65,9 @@
16 Qt.quit()
17 }
18
19- // when running in windowed mode, use a fixed width
20- view.minimumWidth = units.gu(50)
21- view.maximumWidth = units.gu(50)
22+ // when running in windowed mode, constrain width
23+ view.minimumWidth = Qt.binding( function() { return units.gu(40) } )
24+ view.maximumWidth = Qt.binding( function() { return units.gu(50) } )
25 }
26
27 Connections {

Subscribers

People subscribed via source and target branches