Commit Graph

620 Commits

Author SHA1 Message Date
Léa Saviot
a2448ec807 [escher] Increase TextField::maxBufferSize
In order to be able to write a 10*10 adjacency matrix
2019-04-12 15:16:53 +02:00
Léa Saviot
92574ab0a3 [coding style] Small inlining 2019-04-12 15:16:52 +02:00
Léa Saviot
2d83c2994c [escher] Fix TextArea::handleEventWithText
It did not handle properly a new line (placed the cursor wrongly).
2019-04-12 15:16:52 +02:00
Léa Saviot
b1d18416e8 [escher] Fix buffer choice in TextField::glyphFrameAtPosition 2019-04-12 15:16:52 +02:00
Léa Saviot
646931b3b5 [text_area] Fix Text::Position use with unicode
A glyph offset is not equivalent to a code point offset since a code
point can be several glyphs long.
2019-04-12 15:16:51 +02:00
Léa Saviot
0ebfab773e [escher/ion] Factorize code for removing a code point in text field/area 2019-04-12 15:16:51 +02:00
Léa Saviot
aac78ca32a [escher/ion] Standard methods in UTF8Helper used in text_area
String manipulations need to be done using an UTF8 decoder, but some
manipulations can be optimized if the code points we manipulate are only
one char long. These optimizations are done inside UTF8Helper methods.
2019-04-12 15:16:51 +02:00
Léa Saviot
7020ecef57 [apps/escher] Rename cursorTextLocation as cursorLocation 2019-04-12 15:16:51 +02:00
Léa Saviot
03446bc9d1 [escher] Clean TextView 2019-04-12 15:16:51 +02:00
Léa Saviot
0fdf6665ad [escher] Fix textfield edition 2019-04-12 15:16:51 +02:00
Léa Saviot
b6eb663f53 [ion/kandinsky] Move unicode to ion 2019-04-12 15:16:51 +02:00
Léa Saviot
4316f2c29c [escher] Fix text field and text area navigation 2019-04-12 15:16:51 +02:00
Léa Saviot
5142c071df [escher] Fix text inputs so they use UTF8 2019-04-12 15:16:51 +02:00
Léa Saviot
242bcda631 [escher] Clean text_input 2019-04-12 15:16:51 +02:00
Léa Saviot
63d7155376 Remove Ion::Charset 2019-04-12 15:16:50 +02:00
Ruben Dashyan
b5dc7f738e [escher/table_view] scrollToCell includes CellOverlap
In passing, factorize duplicate code.
2019-02-18 16:49:58 +01:00
Ruben Dashyan
9ea63678e1 [escher] Inline ScrollView::setCommonMargins 2019-02-18 16:49:58 +01:00
Ruben Dashyan
0943406263 Fix HistoryViewCell and ScrollableExactApproximateExxpressionsCell margins issue
Remove all margins from those cells.
Rather add margins to their respective subviews:
 - ScrollableExpressionView
 - ScrollableExactApproximateExpressionsView.

As a notable consequence, the distance in HistoryViewCell between its
subviews becomes 10 instead of 5.

In passing, replace
 - Metric::HistoryHorizontalMargin = 10
 - ScrollableExactApproximateExpressionsView::k_digitHorizontalMargin = 10
 - HistoryViewCell::k_digitVerticalMargin = 5
 - ScrollableExactApproximateExpressionsCell::k_margin = 5
by
 - Metric::CommonSmallMargin = 5
 - Metric::CommonLargeMargin = 10.
2019-02-18 16:49:58 +01:00
Ruben Dashyan
571967088e [escher/scroll_view] Uniformize scroll bars frame across Epsilon 2019-02-18 16:49:58 +01:00
Ruben Dashyan
15de9f93ef [escher/scroll_view] Implement Decorator::indicatorAtIndex explicitly
Instead of using pointer arithmetic
2019-02-18 16:49:58 +01:00
Émilie Feral
3487547f16 [escher] ScrollView: fix Decorators contructor/destructors 2019-02-18 16:49:58 +01:00
Émilie Feral
f18a55defe [escher] ScrollView: make numberOfIndicators method const 2019-02-18 16:49:58 +01:00
Ruben Dashyan
1662b06f36 [escher/scroll_view] Put the decorators inside a union 2019-02-18 16:49:58 +01:00
Ruben Dashyan
76537cd432 [escher/scroll_view] layoutSubviews without screen tearing due to indicators 2019-02-18 16:49:58 +01:00
Ruben Dashyan
da0d42ca3b [apps/calculation/history_view_cell] Fix background colors
Set m_inputView's m_expressionView's background color
2019-02-18 16:49:58 +01:00
Ruben Dashyan
08e8bf0eeb [escher] Implement ScrollView::minimalSizeForOptimalDisplay including margins
Remove from derived classes:
 - apps/calculation/scrollable_expression_view
 - apps/code/consol_line_cell
 - apps/shared/scrollable_exact_approximate_expressions_view
 - escher/layout_field
 - escher/table_view
 - escher/text_field
