Merge lp:~boiko/dialer-app/fix_windowed_mode into lp:dialer-app

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 476
Merged at revision: 476
Proposed branch: lp:~boiko/dialer-app/fix_windowed_mode
Merge into: lp:dialer-app
Diff against target: 36 lines (+8/-0)
2 files modified
src/dialerapplication.cpp (+1/-0)
src/qml/dialer-app.qml (+7/-0)
To merge this branch: bzr merge lp:~boiko/dialer-app/fix_windowed_mode
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Tiago Salem Herrmann (community) Approve
Review via email: mp+276127@code.launchpad.net

Commit message

Restrict the window resizing in desktop mode.

Description of the change

Restrict the window resizing in desktop 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
Tiago Salem Herrmann (tiagosh) wrote :

Looks good, tested on the desktop and works fine.
thanks.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dialerapplication.cpp'
2--- src/dialerapplication.cpp 2015-07-24 21:58:48 +0000
3+++ src/dialerapplication.cpp 2015-10-29 13:39:39 +0000
4@@ -134,6 +134,7 @@
5 m_view->setTitle("Dialer");
6 m_view->rootContext()->setContextProperty("application", this);
7 m_view->rootContext()->setContextProperty("i18nDirectory", I18N_DIRECTORY);
8+ m_view->rootContext()->setContextProperty("view", m_view);
9 m_view->engine()->setBaseUrl(QUrl::fromLocalFile(dialerAppDirectory()));
10
11 // check if there is a contacts backend override
12
13=== modified file 'src/qml/dialer-app.qml'
14--- src/qml/dialer-app.qml 2015-09-07 15:45:25 +0000
15+++ src/qml/dialer-app.qml 2015-10-29 13:39:39 +0000
16@@ -53,6 +53,7 @@
17 automaticOrientation: false
18 width: units.gu(40)
19 height: units.gu(71)
20+
21 property bool hasCalls: callManager.hasCalls
22
23 signal applicationReady
24@@ -454,6 +455,12 @@
25 i18n.bindtextdomain("dialer-app", i18nDirectory)
26 pageStackNormalMode.push(Qt.createComponent("DialerPage/DialerPage.qml"))
27
28+ // when running in windowed mode, do not allow resizing
29+ view.minimumWidth = width * 0.9
30+ view.maximumWidth = width * 1.1
31+ view.minimumHeight = height * 0.9
32+ view.maximumHeight = height * 1.1
33+
34 // if there are calls, even if we don't have info about them yet, push the livecall view
35 if (callManager.hasCalls) {
36 switchToLiveCall();

Subscribers

People subscribed via source and target branches