Commit Graph

1244 Commits

Author SHA1 Message Date
Quentin Guidée
5420a8a34f Merge remote-tracking branch 'upstream/master' into omega-hotfix 2020-02-20 23:41:50 +01:00
Émilie Feral
94daf465c4 [escher][apps/calculation] Improve ScrollView::scrollToContentRect to
scroll "smartly" when scrolling to a too-big-to-be-displayed rect

This fixes calculation history navigation on big cells (that are bigger
than the displayed table)
2020-02-20 10:56:11 +01:00
Émilie Feral
24d9f37205 [apps/calculation] Clean how cell subtype is selected/
This fixes crashes: indeed, in the way it was done before, we called
scrollToSubviewOfTypeOfCellAtLocation after setting the new selected subtype
and before reloading the data. However, selecting a new subtype might expand
the selected cell which can temper with the cell repartition. If so, we need to
reload the data to be able to call 'selectedCell' for instance.
2020-02-20 10:56:11 +01:00
Léa Saviot
cf37e5c45a [apps/code] Fix input(), that did not return the input 2020-02-20 10:52:19 +01:00
Quentin Guidée
73736c9b15 Fix conflicts 2020-02-20 00:42:47 +01:00
Léa Saviot
84a66d3b31 [apps/code] Fix input(), that did not return the input 2020-02-20 00:20:41 +01:00
Léa Saviot
92378b9496 [escher/layout_field] Handle Cut events 2020-02-18 10:08:34 +01:00
Léa Saviot
9544f1c961 [apps/eschr] Don't copy an expr when editing it, if it is too long
Scenario: Create a new sequence which is the multiplication of a lot of
imaginary i. Save it (many multiplication sign are added), then try to
edit it again, in linear edition mode: the text overflows the buffer. If
we still copied it, it might get copied until the middle of a code point,
which would make the UTF8Decoder crash afterwards.
2020-02-18 10:06:36 +01:00
Quentin Guidée
df67332880 Fix telemetry 2020-02-17 20:21:42 +01:00
Quentin Guidée
a2b8b603c5 Merge branch 'omega-dev-e13' of github.com:Omega-Numworks/Omega into omega-dev-e13 2020-02-17 17:10:42 +01:00
Quentin Guidée
5b2f33c80a Fix conflicts 2020-02-17 17:10:32 +01:00
Romain Goyet
b06de12902 [escher] Add a telemetry API based off ion's 2020-02-17 10:31:24 -05:00
Romain Goyet
7f767990d2 [escher] Inline empty functions in ViewController 2020-02-17 10:31:24 -05:00
redgl0w
3a954653bd Update text_field.cpp 2020-02-17 09:54:09 +01:00
Quentin Guidée
31cdd5bcc8 Fixed some conflicts 2020-02-12 18:24:13 +01:00
Quentin Guidée
ab8f731515 Fixed some conflicts 2020-02-12 17:42:58 +01:00
Léa Saviot
737f38dd66 [escher/metric] Increase pop up width
The table cells have a new right margin, which makes old toolbox
messages overflow the toolbox. We increase the toolbox width by 10px to
fix this.
2020-02-12 15:13:27 +01:00
Émilie Feral
541acb6a7c [apps/settings] Factorize SettingsMessageTree model definition between
different targets (none/beta/update)
2020-02-12 15:13:26 +01:00
Ruben Dashyan
9fc1182733 [escher/message_tree] Inline in header file 2020-02-12 15:13:26 +01:00
Émilie Feral
9dbb1153a1 [escher] Add TODOs on EditableField, InputEventHandler, LayoutField,
TextInput, TextArea, TextInput
2020-02-12 15:13:25 +01:00
Émilie Feral
9c25fdb66e [escher] TextField: fix shouldFinishEditing to reset selection 2020-02-12 15:13:25 +01:00
Émilie Feral
879843ce2b [escher] LayoutField: reset selection when the field should finish
editing

This fixes the following bug: in solver, input Matrix(Matrix()) and select the
inner Matrix. When handling "OK" event, the "=0" is inserted at a wrong
position leading to a crash !
2020-02-12 15:13:24 +01:00
Émilie Feral
4bcb3283c2 [escher] TextField: handleEventWithText: don't move the cursor position
if the text could not be inserted
2020-02-12 15:13:24 +01:00
Émilie Feral
0ffcf34eb7 [escher] TextField: make the handleEventWithText behaviour consistent:
when a text cannot be inserted because it overflows the buffer, don't
add anything

insertTextAtLocation already behaves like this but handleEventWithText
used to cap the inserted text which sometimes leads to a different
behaviour - it would insert a truncated text
2020-02-12 15:13:24 +01:00
Émilie Feral
9d1a5ea0a8 [escher] LayoutField: fix putCursorRightOfLayout to update matrix
layouts if necessary
2020-02-12 15:13:24 +01:00
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