2019-02-18 16:49:58 +01:00
Ruben Dashyan
fb32d9385e [escher/scroll_view] Encapsulate m_contentView inside m_innerView 2019-02-18 16:49:58 +01:00
Ruben Dashyan
fd654d1c79 [escher/scroll_view] Remove setColorsBackground
Introduced in commit 37da7b95a to avoid screen tearing.
Not necessary anymore since commit 0e9092d2e.
2019-02-18 16:49:58 +01:00
Ruben Dashyan
cda88b3c3b [escher/scroll_view] Fix virtuality issues of layoutSubviews
Method contentSize() made virtual and overridden by ScrollableView
so that ScrollableView and TableView do not need to setSize themselves
and that setSize/setFrame is not called twice over m_contentView.
2019-02-18 16:49:58 +01:00
Ruben Dashyan
c439d6f376 [escher/scroll_view] Mark maxContent...DisplayableWithoutScrolling() as const 2019-02-18 16:49:58 +01:00
Ruben Dashyan
acecb92f75 [escher/*_view_controller] New ViewController::initView() method
Does some part of viewWillAppear().
2019-02-18 16:49:58 +01:00
Ruben Dashyan
faae55eb51 [escher/scroll_view] Replace setShowsIndicators by setDecoratorType 2019-02-18 16:49:58 +01:00
Ruben Dashyan
09e08b43a0 [escher/scroll_view] Define enum class Decorator::Type 2019-02-18 16:49:58 +01:00
Ruben Dashyan
eb17334050 [escher/scroll_view] New Arrow/BarDecorator inherit from Decorator 2019-02-18 16:49:58 +01:00
Ruben Dashyan
1beb8ca98f [escher/scroll_view] Add arrow indicators 2019-02-18 16:49:58 +01:00
Ruben Dashyan
1e958717fb [escher/scroll_view] Rename m_indicatorThickness to m_barsFrameBreadth 2019-02-18 16:49:58 +01:00
Ruben Dashyan
81f80ef602 [escher/scroll_view] Simplify layoutIndicators
Mark indicators' frame as dirty when necessary, indirectly by setFrame
to empty.
2019-02-18 16:49:58 +01:00
Ruben Dashyan
5b78d65b6d [escher/scroll_view] Simplify subviews management 2019-02-18 16:49:58 +01:00
Ruben Dashyan
42d6ec66ab [escher/scroll_view] Prepare ScrollViewIndicator for future ScrollViewArrow 2019-02-18 16:49:58 +01:00
Ruben Dashyan
c02d44988b [escher/scroll_view] New ScrollView::Decorator class
Containing the members specific to indicators
2019-02-18 16:49:58 +01:00
Ruben Dashyan
4936a3e7fe [escher] New ScrollViewHorizontalIndicator and ScrollViewVerticalIndicator 2019-02-18 16:49:58 +01:00
Ruben Dashyan
7114fbc8dc [escher] Simplify ScrollViewIndicator 2019-02-18 16:49:58 +01:00
Léa Saviot
a7208ade0f [apps] Container::switchTo returns a bool (false if could not switch) 2019-01-22 14:57:51 +01:00
Léa Saviot
05bfbe83ac [escher/pointer_text_view] Clean minimalSizeForOptimalDisplay
It was unneedingly overriden + added escape case on nullptr text
2019-01-10 11:42:05 +01:00
Léa Saviot
738d21cc2b [apps/graph] Align function name and expresion baselines 2019-01-10 11:42:02 +01:00
Léa Saviot
4f4ae4e0f7 Merge branch 'master' into python_turtle 2019-01-08 14:32:43 +01:00
Léa Saviot
58f94f5e5f [apps/code] Check that app can be exited before switching to DFU
This fixes the following crash: create a script which contains only
"input()". Execute it, then while in the input, plug in the calculator.
When un-plugging it, the device crashes.
2019-01-07 13:36:01 +01:00
Léa Saviot
df2b9c4d81 [escher/apps] Get children count via template in ToolboxMessageTree::Node 2018-12-21 13:29:32 +01:00
Léa Saviot
ed19d19070 Merge branch 'master' into python_turtle 2018-12-17 15:49:46 +01:00
Léa Saviot
101370c507 [escher] Change ToolboxMessageTree constructors
To simplify ToolboxMessageTree cosntruction
2018-12-17 15:27:38 +01:00