Merge lp:~phablet-team/dialer-app/expand-dialer into lp:dialer-app/staging

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 560
Merged at revision: 558
Proposed branch: lp:~phablet-team/dialer-app/expand-dialer
Merge into: lp:dialer-app/staging
Prerequisite: lp:~phablet-team/dialer-app/voip_support
Diff against target: 671 lines (+189/-103)
7 files modified
src/dialer-app.desktop.in.in (+0/-1)
src/qml/DialerPage/DialerPage.qml (+18/-10)
src/qml/DialerPage/Keypad.qml (+108/-34)
src/qml/DialerPage/KeypadButton.qml (+19/-19)
src/qml/DialerPage/KeypadEntry.qml (+6/-5)
src/qml/LiveCallPage/LiveCall.qml (+33/-30)
src/qml/dialer-app.qml (+5/-4)
To merge this branch: bzr merge lp:~phablet-team/dialer-app/expand-dialer
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
system-apps-ci-bot continuous-integration Pending
Review via email: mp+320668@code.launchpad.net

This proposal supersedes a proposal from 2016-12-21.

Commit message

Allow to expand the keypad.

Description of the change

Allow to expand the keypad.

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:556
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/34/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2220
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/577
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2223
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2050
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2050/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2050
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2050/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2050
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2050/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2050
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2050/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2050
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2050/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2050
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2050/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2050
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2050/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2050
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2050/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2050
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2050/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/34/rebuild

