Commit Graph

1226 Commits

Author SHA1 Message Date
Léa Saviot
a56a73b0ba [apps/calculation] Fix calculation height computation
It was done in two places before, which created inconsistencies
2020-05-28 04:44:27 -07:00
Léa Saviot
525290427a [apps/calculation] Calculation::height takes verticalMargin argument 2020-05-28 04:44:27 -07:00
0b101
b48d3d6e4a Added a new compact result display mode 2020-05-28 04:44:27 -07:00
Léa Saviot
016f87c266 [escher/layout_field] Reset the scroll when clearing the layout
Scenario: Go to the graph app, create f(x) = 1 then create g(x) -> there
is a weird big margin in the edition field
2020-05-15 02:39:11 -07:00
Émilie Feral
c955f45457 [escher] View: remove useless virtual destructor 2020-05-12 13:19:28 +02:00
Romain Goyet
a07ab8015e [apps/calculation] Correct insert in fractions 2020-05-11 10:34:28 +02:00
Romain Goyet
884e53f75d [escher/layout_field] Add a comment 2020-05-11 10:34:28 +02:00
Romain Goyet
213d80002c [escher/layout_field] Insertion event can be customized 2020-05-11 10:34:28 +02:00
Romain Goyet
fc4b0a8d35 [escher] Add an insertionField in LayoutField 2020-05-11 10:34:28 +02:00
Émilie Feral
675a0d3f4c Add missing definition of static member variables 2020-04-15 10:34:00 -04:00
Romain Goyet
84768472bd Explicit std::min/max template usage
This is unfortunately required in several cases:
 - Sometimes when we use either float and double (this should be changed)
 - Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
 - Because we mix pointer differences and ints
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Émilie Feral
068325d151 Coding style: remove unecessary 'virtual' keyword when 'override' is
present 2/2
2020-04-09 11:36:51 +02:00
Romain Goyet
64a1094edf [escher/layout_field] Use IsMoveEvent 2020-04-09 09:47:43 +02:00
Romain Goyet
ec4def61c3 [escher/layout_field] Avoid calling the same method over and over again 2020-04-09 09:47:43 +02:00
Jean-Baptiste Boric
2768ac2b48 [escher] Remove statically-allocated buffers 2020-04-08 10:09:47 +02:00
Romain Goyet
743eb104bf [ion] Replace Ion::Events::Event::id() by an explicit cast operator 2020-04-08 09:56:33 +02:00
Romain Goyet
35d446353f [escher] Avoid long switches on Left/Up/Right/Down 2020-04-08 09:56:33 +02:00
Léa Saviot
19b5653851 [apps/i18n] Remove Language::Default
We never translate a i18n message to something else than the currrent
language selected
2020-04-06 13:35:18 +02:00
Romain Goyet
84f6b179de [build] rule_for now takes both "local" and "global" parameters
Previous the build would fail on macOS if you had an epsilon.elf file in
at the root of the project. Indeed, the %.elf -> %.bin rule would get
triggered, but this rule should only operate on generated (intermediate)
elf file.
2020-04-06 10:12:54 +02:00
Émilie Feral
d0c5ac0343 [escher] StackViewController: add a method to return the
topViewController
2020-04-01 10:18:09 +02:00
Émilie Feral
886fc98350 [escher] Palette: factorize data color iteration 2020-04-01 10:18:08 +02:00
Romain Goyet
df5c0752fb [escher] Remove a useless header 2020-03-26 09:31:58 +01:00
Ruben Dashyan
037fa088e9 [escher/transparent_view] markRectAsDirty is protected
as it is in View.
2020-03-10 11:11:57 +01:00
Ruben Dashyan
d64e58b9dc [escher/transparent_view] Remove redundancy 2020-03-10 11:11:57 +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
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
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
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