Merge lp:~ken-vandine/ubuntu-system-settings/fixed_width into lp:ubuntu-system-settings

Proposed by Ken VanDine
Status: Merged
Approved by: Jonas G. Drange
Approved revision: 1595
Merged at revision: 1594
Proposed branch: lp:~ken-vandine/ubuntu-system-settings/fixed_width
Merge into: lp:ubuntu-system-settings
Diff against target: 26 lines (+5/-0)
2 files modified
src/main.cpp (+1/-0)
src/qml/MainWindow.qml (+4/-0)
To merge this branch: bzr merge lp:~ken-vandine/ubuntu-system-settings/fixed_width
Reviewer Review Type Date Requested Status
Jonas G. Drange (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+285090@code.launchpad.net

Commit message

Set a fixed width to 50 GU when in windowed mode

Description of the change

Set a fixed width to 50 GU when in windowed mode

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
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1594. By Ken VanDine

tagged bug

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Mardegan (mardy) wrote :

There is no need to allocate the QQuickView on the heap, is there?

1595. By Ken VanDine

Don't allocate the QQuickView on the heap

Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

Cool! Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/main.cpp'
2--- src/main.cpp 2015-12-21 16:12:12 +0000
3+++ src/main.cpp 2016-02-08 14:27:11 +0000
4@@ -93,6 +93,7 @@
5 view.rootContext()->setContextProperty("defaultPlugin", defaultPlugin);
6 view.rootContext()->setContextProperty("i18nDirectory", I18N_DIRECTORY);
7 view.rootContext()->setContextProperty("pluginOptions", pluginOptions);
8+ view.rootContext()->setContextProperty("view", &view);
9 view.setSource(QUrl("qrc:/qml/MainWindow.qml"));
10 view.show();
11
12
13=== modified file 'src/qml/MainWindow.qml'
14--- src/qml/MainWindow.qml 2015-08-10 13:31:45 +0000
15+++ src/qml/MainWindow.qml 2016-02-08 14:27:11 +0000
16@@ -64,6 +64,10 @@
17 if (!loadPluginByName(defaultPlugin, pluginOptions))
18 Qt.quit()
19 }
20+
21+ // when running in windowed mode, use a fixed width
22+ view.minimumWidth = units.gu(50)
23+ view.maximumWidth = units.gu(50)
24 }
25
26 Connections {

Subscribers

People subscribed via source and target branches