review: Approve (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:557
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/35/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2222
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/578
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2225
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2052
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2052/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2052
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2052/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2052
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2052/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2052
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2052/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2052
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2052/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2052
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2052/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2052
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2052/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2052
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2052/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2052
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2052/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/35/rebuild

review: Approve (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:558
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/36/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2225
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/579
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2228
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2055
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2055/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2055
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2055/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2055
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2055/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2055
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2055/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2055
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2055/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2055
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2055/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2055
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2055/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2055
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2055/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2055
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2055/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/36/rebuild

review: Approve (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:559
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/37/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2226
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/580
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2229
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2056
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2056/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2056
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2056/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2056
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2056/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2056
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2056/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2056
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2056/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2056
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2056/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2056
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2056/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2056
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2056/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2056
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2056/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/37/rebuild

review: Approve (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:560
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/40/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2270
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/592
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2273
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2099
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2099/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2099
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2099/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2099
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2099/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2099
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2099/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2099
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2099/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2099
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2099/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2099
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2099/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2099
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2099/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2099
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2099/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-dialer-app-ci/40/rebuild

review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) 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/dialer-app.desktop.in.in'
2--- src/dialer-app.desktop.in.in 2015-04-29 12:54:24 +0000
3+++ src/dialer-app.desktop.in.in 2017-03-22 16:17:59 +0000
4@@ -14,4 +14,3 @@
5 X-Ubuntu-Default-Department-ID=accessories
6 X-Ubuntu-Splash-Show-Header=true
7 X-Screenshot=@CMAKE_INSTALL_PREFIX@/@DIALER_APP_DIR@/assets/dialer-app-screenshot.png
8-X-Ubuntu-Supported-Orientations=portrait
9
10=== modified file 'src/qml/DialerPage/DialerPage.qml'
11--- src/qml/DialerPage/DialerPage.qml 2017-03-22 16:17:58 +0000
12+++ src/qml/DialerPage/DialerPage.qml 2017-03-22 16:17:59 +0000
13@@ -36,6 +36,7 @@
14 property alias callAnimationRunning: callAnimation.running
15 property bool greeterMode: false
16 property var mmiPlugins: []
17+ readonly property bool compactView: page.height <= units.gu(60)
18
19 header: PageHeader {
20 id: pageHeader
21@@ -251,7 +252,10 @@
22 id: keypadContainer
23
24 anchors {
25- fill: parent
26+ top: parent.top
27+ left: parent.left
28+ right: parent.right
29+ bottom: footer.top
30 topMargin: pageHeader.height
31 }
32 focus: true
33@@ -266,16 +270,16 @@
34 right: parent.right
35 rightMargin: units.gu(2)
36 }
37- height: units.gu(10)
38+ height: page.compactView ? units.gu(7) : units.gu(10)
39
40 CustomButton {
41 id: addContact
42
43 anchors {
44 left: parent.left
45- verticalCenter: parent.verticalCenter
46+ verticalCenter: keypadEntry.verticalCenter
47 }
48- width: opacity > 0 ? units.gu(4) : 0
49+ width: opacity > 0 ? (page.compactView ? units.gu(4) : units.gu(3)) : 0
50 height: (keypadEntry.value !== "" && contactWatcher.isUnknown) ? parent.height : 0
51 icon: "contact-new"
52 iconWidth: units.gu(3)
53@@ -303,11 +307,12 @@
54 left: addContact.right
55 right: backspace.left
56 }
57- height: units.gu(4)
58 focus: true
59 placeHolder: i18n.tr("Enter a number")
60 Keys.forwardTo: [callButton]
61 value: mainView.pendingNumberToDial
62+ height: page.compactView ? units.gu(2) : units.gu(4)
63+ maximumFontSize: page.compactView ? units.dp(20) : units.dp(30)
64 onCommitRequested: {
65 callButton.clicked()
66 }
67@@ -318,9 +323,9 @@
68 objectName: "eraseButton"
69 anchors {
70 right: parent.right
71- verticalCenter: parent.verticalCenter
72+ verticalCenter: keypadEntry.verticalCenter
73 }
74- width: opacity > 0 ? units.gu(4) : 0
75+ width: opacity > 0 ? (page.compactView ? units.gu(4) : units.gu(3)) : 0
76 height: input.text !== "" ? parent.height : 0
77 icon: "erase"
78 iconWidth: units.gu(3)
79@@ -386,10 +391,13 @@
80
81 anchors {
82 top: divider.bottom
83- topMargin: units.gu(2)
84- horizontalCenter: parent.horizontalCenter
85+ left: parent.left
86+ right: parent.right
87+ bottom: parent.bottom
88+ margins: units.gu(2)
89 }
90-
91+ labelPixelSize: page.compactView ? units.dp(20) : units.dp(30)
92+ spacing: page.compactView ? 0 : 5
93 onKeyPressed: {
94 // handle special keys (backspace, arrows, etc)
95 keypadEntry.handleKeyEvent(keycode, keychar)
96
97=== modified file 'src/qml/DialerPage/Keypad.qml'
98--- src/qml/DialerPage/Keypad.qml 2016-08-24 17:51:16 +0000
99+++ src/qml/DialerPage/Keypad.qml 2017-03-22 16:17:59 +0000
100@@ -16,165 +16,239 @@
101 * along with this program. If not, see <http://www.gnu.org/licenses/>.
102 */
103
104-import QtQuick 2.0
105+import QtQuick 2.3
106+import QtQuick.Layouts 1.1
107 import Ubuntu.Components 1.3
108 import Ubuntu.Components.ListItems 1.3 as ListItems
109
110 Item {
111 id: keypad
112
113- property int keysWidth: units.gu(11)
114- property int keysHeight: units.gu(8)
115+ readonly property int keysWidth: Math.min(units.gu(11), (keypad.width / (keys.columns + 1)))
116+ readonly property int keysHeight: Math.min(units.gu(8), (keypad.height / (keys.rows + 1)))
117+ property double labelPixelSize: units.dp(30)
118 property bool showVoicemail: false
119-
120- width: keys.width
121- height: keys.height
122+ property alias spacing: keys.columnSpacing
123
124 signal keyPressed(int keycode, string keychar)
125 signal keyPressAndHold(int keycode, string keychar)
126
127- Grid {
128+ GridLayout {
129 id: keys
130
131 rows: 4
132 columns: 3
133- columnSpacing: units.gu(2.0)
134- rowSpacing: units.gu(0.5)
135- anchors.centerIn: parent
136+ rowSpacing: columnSpacing
137+ anchors.fill: parent
138+ //horizontalItemAlignment: Grid.AlignHCenter
139+ //verticalItemAlignment: Grid.AlignVCenter
140+
141
142 KeypadButton {
143 objectName: "buttonOne"
144- width: keysWidth
145- height: keysHeight
146+ implicitWidth: keysWidth
147+ implicitHeight: keysHeight
148 label: i18n.tr("1")
149 keycode: Qt.Key_1
150 onPressed: keypad.keyPressed(keycode, "1")
151 onPressAndHold: keypad.keyPressAndHold(keycode, "1")
152 iconSource: showVoicemail ? "voicemail" : ""
153+ labelFont.pixelSize: keypad.labelPixelSize
154+
155+ // Layout
156+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
157+ Layout.fillHeight: false
158+ Layout.fillWidth: false
159 }
160
161 KeypadButton {
162 objectName: "buttonTwo"
163- width: keysWidth
164- height: keysHeight
165+ implicitWidth: keysWidth
166+ implicitHeight: keysHeight
167 label: i18n.tr("2")
168 sublabel: i18n.tr("ABC")
169 keycode: Qt.Key_2
170 onPressed: keypad.keyPressed(keycode, "2")
171 onPressAndHold: keypad.keyPressAndHold(keycode, "2")
172+ labelFont.pixelSize: keypad.labelPixelSize
173+
174+ // Layout
175+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
176+ Layout.fillHeight: false
177+ Layout.fillWidth: false
178 }
179
180 KeypadButton {
181 objectName: "buttonThree"
182- width: keysWidth
183- height: keysHeight
184+ implicitWidth: keysWidth
185+ implicitHeight: keysHeight
186 label: i18n.tr("3")
187 sublabel: i18n.tr("DEF")
188 keycode: Qt.Key_3
189 onPressed: keypad.keyPressed(keycode, "3")
190 onPressAndHold: keypad.keyPressAndHold(keycode, "3")
191+ labelFont.pixelSize: keypad.labelPixelSize
192+
193+ // Layout
194+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
195+ Layout.fillHeight: false
196+ Layout.fillWidth: false
197 }
198
199 KeypadButton {
200 objectName: "buttonFour"
201- width: keysWidth
202- height: keysHeight
203+ implicitWidth: keysWidth
204+ implicitHeight: keysHeight
205 label: i18n.tr("4")
206 sublabel: i18n.tr("GHI")
207 keycode: Qt.Key_4
208 onPressed: keypad.keyPressed(keycode, "4")
209 onPressAndHold: keypad.keyPressAndHold(keycode, "4")
210+ labelFont.pixelSize: keypad.labelPixelSize
211+
212+ // Layout
213+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
214+ Layout.fillHeight: false
215+ Layout.fillWidth: false
216 }
217
218 KeypadButton {
219 objectName: "buttonFive"
220- width: keysWidth
221- height: keysHeight
222+ implicitWidth: keysWidth
223+ implicitHeight: keysHeight
224 label: i18n.tr("5")
225 sublabel: i18n.tr("JKL")
226 keycode: Qt.Key_5
227 onPressed: keypad.keyPressed(keycode, "5")
228 onPressAndHold: keypad.keyPressAndHold(keycode, "5")
229+ labelFont.pixelSize: keypad.labelPixelSize
230+
231+ // Layout
232+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
233+ Layout.fillHeight: false
234+ Layout.fillWidth: false
235 }
236
237 KeypadButton {
238 objectName: "buttonSix"
239- width: keysWidth
240- height: keysHeight
241+ implicitWidth: keysWidth
242+ implicitHeight: keysHeight
243 label: i18n.tr("6")
244 sublabel: i18n.tr("MNO")
245 keycode: Qt.Key_6
246 onPressed: keypad.keyPressed(keycode, "6")
247 onPressAndHold: keypad.keyPressAndHold(keycode, "6")
248+ labelFont.pixelSize: keypad.labelPixelSize
249+
250+ // Layout
251+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
252+ Layout.fillHeight: false
253+ Layout.fillWidth: false
254 }
255
256 KeypadButton {
257 objectName: "buttonSeven"
258- width: keysWidth
259- height: keysHeight
260+ implicitWidth: keysWidth
261+ implicitHeight: keysHeight
262 label: i18n.tr("7")
263 sublabel: i18n.tr("PQRS")
264 keycode: Qt.Key_7
265 onPressed: keypad.keyPressed(keycode, "7")
266 onPressAndHold: keypad.keyPressAndHold(keycode, "7")
267+ labelFont.pixelSize: keypad.labelPixelSize
268+
269+ // Layout
270+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
271+ Layout.fillHeight: false
272+ Layout.fillWidth: false
273 }
274
275 KeypadButton {
276 objectName: "buttonEight"
277- width: keysWidth
278- height: keysHeight
279+ implicitWidth: keysWidth
280+ implicitHeight: keysHeight
281 label: i18n.tr("8")
282 sublabel: i18n.tr("TUV")
283 keycode: Qt.Key_8
284 onPressed: keypad.keyPressed(keycode, "8")
285 onPressAndHold: keypad.keyPressAndHold(keycode, "8")
286+ labelFont.pixelSize: keypad.labelPixelSize
287+
288+ // Layout
289+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
290+ Layout.fillHeight: false
291+ Layout.fillWidth: false
292 }
293
294 KeypadButton {
295 objectName: "buttonNine"
296- width: keysWidth
297- height: keysHeight
298+ implicitWidth: keysWidth
299+ implicitHeight: keysHeight
300 label: i18n.tr("9")
301 sublabel: i18n.tr("WXYZ")
302 keycode: Qt.Key_9
303 onPressed: keypad.keyPressed(keycode, "9")
304 onPressAndHold: keypad.keyPressAndHold(keycode, "9")
305+ labelFont.pixelSize: keypad.labelPixelSize
306+
307+ // Layout
308+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
309+ Layout.fillHeight: false
310+ Layout.fillWidth: false
311 }
312
313 KeypadButton {
314 objectName: "buttonAsterisk"
315- width: keysWidth
316- height: keysHeight
317+ implicitWidth: keysWidth
318+ implicitHeight: keysHeight
319 isCorner: true
320 corner: Qt.BottomLeftCorner
321 label: i18n.tr("*")
322 keycode: Qt.Key_Asterisk
323 onPressed: keypad.keyPressed(keycode, "*")
324 onPressAndHold: keypad.keyPressAndHold(keycode, "*")
325+ labelFont.pixelSize: keypad.labelPixelSize
326+
327+ // Layout
328+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
329+ Layout.fillHeight: false
330+ Layout.fillWidth: false
331 }
332
333 KeypadButton {
334 objectName: "buttonZero"
335- width: keysWidth
336- height: keysHeight
337+ implicitWidth: keysWidth
338+ implicitHeight: keysHeight
339 label: i18n.tr("0")
340 sublabel: i18n.tr("+")
341 sublabelSize: "medium"
342 keycode: Qt.Key_0
343 onPressed: keypad.keyPressed(keycode, "0")
344 onPressAndHold: keypad.keyPressAndHold(keycode, "0")
345+ labelFont.pixelSize: keypad.labelPixelSize
346+
347+ // Layout
348+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
349+ Layout.fillHeight: false
350+ Layout.fillWidth: false
351 }
352
353 KeypadButton {
354 objectName: "buttonHash"
355- width: keysWidth
356- height: keysHeight
357+ implicitWidth: keysWidth
358+ implicitHeight: keysHeight
359 isCorner: true
360 corner: Qt.BottomRightCorner
361 label: i18n.tr("#")
362 keycode: Qt.Key_ssharp
363 onPressed: keypad.keyPressed(keycode, "#")
364 onPressAndHold: keypad.keyPressAndHold(keycode, "#")
365+ labelFont.pixelSize: keypad.labelPixelSize
366+
367+ // Layout
368+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
369+ Layout.fillHeight: false
370+ Layout.fillWidth: false
371 }
372 }
373 }
374
375=== modified file 'src/qml/DialerPage/KeypadButton.qml'
376--- src/qml/DialerPage/KeypadButton.qml 2016-08-25 06:54:07 +0000
377+++ src/qml/DialerPage/KeypadButton.qml 2017-03-22 16:17:59 +0000
378@@ -22,13 +22,11 @@
379 MouseArea {
380 id: button
381
382- width: units.gu(11.33)
383- height: units.gu(7)
384-
385 property alias label: labelItem.text
386 property alias sublabel: sublabelItem.text
387 property alias sublabelSize: sublabelItem.fontSize
388 property alias iconSource: subImage.name
389+ property alias labelFont: labelItem.font
390 property int keycode
391 property bool isCorner: false
392 property int corner
393@@ -47,9 +45,7 @@
394
395 Item {
396 objectName: "keypadButtonLabelsContainer"
397- height: childrenRect.height
398- width: parent.width
399- anchors.centerIn: parent
400+ anchors.fill: parent
401 scale: button.pressed ? 0.9 : 1
402
403 Behavior on scale {
404@@ -61,23 +57,25 @@
405 Label {
406 id: labelItem
407
408- anchors.top: parent.top
409- anchors.horizontalCenter: parent.horizontalCenter
410- anchors.verticalCenterOffset: -units.gu(0.5)
411- horizontalAlignment: Text.AlignHCenter
412- height: paintedHeight
413+ anchors {
414+ horizontalCenter: parent.horizontalCenter
415+ verticalCenter: parent.verticalCenter
416+ verticalCenterOffset: -units.gu(0.5)
417+ }
418+
419 font.pixelSize: units.dp(30)
420- verticalAlignment: Text.AlignTop
421 color: UbuntuColors.darkGrey
422 }
423
424 Label {
425 id: sublabelItem
426
427- anchors.top: labelItem.bottom
428- anchors.topMargin: units.dp(1.5)
429- anchors.horizontalCenter: parent.horizontalCenter
430- horizontalAlignment: Text.AlignHCenter
431+ anchors {
432+ top: labelItem.bottom
433+ topMargin: units.dp(1.5)
434+ horizontalCenter: labelItem.horizontalCenter
435+ }
436+
437 fontSize: "x-small"
438 color: UbuntuColors.darkGrey
439 }
440@@ -85,9 +83,11 @@
441 Icon {
442 id: subImage
443 visible: name != ""
444- anchors.top: labelItem.bottom
445- anchors.horizontalCenter: parent.horizontalCenter
446- anchors.topMargin: units.dp(1.5)
447+ anchors {
448+ top: labelItem.bottom
449+ horizontalCenter: labelItem.horizontalCenter
450+ topMargin: units.dp(1.5)
451+ }
452 opacity: 0.8
453 width: units.gu(2)
454 height: units.gu(2)
455
456=== modified file 'src/qml/DialerPage/KeypadEntry.qml'
457--- src/qml/DialerPage/KeypadEntry.qml 2017-03-22 16:17:58 +0000
458+++ src/qml/DialerPage/KeypadEntry.qml 2017-03-22 16:17:59 +0000
459@@ -30,6 +30,8 @@
460 property alias input: input
461 property alias placeHolder: hint.text
462 property alias placeHolderPixelFontSize: hint.font.pixelSize
463+ property double maximumFontSize: units.dp(30)
464+
465 // this is used by tests. do not remove it
466 property alias selectedText: input.selectedText
467
468@@ -61,15 +63,14 @@
469 }
470
471 onValueChanged: input.deselect()
472+ onMaximumFontSizeChanged: input.adjustTextSize()
473
474 PhoneNumberField {
475 id: input
476
477 property bool __adjusting: false
478- readonly property double maximumFontSize: units.dp(30)
479 readonly property double minimumFontSize: FontUtils.sizeToPixels("large")
480
481-
482 style: TextFieldStyle {
483 background: null
484 frameSpacing: 0
485@@ -85,7 +86,7 @@
486 __adjusting = true;
487
488 // start by resetting the font size to discover the scale that should be used
489- font.pixelSize = maximumFontSize
490+ font.pixelSize = keypadEntry.maximumFontSize
491
492 // check if it really needs to be scaled
493 if (contentWidth > width) {
494@@ -103,7 +104,6 @@
495 verticalCenter: parent.verticalCenter
496 }
497 horizontalAlignment: (text.length < 19 ? TextInput.AlignHCenter : TextInput.AlignRight)
498- font.pixelSize: maximumFontSize
499 font.family: "Ubuntu"
500 color: UbuntuColors.darkGrey
501 focus: false
502@@ -135,6 +135,7 @@
503 target: units
504 onGridUnitChanged: input.adjustTextSize()
505 }
506+ Component.onCompleted: input.adjustTextSize()
507 }
508
509 MouseArea {
510@@ -159,7 +160,7 @@
511 }
512
513 text: ""
514- font.pixelSize: input.maximumFontSize
515+ font.pixelSize: input.font.pixelSize
516 fontSizeMode: Text.HorizontalFit
517 color: UbuntuColors.darkGrey
518 opacity: 0.9
519
520=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
521--- src/qml/LiveCallPage/LiveCall.qml 2017-03-22 16:17:58 +0000
522+++ src/qml/LiveCallPage/LiveCall.qml 2017-03-22 16:17:59 +0000
523@@ -30,6 +30,8 @@
524 id: liveCall
525 objectName: "pageLiveCall"
526
527+ readonly property bool compactView: liveCall.height <= units.gu(60)
528+
529 property var call: callManager.foregroundCall
530 property var calls: callManager.calls
531 property string dtmfEntry: ""
532@@ -448,20 +450,26 @@
533 horizontalAlignment: Qt.AlignHCenter
534 width: units.gu(11)
535 text: {
536+ var duration = ""
537 if (dtmfVisible && dtmfLabelHelper.text !== "") {
538- return dtmfLabelHelper.text;
539+ duration = dtmfLabelHelper.text;
540 } else if (call && call.active) {
541 // TRANSLATORS: %1 is the call duration here.
542- return call.held ? i18n.tr("%1 - on hold").arg(stopWatch.elapsed) : stopWatch.elapsed;
543+ duration = call.held ? i18n.tr("%1 - on hold").arg(stopWatch.elapsed) : stopWatch.elapsed;
544 } else if (call && !call.incoming) {
545- return i18n.tr("Calling")
546+ duration = i18n.tr("Calling")
547 } else if (!call && initialStatus !== "") {
548- return initialStatus
549+ duration = initialStatus
550 } else {
551- return " "
552+ duration = " "
553 }
554+
555+ if (liveCall.compactView)
556+ return "%1 (%2)".arg(duration).arg(caller)
557+ else
558+ return duration
559 }
560- fontSize: "x-large"
561+ fontSize: liveCall.compactView ? "large" : "x-large"
562 }
563
564 Label {
565@@ -473,8 +481,11 @@
566 horizontalCenter: parent.horizontalCenter
567 }
568 text: caller
569- fontSize: "large"
570 color: UbuntuColors.darkGrey
571+
572+ fontSize:"large"
573+ visible: !liveCall.compactView
574+ height: visible ? implicitHeight : 0
575 }
576
577 MultiCallDisplay {
578@@ -494,7 +505,7 @@
579 left: parent.left
580 right: parent.right
581 top: callerLabel.bottom
582- topMargin: units.gu(2)
583+ topMargin: liveCall.compactView ? units.gu(0.5) : units.gu(2)
584 }
585 }
586
587@@ -504,7 +515,9 @@
588 anchors {
589 top: divider.bottom
590 topMargin: units.gu(2)
591- horizontalCenter: parent.horizontalCenter
592+ left: parent.left
593+ right: parent.right
594+ bottom: parent.bottom
595 }
596 onKeyPressed: {
597 if (call) {
598@@ -515,8 +528,8 @@
599
600 visible: opacity > 0.0
601 opacity: 0.0
602- keysWidth: units.gu(11)
603- keysHeight: units.gu(7)
604+ labelPixelSize: liveCall.compactView ? units.dp(20) : units.dp(30)
605+ spacing: liveCall.compactView ? 0 : 5
606 }
607 }
608
609@@ -575,7 +588,7 @@
610
611 anchors {
612 horizontalCenter: parent.horizontalCenter
613- bottom: footer.top
614+ bottom: hangupButton.top
615 bottomMargin: units.gu(1)
616 }
617
618@@ -679,25 +692,15 @@
619 }
620 }
621
622- Item {
623- id: footer
624- height: units.gu(10)
625+ HangupButton {
626+ id: hangupButton
627+ objectName: "hangupButton"
628+
629 anchors {
630+ horizontalCenter: parent.horizontalCenter
631 bottom: parent.bottom
632- left: parent.left
633- right: parent.right
634- }
635-
636- HangupButton {
637- id: hangupButton
638- objectName: "hangupButton"
639-
640- anchors {
641- horizontalCenter: parent.horizontalCenter
642- bottom: parent.bottom
643- bottomMargin: units.gu(5)
644- }
645- onClicked: endCall()
646- }
647+ bottomMargin: liveCall.compactView ? units.gu(1) : units.gu(5)
648+ }
649+ onClicked: endCall()
650 }
651 }
652
653=== modified file 'src/qml/dialer-app.qml'
654--- src/qml/dialer-app.qml 2016-10-19 11:45:45 +0000
655+++ src/qml/dialer-app.qml 2017-03-22 16:17:59 +0000
656@@ -487,10 +487,11 @@
657 pageStackNormalMode.push(Qt.createComponent("DialerPage/DialerPage.qml"))
658
659 // when running in windowed mode, do not allow resizing
660- view.minimumWidth = Qt.binding( function() { return implicitWidth * 0.9; } )
661- view.maximumWidth = Qt.binding( function() { return implicitWidth * 1.1; } )
662- view.minimumHeight = Qt.binding( function() { return implicitHeight * 0.9; } )
663- view.maximumHeight = Qt.binding( function() { return implicitHeight * 1.1; } )
664+ view.minimumWidth = units.gu(40)
665+ view.minimumHeight = units.gu(52)
666+
667+// view.maximumWidth = Qt.binding( function() { return implicitWidth * 3.0; } )
668+// view.maximumHeight = Qt.binding( function() { return implicitHeight * 3.0; } )
669
670 // if there are calls, even if we don't have info about them yet, push the livecall view
671 if (callManager.hasCalls) {

Subscribers

People subscribed via source and target branches

to all changes: