Commit Graph

961 Commits

Author SHA1 Message Date
Romain Goyet
0c83253d2e [scripts] Use BUILD_DIR instead of build_dir 2019-03-06 15:00:59 +01:00
Romain Goyet
bd6339f9dc [make] Rename OUTPUT_DIRECTORY to build_dir 2019-03-06 15:00:59 +01:00
Romain Goyet
4f1d74f44b [build] Use an out-of-tree build 2019-03-06 15:00:59 +01:00
Émilie Feral
ac6f23684d [poincare] Clean Expression and Layout builders
Before: Opposite(Opposite(Rational(1))) misleadingly created the
expression "-1"; now, Opposite::Builder(Opposite::Builder(Rational(1)))
creates "--1"
2019-02-21 11:29:35 +01:00
Ruben Dashyan
b3d15d7e7f [escher/table_view] layoutSubviews of m_contentView first 2019-02-18 16:49:58 +01: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
1ac829ca18 [escher/scroll_view_indicator] Fix rounding issues for bars 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
9b0e2ac059 [escher/scroll_view] Simplify scrollToContentPoint 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
6f9493db5d [escher/scroll_view] Use virtuality of Decorator methods 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
Ruben Dashyan
8772e1dc10 [escher] Factorize ScrollView::layoutSubViews() 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
4128ebb864 [escher] In container, check the app can be exited before switching apps 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
b8b4d481b5 [escher] Use the vertical alignment in ExpressionView 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
Léa Saviot
62de89ceba [apps/code] Fix 'blue', 'red', ... python command insertion
The 'blue' command would be stripped and become ''.
2018-12-17 14:25:31 +01:00
Léa Saviot
62cda01d2b [python/turtle] color and pencolor can take various arguments
These two methods are equal.
2018-12-11 14:42:04 +01:00
Léa Saviot
cc3beb6014 [python/turtle] Turtle::reset() method 2018-12-06 17:26:43 +01:00
Émilie Feral
10556b477b [apps] Tidy snapshots when leaving the app following an exception 2018-12-03 13:47:52 +01:00