Commit Graph

1185 Commits

Author SHA1 Message Date
Léa Saviot
963edd5c35 [apps/solver] Fix addition of "=0" to equations
ShiftRight no longer puts the cursor at the end of the text/layout.
2020-02-12 15:13:24 +01:00
Léa Saviot
ae3fa46191 [escher/text_field] Fix handling of \n
The buffer length did not take into account the \n removal. In fact, we
could just remove the \n while also removing the empty code points,
which is what we do now.
2020-02-12 15:13:24 +01:00
Émilie Feral
0348db5d2e [escher] TextArea: fix drawStringAt action with negative length 2020-02-12 15:13:24 +01:00
Léa Saviot
016a68d469 [apps/solver] Do not select "User variables used" row 2020-02-12 15:13:23 +01:00
Léa Saviot
afbca672fd [escher/button_row_controller] Remove unused variable 2020-02-12 15:13:23 +01:00
Léa Saviot
b29d014695 [escher/text_field] Fix removing of \n in insertTextAtLocation
Scenario: Copy a text with \n (for instance from a script), then paste
it in a script name -> if \n are replaed with \0 instead of just being
removed, there are problems with the extension
2020-02-12 15:13:23 +01:00
Ruben Dashyan
09e1c2eb8b [escher/text_input] insertTextAtLocation location parameter not const anymore 2020-02-12 15:13:23 +01:00
Ruben Dashyan
742ee475ea [escher/text_area] Fix typo 2020-02-12 15:13:23 +01:00
Léa Saviot
40ed9b3557 Revert "[eshcer/layout_field] Factor handleEvent"
This reverts commit d1ebbc685d67702994aa3ef822886a681cee63b9.

There were problems in the calculation app for instance:
- Write 34 then press ans -> the cursor is not drawn right of ans, but
left.
- Write a large layout, go up in th history, then go back to edition:
the view is not scrolled to the cursor
2020-02-12 15:13:22 +01:00
Émilie Feral
b56cd8b012 [escher] Metric: add EllipsisCellWidth. This will be soon used by
Calculation::HistoryCell
2020-02-12 15:13:22 +01:00
Émilie Feral
ef5681ec0b [escher] Remove BurgerMenuView 2020-02-12 15:13:22 +01:00
Émilie Feral
3de0ee7f98 [apps/calculation] ExpressionWithEqualSignView inherits from
ExpressionView instead of composing

