~dalius-sandbox/ubuntu-calculator-app/minor-bug-fixes

« back to all changes in this revision

Viewing changes to calculator.qml

  • Committer: Tarmac
  • Author(s): Dalius
  • Date: 2013-03-02 10:17:21 UTC
  • mfrom: (18.1.1 ubuntu-calculator-app)
  • Revision ID: tarmac-20130302101721-zmoz7tenlgaayfm0
Indicator that there are entries in memory.

Approved by Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
                        property string currentFormula: '%1<font color="lightgray">%2</font>'.arg(formula_text).arg(brackets_added)
149
149
                        property string currentAnswer: answer
150
150
                        property color color: "#FFFFFF";
 
151
                        property bool positionedAtEnd: true;
151
152
 
152
153
                        function addCurrentToMemory() {
153
154
                            if (formula_text !== '') {
183
184
                            memory.get(memory.count-1).answer = currentAnswer
184
185
                        }
185
186
 
 
187
                        onContentYChanged: {
 
188
                            positionedAtEnd = formulaView.indexAt(0, contentY+0) == formulaView.model.count-1
 
189
                        }
 
190
 
186
191
                        model: Memory{
187
192
                            id: memory
188
193
                        }