Merge lp:~rpadovani/ubuntu-calculator-app/setKeyboardPosition into lp:ubuntu-calculator-app

Proposed by Riccardo Padovani
Status: Merged
Merged at revision: 18
Proposed branch: lp:~rpadovani/ubuntu-calculator-app/setKeyboardPosition
Merge into: lp:ubuntu-calculator-app
Diff against target: 36 lines (+9/-2)
1 file modified
app/ubuntu-calculator-app.qml (+9/-2)
To merge this branch: bzr merge lp:~rpadovani/ubuntu-calculator-app/setKeyboardPosition
Reviewer Review Type Date Requested Status
Bartosz Kosiorek Approve
Review via email: mp+243348@code.launchpad.net

Commit message

Set the inverse order for the listview, so we can set the keyboard position to bottom

Description of the change

Set the inverse order for the listview, so we can set the keyboard position to bottom

To post a comment you must log in.
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

It is working for me perfeclty.

Thanks Riccardo !

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/ubuntu-calculator-app.qml'
2--- app/ubuntu-calculator-app.qml 2014-11-28 20:54:49 +0000
3+++ app/ubuntu-calculator-app.qml 2014-12-02 00:49:19 +0000
4@@ -221,7 +221,7 @@
5 return;
6 }
7
8- historyModel.append({"formulaToDisplay":returnFormulaToDisplay(longFormula), "result":displayedInputText});
9+ historyModel.insert(0, {"formulaToDisplay":returnFormulaToDisplay(longFormula), "result":displayedInputText});
10 longFormula = result;
11 shortFormula = result;
12 numberOfOpenedBrackets = 0;
13@@ -236,7 +236,14 @@
14 ListView {
15 id: formulaView
16 anchors.fill: parent
17+ boundsBehavior: Flickable.StopAtBounds
18 clip: true
19+ currentIndex: -1;
20+ focus: true
21+ snapMode: ListView.SnapToItem
22+ // We need to set a bottomToTop direction because we want the listview starts from bottom on load
23+ // and we set the position of the keyboard to bottom
24+ verticalLayoutDirection: ListView.BottomToTop
25
26 model: historyModel
27
28@@ -244,7 +251,7 @@
29 width: parent.width
30 }
31
32- footer: Column {
33+ header: Column {
34 width: parent.width
35
36 Text {

Subscribers

People subscribed via source and target branches