This is useful for future change on
ScrollableExactApproximateExpressionView
2020-02-12 15:13:22 +01:00
Léa Saviot
88ab0e686c [apps] Less operations in willExitResponderChain if exiting app
If nextFirstResponder is nullptr, it means we are exiting the app, so
there is no need to relayout, reselect, ...
We did it bbefore because a long time ago, we used to keep all apps side
by side so they had to be thouroughly cleaned when exiting
2020-02-12 15:13:22 +01:00
Léa Saviot
90e5a08d3a [escher/app] Coding style 2020-02-12 15:13:22 +01:00
Léa Saviot
756eeeb2d8 [poincare/parser] Add context 2020-02-12 15:13:21 +01:00
Émilie Feral
3d3189d0dd [escher] BurgerMenuView: when drawRect, reinitialize the rectangle to
avoid corruption when re-drawing above a burger. Indeed,
blendRectWithMask pulls the current color to blend it.
2020-02-12 15:13:21 +01:00
Émilie Feral
764277fbb8 [escher] BurgerMenuView: fix masks 2020-02-12 15:13:21 +01:00
Émilie Feral
581756b046 [escher] Fix Bordered::drawInnerRect 2020-02-12 15:13:21 +01:00
Émilie Feral
061c96df45 [escher] Add vertical borders to StackView 2020-02-12 15:13:21 +01:00
Émilie Feral
3fa4e0838a [escher] Create a class Bordered instead of BorderedCell: this enable
non-cell view to use it as well
2020-02-12 15:13:21 +01:00
Émilie Feral
235b03a923 [escher] Create a BorderedCell that draws the border around a cell and
use it in TableCell
2020-02-12 15:13:21 +01:00
Léa Saviot
5a7c03d485 [apps/editor_controller] Fix backspace handling in text area
The editor controller handles backspace if it is at the beginning of a
line, to remove multiple spaces to match the indentation, but it should
not do so if there is an ongoing selection
2020-02-12 15:13:20 +01:00
Léa Saviot
ce20f3f50f [escher/text_field] Fix empty Paste event
If there is no text in the clipboard and a Paste event in a text
field, the cursor moved at the beginning of the text
2020-02-12 15:13:20 +01:00
Léa Saviot
2fea9d61b6 [escher/text_field] Fix cut event text deletion
If there is a Cut event and the text field is edited but there is no
selection, the text is not stored in the clipboard but it was still
deleted.
2020-02-12 15:13:20 +01:00
Léa Saviot
66cf4ed83f [escher/text_field] Fix Cut / Clear redrawing 2020-02-12 15:13:20 +01:00
Émilie Feral
6a2f11ef1b [escher] ExpressionTableCell & ExpressionTableCellWithExpression:
reloadScroll when displaying cell
2020-02-12 15:13:20 +01:00
Émilie Feral
74b5ca2f12 [escher] ExpressionTableCellWithExpression: avoid to add margins around
the accessory subview twice
2020-02-12 15:13:20 +01:00
Émilie Feral
3806a78141 [escher] ExpressionTableCellWithExpression: make the accessory
expression scrollable and set it as the first responder
2020-02-12 15:13:20 +01:00
Émilie Feral
711c4a6554 [escher] ScrollableExpressionView: fix background color 2020-02-12 15:13:20 +01:00
Émilie Feral
4bd3dfd542 [escher] TableCell: the subviews are layoutted horizontally or
vertically. We add an option to decide which subviews should overlap on
top of the other if there is not enough space
2020-02-12 15:13:20 +01:00
Émilie Feral
5974149162 [escher] Metric: change name TableCellLabelTopMargin to
TableCellHorizontalMargin and add TableCellHorizontalMargin
2020-02-12 15:13:20 +01:00
Émilie Feral
d0e2e71e10 [escher] TableCell: fix layoutSubviews 2020-02-12 15:13:20 +01:00
Émilie Feral
816e17df66 [escher] TableCell: factorize code 2020-02-12 15:13:19 +01:00
Émilie Feral
9312d2bd65 [escher] ExpressionTableCell is composed of a ScrollableExpressionView
instead of an ExpressionView
2020-02-12 15:13:19 +01:00
Émilie Feral
9301dd510a [calculation][escher] Move ScrollableExpressionView from apps/calculation/ to
escher/
2020-02-12 15:13:19 +01:00
Émilie Feral
439c85eda5 [escher] TableCell: make the label margin optional 2020-02-12 15:13:19 +01:00
Émilie Feral
2e3a904b9b [escher] TableCell: fix layoutSubview to avoid letting subviews overflow bounds() 2020-02-12 15:13:19 +01:00
Émilie Feral
8915148e72 [escher] Add a class BurgerMenuView 2020-02-12 15:13:18 +01:00
Léa Saviot
ef7fb400c9 [escher/test] Fix and add layout_field select up down tests 2020-02-12 15:13:18 +01:00
Léa Saviot
e10bd18f8e [escher/text_area] insertTextAtLocation removes system parentheses 2020-02-12 15:13:18 +01:00
Léa Saviot
a42b52d10e [escher/text_area/field] When pasting, force cursor right of text 2020-02-12 15:13:18 +01:00
Léa Saviot
408a33f8a6 [escher/layout_field] Allow copy-paste of ^2 2020-02-12 15:13:18 +01:00
Léa Saviot
8f86769cd1 [escher/layout_field] When pasting, force cursor right of pasted text
Even if the text is inserted code point per code point
2020-02-12 15:13:18 +01:00
Léa Saviot
d446d1cb61 [escher/text_input] Fix ShiftDown in text field with extension
The extension should not be selected
2020-02-12 15:13:18 +01:00
Léa Saviot
d9b284c1ec [escher/text_input] ShiftUp/Down selects whole textfield on left/right 2020-02-12 15:13:18 +01:00
Léa Saviot
2eaf84cc73 [escher/app/modal_view] If will exit app, do not relayout
App::willBecomeInactive calls dismissModalViewController, which puts
back the previous repsonder and calls layoutSubviews on the
modalViewController. We do not want to do all these operations when the
app will be exited anyways.
2020-02-12 15:13:18 +01:00
Léa Saviot
8a8d4677a8 [escher/layout_field] Fix addSelection
Better handling of adding an horizontal to the selection of all its
children / or the contrary
2020-02-12 15:13:18 +01:00
Léa Saviot
3ff94b8930 [escher/text_input] Fix cursor position when deleting selection 2020-02-12 15:13:18 +01:00
Léa Saviot
cb53038909 [escher] Text input has alignment, not text field 2020-02-12 15:13:18 +01:00
Léa Saviot
aad1636238 [escher/text_input] Methods reordering 2020-02-12 15:13:18 +01:00