Commit Graph

49 Commits

Author SHA1 Message Date
Laury
63d1e0ee4e [themes] Color with pointers 2022-02-11 18:43:50 +01:00
Joachim LF
9b17d1b882 [Update] Epsilon 15.3.1 2021-01-21 19:56:06 +01:00
Hugo Saint-Vignes
e27c668c40 [apps,escher,kandinsky,poincare,python] Replace every "grey" with "gray"
Change-Id: I60a232849dce90f70e6977b6024d6e9b1ce1b731
2020-11-04 15:07:20 +01:00
Gabriel Ozouf
de681705e6 [escher/expression_field] Renamed dumpLayout
Changed dumpLayout's name to moveCursorAndDumpContent, as the name
suggested the method was only usable on layouts (while it also works on
text). The method is also no longer marked const, and the previous name
could imply that it had no side effects.
Likewise, renamed restoreLayout to restoreContent.

Change-Id: I46b320e74c07b48e256dc2146f9ecc15af38a8e6
2020-11-04 15:07:19 +01:00
Gabriel Ozouf
67af3a5b4e [apps/calculation] Fixed grey and yellow squares
When closing and reopening Calculation, if the cursor was on an
EmptyLayout, this layout would be invisible, instead of being denoted by
its usual yellow square.
This also fixes a bug that would leave the grey squares in matrices when
leaving and reopening the app, causing a failed assertion on the simulator.

Change-Id: Ib723797c079f1441f5cde174aa5c492ad4226335
2020-11-04 15:07:19 +01:00
Gabriel Ozouf
e49dc08759 [escher/expression_field] Fixed dumpLayout
Closing the Calculation app because of a full pool would crash the
device, by attempting to dump a layout with no node.

Change-Id: Ic926da61ae93f47eb576848788e1de5e3f94f5bb
2020-11-04 15:07:19 +01:00
Gabriel Ozouf
8ab23f66b5 [escher/expression_field] Methods on layout
Added some methods to manipulate the layout of a LayoutField from an
ExpressionField, like storing into and restoring from a buffer.

Change-Id: I7b7b5b53626f19237a5215bd196e897a518e9577
2020-11-04 14:45:35 +01:00
Quentin
f37040dc8a [Fix] Conflicts 2020-04-16 14:04:56 +02:00
Émilie Feral
675a0d3f4c Add missing definition of static member variables 2020-04-15 10:34:00 -04:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Quentin Guidée
ab8f731515 Fixed some conflicts 2020-02-12 17:42:58 +01:00
Léa Saviot
756eeeb2d8 [poincare/parser] Add context 2020-02-12 15:13:21 +01:00
Ruben Dashyan
7fce83d1dd [escher/expression_field] Detect whether view's height did change by memoizing the height
Such changes used to be detected only when the height was equal to the
maximal allowed value, by detecting whether the height shifted from or
to that maximal value. For that purpose, a boolean was memoized in
InputViewController and in Calculation::EditExpressionController.
2020-02-12 15:13:16 +01:00
Ruben Dashyan
40d75ffefa [escher/expression_field] Remove unused reload() method 2020-02-12 15:13:16 +01:00
Ruben Dashyan
3bc3532358 [escher/expression_field] Replace maximalHeight() by k_maximalHeight
To harmonize with k_minimalHeight
2020-02-12 15:13:16 +01:00
Léa Saviot
9f018eb9d9 [escher/view] setFrame and layoutSubviews can be forced 2020-02-12 15:13:15 +01:00
Ruben Dashyan
ecd6cb29f1 [escher/expression_field] Rename k_textFieldHeight to k_minimalHeight
That constant has nothing to do with TextField. It is the minimal height
of ExpressionField.
2020-02-12 15:13:15 +01:00
Quentin Guidée
058e0552fa Omega theme finished 2019-11-30 22:59:33 +01:00
Quentin Guidée
c68a0cdb33 New Default theme: Omega theme! (Beta) 2019-11-29 19:42:39 +01:00
Quentin Guidée
3b592c847e New dark theme & KDColorWhite -> Palette::BackgroundHard 2019-11-26 23:04:03 +01:00
Quentin Guidée
db269f1204 KDColorBlack -> Palette::Text for the theming engine 2019-11-26 19:22:24 +01:00
Émilie Feral
011142427a [esher] TextField: fix issues:
- when textFieldDidFinishEditing failed ("1+ln(-2)" in a scalar
entry for instance), the previous text was modified even if edition aborted
- The draft buffer was not reinitialized when overriding the draft text
buffer with a text event
2019-08-13 09:44:00 +02:00
Émilie Feral
12060e2ae7 [escher] TextField: all text fields use the same draft text buffer 2019-08-13 09:44:00 +02:00
Émilie Feral
7a4ee746b2 [escher] TextField: call reinitDraftBuffer after edition is complete to
avoid erasing text that is required later.

Fix bug: OK handling on function list in linear mode did not copy the
function expression into the textfield before editing
2019-07-30 11:47:42 +02:00
Ruben Dashyan
7b426adf5b [escher] Fix ExpressionField::inputViewHeight
Since commit

  [escher] Implement ScrollView::minimalSizeForOptimalDisplay including margins

