Commit Graph

71 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
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
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
Léa Saviot
9f018eb9d9 [escher/view] setFrame and layoutSubviews can be forced 2020-02-12 15:13:15 +01:00
Léa Saviot
f3376de1b2 [escher/scroll_view] Fix redrawing glitch
Scenario: Go to statistics, add values on the last column, when the
vertical scrollbar appears there is a drawing glitch on the horizontal
bar.
2019-09-04 13:43:37 +02:00
Léa Saviot
41bcc1f133 [escher/scroll_view] Coding style 2019-09-04 13:43:37 +02:00
Léa Saviot
43031928c3 Remove max/min inline from KDCoordinate header 2019-04-12 15:16:51 +02:00
Ruben Dashyan
9ea63678e1 [escher] Inline ScrollView::setCommonMargins 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
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
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
Romain Goyet
84561a929f [escher] Clean the ScrollView, TableView and SelectableTableView constructors 2018-04-18 18:08:07 +02:00
Émilie Feral
2b0b40d6d6 [escher] TextField: force layout after scroll reload when the content
size of scrollview might have changed
2018-03-22 10:22:18 +01:00
Émilie Feral
ee51729eba [escher] Move from table view to scroll view the method a update the
scroll to the size of the content view

Change-Id: I2c4aa457425bf5a8a484aecc061ae27453e9aabb
2017-08-18 13:34:29 +02:00
Romain Goyet
f9b44b8e7b [escher] ScrollView::scrollToContentRect
Change-Id: I20db5dcee4e34b8a0bc08fda5938e8e647d3dea7
2017-08-04 17:26:42 +02:00
Émilie Feral
fe9e6ec59a [escher] Clean scroll view
Change-Id: I7eb00da6c9d8a60847c108eed5355bdb289dbebb
2017-05-31 12:14:24 +02:00
Émilie Feral
1d7d7f4ef1 [escher] In scroll view, mark the indicator rect as dirty if the scroll
indicator parameters has changed

Change-Id: I3136f8613a08d5b8e7c8039502f77f552f7868c2
2017-05-31 11:54:54 +02:00
Émilie Feral
af4d6b6e81 [escher] Divide class selectable table view delegate in 2: selectable
table view data source & selectable table view delegate

Change-Id: I90fbd61e271db3754c13bd0069b95c2026de6814
2017-05-18 14:16:41 +02:00
Émilie Feral
96733dbbdc [apps] Rule of 5 (3)
Change-Id: Ia85b23a09e9debd62b4f3590463a4f16454ef4b7
2017-05-09 14:33:53 +02:00
Émilie Feral
0517066cc0 [escher] Extrude scroll view model to its delegate
Change-Id: If863de63f5f77edb5e2905633067e03aecdd8937
2017-05-03 10:22:01 +02:00
Émilie Feral
0e9092d2e1 [escher] Optimize drawing in scroll view
Change-Id: Ibb3d3a30f6a51df5a410e9040884f8f20e27ee4c
2017-04-13 18:48:20 +02:00
Émilie Feral
a3664a414d [escher] Clean
Change-Id: If2d162e1e2e23fe3489f4e4caed7c43343b51c58
2017-04-04 18:10:10 +02:00
Émilie Feral
8eefe8e490 [escher] Improve scroll indicator render
Change-Id: I22fa1035ba33d2cadfc68fa6727fbaecdadd4efe
2017-01-27 11:52:02 +01:00
Émilie Feral
d45000b3d9 [escher] In palette, improve colors
Change-Id: I2c8f33764cf2befeb994b9b47b46d39f116ae96c
2017-01-27 11:46:05 +01:00
Émilie Feral
37da7b95a2 [escher] add a boolean in table constructor to choose whether to paint
the backgroung

Change-Id: Idee8aff20ab86011775e9a995a2d2f425b60df67
2016-12-08 15:21:52 +01:00
Émilie Feral
d83c101a33 [apps/calculation] Create a specific table view for calculation which
aligns to the bottom

Change-Id: I4fe9763b1d9ae2ae3e898046221b780c51515830
2016-11-04 11:08:15 +01:00
Émilie Feral
54a29ef60c [escher] add a boolean in scrollview to decide wether to display scroll
indicators

Change-Id: I6bc34519668fc73fecf2207596951c3b3a9c8311
2016-11-02 09:46:09 +01:00