minimalSizeForOptimalDisplay includes the ScrollView margins.
2019-05-03 15:53:21 +02:00
Léa Saviot
496d346049 Remove max/min inline from KDCoordinate header 2019-05-03 15:53:19 +02: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
Léa Saviot
94603b2b7d [poincare] Layout::serialize is serializeForParsing or ParsedExpression
serializeForParsing serializes the layout once,
serializeParsedExpression serializes the layout, parses it and
serializes it again.
2018-11-23 12:04:09 +01:00
Émilie Feral
698332c355 [escher] InputTextDelegate and LayoutFieldDelegate don't inherit from
InputTextDelegate to avoid diamond inheritance
2018-11-23 12:04:03 +01:00
Émilie Feral
0a438b1803 [escher] ExpressionField does not inherit from EditableField 2018-11-23 12:04:02 +01:00
Émilie Feral
01e433a9f2 [escher] Clean Field and Input class hierarchy:
Class hierarchy:
- InputEventHandler
- TextInput
- EditableField derives from InputEventHandler
- LayoutField, TextField and ExpressioField derives from EditableField
- TextArea and TextField derives from TextInput
2018-11-23 12:04:02 +01:00
Romain Goyet
f8beae3b86 [kandinsky] Move to KDFont 2018-10-11 16:44:02 +02:00
Léa Saviot
985f310b1c [escher] Just replace the layout when clearing it in LayoutField 2018-09-14 11:28:37 +02:00
Émilie Feral
aaa20a58fa [poincare] Implement SerializationHelper and
SerializationHelperInterface. WriteTextInBuffer->serialize
2018-08-08 15:31:40 +02:00
Léa Saviot
880c3e59de [poincare] Continue removing layouts 2018-07-03 18:29:08 +02:00
Léa Saviot
3953ca1c67 [escher] Remove duplicate method
Change-Id: Iac03f002cb6928831a8d640f1bcdeba116f71d06
2018-05-17 13:42:20 +02:00
Léa Saviot
b752ab0389 [escher] Add bool forceCursorRightOfText in handleEventWithText
Change-Id: I9124a1bacfce821fc761ddefc4d8b43de82dbc21
2018-05-17 13:42:20 +02:00
Léa Saviot
05334823e5 [escher] Handle empty text in ExpressionLayoutField::handleEventWithText
Change-Id: Ieb8433a7cf24341b576ab76014cc4cf1e36d929b
2018-05-17 13:42:20 +02:00
Léa Saviot
22b0c4c8b1 [escher] Remove duplicate function
Change-Id: I6301f10bf1598a81956909137109ed1a721d3a1a
ExpressionLayoutField::insertLayoutFromTextAtCursor
ExpressionField::handleEventWithText
2018-05-16 18:37:02 +02:00
Léa Saviot
7b6fdf6a1c [escher] Fix ScrollableView content view size.
Change-Id: I531236e7527b3922dac81067d41024e0c5d6bf88
2018-05-08 17:32:55 +02:00
Léa Saviot
3aeb5b9eef [poincare] Fix Layout Field vertical margins.
Change-Id: I36c90574aca915d0f1cb803948b8c85cd28852ab
2018-05-08 16:24:13 +02:00
Léa Saviot
2fd332fba5 [poincare] Fix background fill in ExpressionField.
Change-Id: If12a043525cafe7b98015df88ad144057a5ffdcb
2018-05-08 15:43:41 +02:00
Léa Saviot
3b582a2e46 Merge branch 'SaisieJolie30Apr' into SaisieJolie8May
Change-Id: Ia4196119fc56c5bc3423aea752b49f3f7ba39499
2018-05-08 15:17:51 +02:00
Léa Saviot
19d5115eaa [escher] Add margins in ExpressionField
Change-Id: I51272682246403f0449be19ff6cc75fd5544ad9c
2018-04-26 16:31:09 +02:00
Léa Saviot
13ae1d2545 [apps/escher/toolbox] handleEventWithText for all responders.
This makes the code in the various toolbox more generic. The arguments
of the text to insert are each replaced by a Ion::Charset::Empty.
These Empty chars are used to create layouts in ExpressionLayoutFields,
and to compute the position of the cursor in other fields, before being
removed.

Change-Id: Ie81c1e394b06fef2ab801ccff919d6550f70ec30
2018-04-23 17:18:48 +02:00
Léa Saviot
e5cabe6bda [escher] Fix ExpressionLayoutField::hasText()
Change-Id: I1e0bb0f7dfea6f6b35bbc3ea7374891ea75f48f1
2018-04-23 11:34:01 +02:00
Léa Saviot
117a6d460a [poincare] Stop exposing text/expressionlayout fields in ExpressionField
Change-Id: Ic1afb3f7c1f6bff5ea3bedc6f96bef986b74f6a8
2018-04-23 11:33:53 +02:00
Léa Saviot
894080f1ab [apps/escher] EVWithCursor becomes ELField::ContentView
Change-Id: I719218e4d1d360800e0f1ef3eebeea774c8d5660
2018-04-23 09:41:20 +02:00
Léa Saviot
22ab94209f [apps/escher] Rename EditableExpressionView -> ExpressionField
Change-Id: Iadfb220ee94e68762305060215f1ead0cac951fb
2018-04-23 09:41:20 +02:00