From db269f120467d95a853883e50be5b459c3cb55ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Guid=C3=A9e?= Date: Tue, 26 Nov 2019 19:22:24 +0100 Subject: [PATCH] KDColorBlack -> Palette::Text for the theming engine --- apps/code/console_line_cell.h | 2 +- apps/code/python_text_area.cpp | 2 +- apps/code/script_node_cell.cpp | 4 ++-- apps/graph/list/list_controller.cpp | 2 +- .../list/text_field_with_max_length_and_extension.h | 2 +- apps/hardware_test/arrow_view.cpp | 2 +- apps/home/app_cell.cpp | 4 ++-- apps/probability/cell.cpp | 2 +- apps/probability/parameters_controller.cpp | 4 ++-- apps/sequence/graph/graph_view.cpp | 2 +- apps/sequence/list/list_controller.cpp | 2 +- apps/shared/banner_view.h | 2 +- apps/shared/button_with_separator.cpp | 2 +- apps/shared/cursor_view.cpp | 4 ++-- apps/shared/curve_view.cpp | 6 +++--- apps/shared/function_title_cell.h | 2 +- apps/shared/ok_view.cpp | 2 +- apps/shared/range_parameter_controller.cpp | 4 ++-- apps/shared/round_cursor_view.h | 2 +- .../scrollable_exact_approximate_expressions_view.cpp | 2 +- apps/shared/sum_graph_controller.cpp | 6 +++--- apps/shared/text_field_with_extension.h | 2 +- apps/shared/vertical_cursor_view.cpp | 2 +- apps/solver/equation_list_view.cpp | 10 +++++----- apps/solver/interval_controller.cpp | 4 ++-- apps/solver/solutions_controller.cpp | 4 ++-- apps/statistics/box_axis_view.cpp | 2 +- apps/variable_box_empty_controller.cpp | 2 +- build/config.mak | 3 ++- escher/include/escher/alternate_empty_view_delegate.h | 2 +- escher/include/escher/buffer_text_view.h | 2 +- escher/include/escher/button.h | 2 +- escher/include/escher/editable_text_cell.h | 2 +- escher/include/escher/even_odd_expression_cell.h | 2 +- escher/include/escher/even_odd_message_text_cell.h | 2 +- escher/include/escher/expression_view.h | 2 +- escher/include/escher/message_table_cell_with_buffer.h | 2 +- escher/include/escher/message_text_view.h | 3 ++- escher/include/escher/palette.h | 1 + escher/include/escher/pointer_text_view.h | 2 +- escher/include/escher/solid_text_area.h | 2 +- escher/include/escher/text_field.h | 2 +- escher/include/escher/text_view.h | 3 ++- escher/src/ellipsis_view.cpp | 3 ++- escher/src/even_odd_editable_text_cell.cpp | 2 +- escher/src/expression_field.cpp | 2 +- escher/src/expression_table_cell.cpp | 2 +- escher/src/key_view.cpp | 3 ++- escher/src/layout_field.cpp | 2 +- escher/src/message_table_cell.cpp | 2 +- escher/src/palette.cpp | 1 + escher/src/text_cursor_view.cpp | 3 ++- poincare/include/poincare/layout_node.h | 3 ++- 53 files changed, 75 insertions(+), 66 deletions(-) diff --git a/apps/code/console_line_cell.h b/apps/code/console_line_cell.h index 8cb3ef58a..c2730b5c7 100644 --- a/apps/code/console_line_cell.h +++ b/apps/code/console_line_cell.h @@ -53,7 +53,7 @@ private: ConsoleLineView m_consoleLineView; }; static KDColor textColor(ConsoleLine * line) { - return line->isFromCurrentSession() ? KDColorBlack : Palette::GreyDark; + return line->isFromCurrentSession() ? Palette::Text : Palette::GreyDark; } MessageTextView m_promptView; ScrollableConsoleLineView m_scrollableView; diff --git a/apps/code/python_text_area.cpp b/apps/code/python_text_area.cpp index c7e958aab..4c76b59ef 100644 --- a/apps/code/python_text_area.cpp +++ b/apps/code/python_text_area.cpp @@ -36,7 +36,7 @@ static inline KDColor TokenColor(mp_token_kind_t tokenKind) { if (tokenKind >= MP_TOKEN_DEL_EQUAL && tokenKind <= MP_TOKEN_DEL_MINUS_MORE) { return OperatorColor; } - return KDColorBlack; + return Palette::Text; } static inline size_t TokenLength(mp_lexer_t * lex) { diff --git a/apps/code/script_node_cell.cpp b/apps/code/script_node_cell.cpp index 8fcdbc15a..865275734 100644 --- a/apps/code/script_node_cell.cpp +++ b/apps/code/script_node_cell.cpp @@ -23,10 +23,10 @@ void ScriptNodeCell::ScriptNodeView::setScriptStore(ScriptStore * scriptStore) { } void ScriptNodeCell::ScriptNodeView::drawRect(KDContext * ctx, KDRect rect) const { - ctx->drawString(m_scriptNode->name(), KDPoint(0, Metric::TableCellLabelTopMargin), k_font, KDColorBlack, isHighlighted()? Palette::Select : KDColorWhite); + ctx->drawString(m_scriptNode->name(), KDPoint(0, Metric::TableCellLabelTopMargin), k_font, Palette::Text, isHighlighted()? Palette::Select : KDColorWhite); KDSize nameSize = k_font->stringSize(m_scriptNode->name()); if (m_scriptNode->type() == ScriptNode::Type::Function) { - ctx->drawString(ScriptNodeCell::k_parentheses, KDPoint(nameSize.width(), Metric::TableCellLabelTopMargin), k_font, KDColorBlack, isHighlighted()? Palette::Select : KDColorWhite); + ctx->drawString(ScriptNodeCell::k_parentheses, KDPoint(nameSize.width(), Metric::TableCellLabelTopMargin), k_font, Palette::Text, isHighlighted()? Palette::Select : KDColorWhite); } ctx->drawString(m_scriptStore->scriptAtIndex(m_scriptNode->scriptIndex()).fullName(), KDPoint(0, Metric::TableCellLabelTopMargin + nameSize.height() + k_verticalMargin), k_font, Palette::GreyDark, isHighlighted()? Palette::Select : KDColorWhite); } diff --git a/apps/graph/list/list_controller.cpp b/apps/graph/list/list_controller.cpp index 7d52044c0..9137894b7 100644 --- a/apps/graph/list/list_controller.cpp +++ b/apps/graph/list/list_controller.cpp @@ -178,7 +178,7 @@ void ListController::willDisplayExpressionCellAtIndex(HighlightCell * cell, int Shared::FunctionListController::willDisplayExpressionCellAtIndex(cell, j); FunctionExpressionCell * myCell = (FunctionExpressionCell *)cell; ExpiringPointer f = modelStore()->modelForRecord(modelStore()->recordAtIndex(j)); - KDColor textColor = f->isActive() ? KDColorBlack : Palette::GreyDark; + KDColor textColor = f->isActive() ? Palette::Text : Palette::GreyDark; myCell->setTextColor(textColor); } diff --git a/apps/graph/list/text_field_with_max_length_and_extension.h b/apps/graph/list/text_field_with_max_length_and_extension.h index b14740788..ef46e8ca8 100644 --- a/apps/graph/list/text_field_with_max_length_and_extension.h +++ b/apps/graph/list/text_field_with_max_length_and_extension.h @@ -17,7 +17,7 @@ public: const KDFont * size = KDFont::LargeFont, float horizontalAlignment = 0.0f, float verticalAlignment = 0.5f, - KDColor textColor = KDColorBlack, + KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite) : TextFieldWithExtension(extensionLength, parentResponder, textBuffer, textBufferSize, draftTextBufferSize, inputEventHandlerDelegate, delegate, size, horizontalAlignment, verticalAlignment, textColor, backgroundColor) {} void setDraftTextBufferSize(size_t size) { m_contentView.setDraftTextBufferSize(size); } diff --git a/apps/hardware_test/arrow_view.cpp b/apps/hardware_test/arrow_view.cpp index ad5173c04..a96f65a1c 100644 --- a/apps/hardware_test/arrow_view.cpp +++ b/apps/hardware_test/arrow_view.cpp @@ -30,7 +30,7 @@ const uint8_t arrowDownMask[10][9] = { ArrowView::ArrowView() : m_directionIsUp(true), - m_color(KDColorBlack) + m_color(Palette::Text) { } diff --git a/apps/home/app_cell.cpp b/apps/home/app_cell.cpp index 1b2c1ad8c..b32d8e920 100644 --- a/apps/home/app_cell.cpp +++ b/apps/home/app_cell.cpp @@ -5,7 +5,7 @@ namespace Home { AppCell::AppCell() : HighlightCell(), - m_nameView(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, KDColorBlack, KDColorWhite), + m_nameView(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, Palette::Text, KDColorWhite), m_visible(true) { } @@ -45,7 +45,7 @@ void AppCell::setVisible(bool visible) { } void AppCell::reloadCell() { - m_nameView.setTextColor(isHighlighted() ? KDColorWhite : KDColorBlack); + m_nameView.setTextColor(isHighlighted() ? KDColorWhite : Palette::Text); m_nameView.setBackgroundColor(isHighlighted() ? Palette::YellowDark : KDColorWhite); } diff --git a/apps/probability/cell.cpp b/apps/probability/cell.cpp index a78a116f2..b3cb6f019 100644 --- a/apps/probability/cell.cpp +++ b/apps/probability/cell.cpp @@ -5,7 +5,7 @@ namespace Probability { Cell::Cell() : HighlightCell(), - m_labelView(KDFont::LargeFont, (I18n::Message)0, 0, 0.5, KDColorBlack, KDColorWhite), + m_labelView(KDFont::LargeFont, (I18n::Message)0, 0, 0.5, Palette::Text, KDColorWhite), m_icon(nullptr), m_focusedIcon(nullptr) { diff --git a/apps/probability/parameters_controller.cpp b/apps/probability/parameters_controller.cpp index 3d655dd69..c06bfc283 100644 --- a/apps/probability/parameters_controller.cpp +++ b/apps/probability/parameters_controller.cpp @@ -9,8 +9,8 @@ namespace Probability { ParametersController::ContentView::ContentView(Responder * parentResponder, SelectableTableView * selectableTableView) : m_numberOfParameters(1), m_titleView(KDFont::SmallFont, I18n::Message::ChooseParameters, 0.5f, 0.5f, Palette::GreyDark, Palette::WallScreen), - m_firstParameterDefinition(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen), - m_secondParameterDefinition(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen), + m_firstParameterDefinition(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, Palette::Text, Palette::WallScreen), + m_secondParameterDefinition(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, Palette::Text, Palette::WallScreen), m_selectableTableView(selectableTableView) { } diff --git a/apps/sequence/graph/graph_view.cpp b/apps/sequence/graph/graph_view.cpp index 3ce352dd6..fcffd004d 100644 --- a/apps/sequence/graph/graph_view.cpp +++ b/apps/sequence/graph/graph_view.cpp @@ -30,7 +30,7 @@ void GraphView::drawRect(KDContext * ctx, KDRect rect) const { } drawDot(ctx, rect, x, y, s->color()); if (x >= m_highlightedStart && x <= m_highlightedEnd && record == m_selectedRecord) { - KDColor color = m_shouldColorHighlighted ? s->color() : KDColorBlack; + KDColor color = m_shouldColorHighlighted ? s->color() : Palette::Text; if (y >= 0.0f) { drawSegment(ctx, rect, Axis::Vertical, x, 0.0f, y, color, 1); } else { diff --git a/apps/sequence/list/list_controller.cpp b/apps/sequence/list/list_controller.cpp index d3a491475..a1c96f37c 100644 --- a/apps/sequence/list/list_controller.cpp +++ b/apps/sequence/list/list_controller.cpp @@ -208,7 +208,7 @@ void ListController::willDisplayExpressionCellAtIndex(HighlightCell * cell, int myCell->setLayout(sequence->secondInitialConditionLayout()); } bool active = sequence->isActive(); - KDColor textColor = active ? KDColorBlack : Palette::GreyDark; + KDColor textColor = active ? Palette::Text : Palette::GreyDark; myCell->setTextColor(textColor); } diff --git a/apps/shared/banner_view.h b/apps/shared/banner_view.h index 4bcf14f94..5aa89857e 100644 --- a/apps/shared/banner_view.h +++ b/apps/shared/banner_view.h @@ -12,7 +12,7 @@ public: KDSize minimalSizeForOptimalDisplay() const override; void reload() { layoutSubviews(); } static constexpr const KDFont * Font() { return KDFont::SmallFont; } - static constexpr KDColor TextColor() { return KDColorBlack; } + static constexpr KDColor TextColor() { return Palette::Text; } static constexpr KDColor BackgroundColor() { return Palette::GreyMiddle; } private: static constexpr KDCoordinate LineSpacing = 2; diff --git a/apps/shared/button_with_separator.cpp b/apps/shared/button_with_separator.cpp index a4d6dec1c..e548d5cbb 100644 --- a/apps/shared/button_with_separator.cpp +++ b/apps/shared/button_with_separator.cpp @@ -1,7 +1,7 @@ #include "button_with_separator.h" ButtonWithSeparator::ButtonWithSeparator(Responder * parentResponder, I18n::Message message, Invocation invocation) : - Button(parentResponder, message, invocation, KDFont::LargeFont, KDColorBlack) + Button(parentResponder, message, invocation, KDFont::LargeFont, Palette::Text) { } diff --git a/apps/shared/cursor_view.cpp b/apps/shared/cursor_view.cpp index 792606be7..6203810f1 100644 --- a/apps/shared/cursor_view.cpp +++ b/apps/shared/cursor_view.cpp @@ -5,8 +5,8 @@ namespace Shared { void CursorView::drawRect(KDContext * ctx, KDRect rect) const { KDCoordinate width = bounds().width(); KDCoordinate height = bounds().height(); - ctx->fillRect(KDRect((width-1)/2, 0, 1, height), KDColorBlack); - ctx->fillRect(KDRect(0, (height-1)/2, width, 1), KDColorBlack); + ctx->fillRect(KDRect((width-1)/2, 0, 1, height), Palette::Text); + ctx->fillRect(KDRect(0, (height-1)/2, width, 1), Palette::Text); } KDSize CursorView::minimalSizeForOptimalDisplay() const { diff --git a/apps/shared/curve_view.cpp b/apps/shared/curve_view.cpp index 16d12d719..c5510d395 100644 --- a/apps/shared/curve_view.cpp +++ b/apps/shared/curve_view.cpp @@ -301,7 +301,7 @@ void CurveView::drawLabels(KDContext * ctx, KDRect rect, Axis axis, bool shiftOr labelPosition, k_labelGraduationLength, 1); - ctx->fillRect(graduation, KDColorBlack); + ctx->fillRect(graduation, Palette::Text); } } @@ -352,7 +352,7 @@ void CurveView::drawLabels(KDContext * ctx, KDRect rect, Axis axis, bool shiftOr } KDPoint origin = KDPoint(xPosition, yPosition); if (rect.intersects(KDRect(origin, textSize))) { - ctx->drawString(labelI, origin, k_font, KDColorBlack, backgroundColor); + ctx->drawString(labelI, origin, k_font, Palette::Text, backgroundColor); } } } @@ -449,7 +449,7 @@ void CurveView::drawAxes(KDContext * ctx, KDRect rect) const { } void CurveView::drawAxis(KDContext * ctx, KDRect rect, Axis axis) const { - drawLine(ctx, rect, axis, 0.0f, KDColorBlack, 1); + drawLine(ctx, rect, axis, 0.0f, Palette::Text, 1); } #define LINE_THICKNESS 2 diff --git a/apps/shared/function_title_cell.h b/apps/shared/function_title_cell.h index efb3480ef..0e557b369 100644 --- a/apps/shared/function_title_cell.h +++ b/apps/shared/function_title_cell.h @@ -15,7 +15,7 @@ public: EvenOddCell(), m_orientation(orientation), m_baseline(-1), - m_functionColor(KDColorBlack) + m_functionColor(Palette::Text) {} virtual void setOrientation(Orientation orientation); virtual void setColor(KDColor color); diff --git a/apps/shared/ok_view.cpp b/apps/shared/ok_view.cpp index bb49b69b2..37577d4bc 100644 --- a/apps/shared/ok_view.cpp +++ b/apps/shared/ok_view.cpp @@ -31,7 +31,7 @@ void OkView::drawRect(KDContext * ctx, KDRect rect) const { KDCoordinate width = bounds().width(); KDCoordinate height = bounds().height(); KDRect frame((width-k_okSize)/2, (height-k_okSize)/2, k_okSize, k_okSize); - ctx->blendRectWithMask(frame, KDColorBlack, (const uint8_t *)okMask, s_okWorkingBuffer); + ctx->blendRectWithMask(frame, Palette::Text, (const uint8_t *)okMask, s_okWorkingBuffer); } KDSize OkView::minimalSizeForOptimalDisplay() const { diff --git a/apps/shared/range_parameter_controller.cpp b/apps/shared/range_parameter_controller.cpp index 95779d24c..51d592645 100644 --- a/apps/shared/range_parameter_controller.cpp +++ b/apps/shared/range_parameter_controller.cpp @@ -56,8 +56,8 @@ void RangeParameterController::willDisplayCellForIndex(HighlightCell * cell, int MessageTableCellWithEditableText * myCell = (MessageTableCellWithEditableText *)cell; I18n::Message labels[k_numberOfTextCell+1] = {I18n::Message::XMin, I18n::Message::XMax, I18n::Message::Default, I18n::Message::YMin, I18n::Message::YMax}; myCell->setMessage(labels[index]); - KDColor yColor = m_interactiveRange->yAuto() ? Palette::GreyDark : KDColorBlack; - KDColor colors[k_numberOfTextCell+1] = {KDColorBlack, KDColorBlack, KDColorBlack, yColor, yColor}; + KDColor yColor = m_interactiveRange->yAuto() ? Palette::GreyDark : Palette::Text; + KDColor colors[k_numberOfTextCell+1] = {Palette::Text, Palette::Text, Palette::Text, yColor, yColor}; myCell->setTextColor(colors[index]); FloatParameterController::willDisplayCellForIndex(cell, index); } diff --git a/apps/shared/round_cursor_view.h b/apps/shared/round_cursor_view.h index b84d7e07b..931c86f5b 100644 --- a/apps/shared/round_cursor_view.h +++ b/apps/shared/round_cursor_view.h @@ -9,7 +9,7 @@ namespace Shared { class RoundCursorView : public CursorView { public: - RoundCursorView(KDColor color = KDColorBlack) : m_color(color), m_underneathPixelBufferLoaded(false) {} + RoundCursorView(KDColor color = Palette::Text) : m_color(color), m_underneathPixelBufferLoaded(false) {} void drawRect(KDContext * ctx, KDRect rect) const override; KDSize minimalSizeForOptimalDisplay() const override; void setColor(KDColor color); diff --git a/apps/shared/scrollable_exact_approximate_expressions_view.cpp b/apps/shared/scrollable_exact_approximate_expressions_view.cpp index 7974d4fbe..59df3b3f7 100644 --- a/apps/shared/scrollable_exact_approximate_expressions_view.cpp +++ b/apps/shared/scrollable_exact_approximate_expressions_view.cpp @@ -45,7 +45,7 @@ void ScrollableExactApproximateExpressionsView::ContentCell::setEven(bool even) void ScrollableExactApproximateExpressionsView::ContentCell::reloadTextColor() { if (numberOfSubviews() == 1) { - m_rightExpressionView.setTextColor(KDColorBlack); + m_rightExpressionView.setTextColor(Palette::Text); } else { m_rightExpressionView.setTextColor(Palette::GreyVeryDark); } diff --git a/apps/shared/sum_graph_controller.cpp b/apps/shared/sum_graph_controller.cpp index babf74e0e..4b81b68bb 100644 --- a/apps/shared/sum_graph_controller.cpp +++ b/apps/shared/sum_graph_controller.cpp @@ -155,10 +155,10 @@ void SumGraphController::reloadBannerView() { /* Legend View */ SumGraphController::LegendView::LegendView(SumGraphController * controller, InputEventHandlerDelegate * inputEventHandlerDelegate, CodePoint sumSymbol) : - m_sum(0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle), + m_sum(0.0f, 0.5f, Palette::Text, Palette::GreyMiddle), m_sumLayout(), - m_legend(k_font, I18n::Message::Default, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle), - m_editableZone(controller, m_textBuffer, k_editableZoneBufferSize, TextField::maxBufferSize(), inputEventHandlerDelegate, controller, k_font, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle), + m_legend(k_font, I18n::Message::Default, 0.0f, 0.5f, Palette::Text, Palette::GreyMiddle), + m_editableZone(controller, m_textBuffer, k_editableZoneBufferSize, TextField::maxBufferSize(), inputEventHandlerDelegate, controller, k_font, 0.0f, 0.5f, Palette::Text, Palette::GreyMiddle), m_sumSymbol(sumSymbol) { m_textBuffer[0] = 0; diff --git a/apps/shared/text_field_with_extension.h b/apps/shared/text_field_with_extension.h index 688762ade..9a1a89eac 100644 --- a/apps/shared/text_field_with_extension.h +++ b/apps/shared/text_field_with_extension.h @@ -17,7 +17,7 @@ public: const KDFont * size = KDFont::LargeFont, float horizontalAlignment = 0.0f, float verticalAlignment = 0.5f, - KDColor textColor = KDColorBlack, + KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite) : TextField(parentResponder, textBuffer, textBufferSize, draftTextBufferSize, inputEventHandlerDelegate, delegate, size, horizontalAlignment, verticalAlignment, textColor, backgroundColor), m_extensionLength(extensionLength) diff --git a/apps/shared/vertical_cursor_view.cpp b/apps/shared/vertical_cursor_view.cpp index 05eb2b225..03c5b5abb 100644 --- a/apps/shared/vertical_cursor_view.cpp +++ b/apps/shared/vertical_cursor_view.cpp @@ -4,7 +4,7 @@ namespace Shared { void VerticalCursorView::drawRect(KDContext * ctx, KDRect rect) const { KDCoordinate height = bounds().height(); - ctx->fillRect(KDRect(0, 0, 1, height), KDColorBlack); + ctx->fillRect(KDRect(0, 0, 1, height), Palette::Text); } KDSize VerticalCursorView::minimalSizeForOptimalDisplay() const { diff --git a/apps/solver/equation_list_view.cpp b/apps/solver/equation_list_view.cpp index 7253374cd..6c08a2da8 100644 --- a/apps/solver/equation_list_view.cpp +++ b/apps/solver/equation_list_view.cpp @@ -111,11 +111,11 @@ void EquationListView::BraceView::drawRect(KDContext * ctx, KDRect rect) const { ctx->fillRect(bounds(), KDColorWhite); KDCoordinate height = bounds().height(); KDCoordinate margin = 3; - ctx->blendRectWithMask(KDRect(margin, 0, braceExtremumWidth, braceExtremumHeight), KDColorBlack, (const uint8_t *)topBrace, (KDColor *)(s_braceWorkingBuffer)); - ctx->blendRectWithMask(KDRect(0, height/2-braceCenterHeight/2, braceCenterWidth, braceCenterHeight), KDColorBlack, (const uint8_t *)middleBrace, (KDColor *)(s_braceWorkingBuffer)); - ctx->blendRectWithMask(KDRect(margin, height-braceExtremumHeight, braceExtremumWidth, braceExtremumHeight), KDColorBlack, (const uint8_t *)bottomBrace, (KDColor *)(s_braceWorkingBuffer)); - ctx->fillRect(KDRect(margin, braceExtremumHeight, 1, height/2-braceCenterHeight/2-braceExtremumHeight), KDColorBlack); - ctx->fillRect(KDRect(margin, height/2+braceCenterHeight/2, 1, height/2-braceExtremumHeight/2-braceExtremumHeight), KDColorBlack); + ctx->blendRectWithMask(KDRect(margin, 0, braceExtremumWidth, braceExtremumHeight), Palette::Text, (const uint8_t *)topBrace, (KDColor *)(s_braceWorkingBuffer)); + ctx->blendRectWithMask(KDRect(0, height/2-braceCenterHeight/2, braceCenterWidth, braceCenterHeight), Palette::Text, (const uint8_t *)middleBrace, (KDColor *)(s_braceWorkingBuffer)); + ctx->blendRectWithMask(KDRect(margin, height-braceExtremumHeight, braceExtremumWidth, braceExtremumHeight), Palette::Text, (const uint8_t *)bottomBrace, (KDColor *)(s_braceWorkingBuffer)); + ctx->fillRect(KDRect(margin, braceExtremumHeight, 1, height/2-braceCenterHeight/2-braceExtremumHeight), Palette::Text); + ctx->fillRect(KDRect(margin, height/2+braceCenterHeight/2, 1, height/2-braceExtremumHeight/2-braceExtremumHeight), Palette::Text); } KDSize EquationListView::BraceView::minimalSizeForOptimalDisplay() const { diff --git a/apps/solver/interval_controller.cpp b/apps/solver/interval_controller.cpp index cb452a0ce..7d10ab474 100644 --- a/apps/solver/interval_controller.cpp +++ b/apps/solver/interval_controller.cpp @@ -7,8 +7,8 @@ namespace Solver { IntervalController::ContentView::ContentView(SelectableTableView * selectableTableView) : - m_instructions0(KDFont::SmallFont, I18n::Message::ApproximateSolutionIntervalInstruction0, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen), - m_instructions1(KDFont::SmallFont, I18n::Message::ApproximateSolutionIntervalInstruction1, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen), + m_instructions0(KDFont::SmallFont, I18n::Message::ApproximateSolutionIntervalInstruction0, 0.5f, 0.5f, Palette::Text, Palette::WallScreen), + m_instructions1(KDFont::SmallFont, I18n::Message::ApproximateSolutionIntervalInstruction1, 0.5f, 0.5f, Palette::Text, Palette::WallScreen), m_selectableTableView(selectableTableView) { } diff --git a/apps/solver/solutions_controller.cpp b/apps/solver/solutions_controller.cpp index db0657eeb..72e045541 100644 --- a/apps/solver/solutions_controller.cpp +++ b/apps/solver/solutions_controller.cpp @@ -18,8 +18,8 @@ namespace Solver { static inline KDCoordinate maxCoordinate(KDCoordinate x, KDCoordinate y) { return x > y ? x : y; } SolutionsController::ContentView::ContentView(SolutionsController * controller) : - m_warningMessageView0(KDFont::SmallFont, I18n::Message::Default, 0.5f, 0.5f, KDColorBlack, Palette::WallScreenDark), - m_warningMessageView1(KDFont::SmallFont, I18n::Message::Default, 0.5f, 0.5f, KDColorBlack, Palette::WallScreenDark), + m_warningMessageView0(KDFont::SmallFont, I18n::Message::Default, 0.5f, 0.5f, Palette::Text, Palette::WallScreenDark), + m_warningMessageView1(KDFont::SmallFont, I18n::Message::Default, 0.5f, 0.5f, Palette::Text, Palette::WallScreenDark), m_selectableTableView(controller), m_displayWarningMoreSolutions(false) { diff --git a/apps/statistics/box_axis_view.cpp b/apps/statistics/box_axis_view.cpp index 1510fc5da..fdc270c6d 100644 --- a/apps/statistics/box_axis_view.cpp +++ b/apps/statistics/box_axis_view.cpp @@ -8,7 +8,7 @@ namespace Statistics { void BoxAxisView::drawRect(KDContext * ctx, KDRect rect) const { ctx->fillRect(rect, KDColorWhite); KDRect lineRect = KDRect(0, k_axisMargin, bounds().width(), 1); - ctx->fillRect(lineRect, KDColorBlack); + ctx->fillRect(lineRect, Palette::Text); drawLabels(ctx, rect, Axis::Horizontal, false, false, true, k_axisMargin); } diff --git a/apps/variable_box_empty_controller.cpp b/apps/variable_box_empty_controller.cpp index 207642236..37bcdc694 100644 --- a/apps/variable_box_empty_controller.cpp +++ b/apps/variable_box_empty_controller.cpp @@ -7,7 +7,7 @@ using namespace Poincare; using namespace Ion; VariableBoxEmptyController::VariableBoxEmptyView::VariableBoxEmptyView() : - m_layoutExample(0.5f, 0.5f, KDColorBlack, Palette::WallScreen) + m_layoutExample(0.5f, 0.5f, Palette::Text, Palette::WallScreen) { for (int i = 0; i < k_numberOfMessages; i++) { m_messages[i].setFont(k_font); diff --git a/build/config.mak b/build/config.mak index 21dcdb8e8..6a3e3c583 100644 --- a/build/config.mak +++ b/build/config.mak @@ -7,7 +7,8 @@ EPSILON_VERSION ?= 12.0.0 EPSILON_CUSTOM_VERSION ?= 1.17.0-0 # USERNAME ?= N/A # Valid values are "none", "update", "beta" -EPSILON_APPS ?= calculation rpn graph code statistics probability solver atom sequence regression settings +# EPSILON_APPS ?= calculation rpn graph code statistics probability solver atom sequence regression settings +EPSILON_APPS ?= calculation graph code statistics probability solver atom sequence regression settings EPSILON_I18N ?= en fr es de pt EPSILON_GETOPT ?= 0 ESCHER_LOG_EVENTS_BINARY ?= 0 diff --git a/escher/include/escher/alternate_empty_view_delegate.h b/escher/include/escher/alternate_empty_view_delegate.h index 4912677b9..5cb8ec66e 100644 --- a/escher/include/escher/alternate_empty_view_delegate.h +++ b/escher/include/escher/alternate_empty_view_delegate.h @@ -17,7 +17,7 @@ public: class AlternateEmptyViewDefaultDelegate : public AlternateEmptyViewDelegate { public: - AlternateEmptyViewDefaultDelegate() : m_message(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen) {} + AlternateEmptyViewDefaultDelegate() : m_message(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, Palette::Text, Palette::WallScreen) {} virtual I18n::Message emptyMessage() = 0; View * emptyView() override { m_message.setMessage(emptyMessage()); diff --git a/escher/include/escher/buffer_text_view.h b/escher/include/escher/buffer_text_view.h index 5c2e0323e..4a4d9de0c 100644 --- a/escher/include/escher/buffer_text_view.h +++ b/escher/include/escher/buffer_text_view.h @@ -7,7 +7,7 @@ class BufferTextView : public TextView { public: static constexpr int k_maxNumberOfChar = 256; BufferTextView(const KDFont * font = KDFont::LargeFont, float horizontalAlignment = 0.5f, float verticalAlignment = 0.5f, - KDColor textColor = KDColorBlack, KDColor backgroundColor = KDColorWhite); + KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite); void setText(const char * text) override; const char * text() const override; void appendText(const char * text); diff --git a/escher/include/escher/button.h b/escher/include/escher/button.h index a163b00a9..7ec7b0a86 100644 --- a/escher/include/escher/button.h +++ b/escher/include/escher/button.h @@ -10,7 +10,7 @@ class Button : public HighlightCell, public Responder { public: - Button(Responder * parentResponder, I18n::Message textBody, Invocation invocation, const KDFont * font = KDFont::SmallFont, KDColor textColor = KDColorBlack); + Button(Responder * parentResponder, I18n::Message textBody, Invocation invocation, const KDFont * font = KDFont::SmallFont, KDColor textColor = Palette::Text); void setMessage(I18n::Message message); bool handleEvent(Ion::Events::Event event) override; void setHighlighted(bool highlight) override; diff --git a/escher/include/escher/editable_text_cell.h b/escher/include/escher/editable_text_cell.h index d2e4df5ee..7f7691146 100644 --- a/escher/include/escher/editable_text_cell.h +++ b/escher/include/escher/editable_text_cell.h @@ -11,7 +11,7 @@ class EditableTextCell : public HighlightCell, public Responder { public: EditableTextCell(Responder * parentResponder = nullptr, InputEventHandlerDelegate * inputEventHandlerDelegate = nullptr, TextFieldDelegate * delegate = nullptr, const KDFont * font = KDFont::LargeFont, - float horizontalAlignment = 0.0f, float verticalAlignment = 0.5f, KDColor textColor = KDColorBlack, KDColor = KDColorWhite, KDCoordinate topMargin = 0, KDCoordinate rightMargin = 0, KDCoordinate bottomMargin = 0, KDCoordinate leftMargin = 0); + float horizontalAlignment = 0.0f, float verticalAlignment = 0.5f, KDColor textColor = Palette::Text, KDColor = KDColorWhite, KDCoordinate topMargin = 0, KDCoordinate rightMargin = 0, KDCoordinate bottomMargin = 0, KDCoordinate leftMargin = 0); TextField * textField(); void setMargins(KDCoordinate topMargin = 0, KDCoordinate rightMargin = 0, KDCoordinate bottomMargin = 0, KDCoordinate leftMargin = 0); void setHighlighted(bool highlight) override; diff --git a/escher/include/escher/even_odd_expression_cell.h b/escher/include/escher/even_odd_expression_cell.h index 5a63bfc36..ab19e8c4a 100644 --- a/escher/include/escher/even_odd_expression_cell.h +++ b/escher/include/escher/even_odd_expression_cell.h @@ -7,7 +7,7 @@ class EvenOddExpressionCell : public EvenOddCell { public: EvenOddExpressionCell(float horizontalAlignment = 0.0f, float verticalAlignment = 0.5f, - KDColor textColor = KDColorBlack, KDColor backgroundColor = KDColorWhite); + KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite); void setEven(bool even) override; void setHighlighted(bool highlight) override; void setLayout(Poincare::Layout layout); diff --git a/escher/include/escher/even_odd_message_text_cell.h b/escher/include/escher/even_odd_message_text_cell.h index 4b5e3c63e..eb93700a6 100644 --- a/escher/include/escher/even_odd_message_text_cell.h +++ b/escher/include/escher/even_odd_message_text_cell.h @@ -11,7 +11,7 @@ public: EvenOddMessageTextCell(const KDFont * font = KDFont::LargeFont); void setEven(bool even) override; void setHighlighted(bool highlight) override; - void setMessage(I18n::Message textContent, KDColor textColor = KDColorBlack); + void setMessage(I18n::Message textContent, KDColor textColor = Palette::Text); void setAlignment(float horizontalAlignment, float verticalAlignment); void setMessageFont(const KDFont * font) { m_messageTextView.setFont(font); } protected: diff --git a/escher/include/escher/expression_view.h b/escher/include/escher/expression_view.h index b11ea2db6..7fd684f3d 100644 --- a/escher/include/escher/expression_view.h +++ b/escher/include/escher/expression_view.h @@ -14,7 +14,7 @@ class ExpressionView : public View { public: ExpressionView(float horizontalAlignment = 0.0f, float verticalAlignment = 0.5f, - KDColor textColor = KDColorBlack, KDColor backgroundColor = KDColorWhite); + KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite); Poincare::Layout layout() const { return m_layout; } bool setLayout(Poincare::Layout layout); void drawRect(KDContext * ctx, KDRect rect) const override; diff --git a/escher/include/escher/message_table_cell_with_buffer.h b/escher/include/escher/message_table_cell_with_buffer.h index a2d014c08..60e0840be 100644 --- a/escher/include/escher/message_table_cell_with_buffer.h +++ b/escher/include/escher/message_table_cell_with_buffer.h @@ -6,7 +6,7 @@ class MessageTableCellWithBuffer : public MessageTableCell { public: - MessageTableCellWithBuffer(I18n::Message message = (I18n::Message)0, const KDFont * font = KDFont::SmallFont, const KDFont * accessoryFont = KDFont::LargeFont, KDColor accessoryTextColor = KDColorBlack); + MessageTableCellWithBuffer(I18n::Message message = (I18n::Message)0, const KDFont * font = KDFont::SmallFont, const KDFont * accessoryFont = KDFont::LargeFont, KDColor accessoryTextColor = Palette::Text); View * accessoryView() const override; void setHighlighted(bool highlight) override; void setAccessoryText(const char * textBody); diff --git a/escher/include/escher/message_text_view.h b/escher/include/escher/message_text_view.h index 7ae1e978b..3adcd6c73 100644 --- a/escher/include/escher/message_text_view.h +++ b/escher/include/escher/message_text_view.h @@ -3,11 +3,12 @@ #include #include +#include class MessageTextView : public TextView { public: MessageTextView(const KDFont * font = KDFont::LargeFont, I18n::Message message = (I18n::Message)0, float horizontalAlignment = 0.0f, float verticalAlignment = 0.0f, - KDColor textColor = KDColorBlack, KDColor backgroundColor = KDColorWhite); + KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite); void setText(const char * text) override; void setMessage(I18n::Message message); const char * text() const override; diff --git a/escher/include/escher/palette.h b/escher/include/escher/palette.h index 91a3b1366..5888bd613 100644 --- a/escher/include/escher/palette.h +++ b/escher/include/escher/palette.h @@ -5,6 +5,7 @@ class Palette { public: + constexpr static KDColor Text = KDColor::RGB24(0x000000); constexpr static KDColor YellowDark = KDColor::RGB24(0xffb734); constexpr static KDColor YellowLight = KDColor::RGB24(0xffcc7b); constexpr static KDColor PurpleBright = KDColor::RGB24(0x656975); diff --git a/escher/include/escher/pointer_text_view.h b/escher/include/escher/pointer_text_view.h index bb2ec650d..45a3109c8 100644 --- a/escher/include/escher/pointer_text_view.h +++ b/escher/include/escher/pointer_text_view.h @@ -7,7 +7,7 @@ class PointerTextView : public TextView { public: PointerTextView(const KDFont * font = KDFont::LargeFont, const char * text = nullptr, float horizontalAlignment = 0.0f, float verticalAlignment = 0.0f, - KDColor textColor = KDColorBlack, KDColor backgroundColor = KDColorWhite); + KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite); const char * text() const override { return m_text; } void setText(const char * text) override; private: diff --git a/escher/include/escher/solid_text_area.h b/escher/include/escher/solid_text_area.h index e38ffe498..d72265a12 100644 --- a/escher/include/escher/solid_text_area.h +++ b/escher/include/escher/solid_text_area.h @@ -9,7 +9,7 @@ class SolidTextArea : public TextArea { public: SolidTextArea(Responder * parentResponder, const KDFont * font = KDFont::LargeFont, - KDColor textColor = KDColorBlack, KDColor backgroundColor = KDColorWhite) : + KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite) : TextArea(parentResponder, &m_contentView, font), m_contentView(font, textColor, backgroundColor) {} protected: diff --git a/escher/include/escher/text_field.h b/escher/include/escher/text_field.h index 2c6e97211..288729d16 100644 --- a/escher/include/escher/text_field.h +++ b/escher/include/escher/text_field.h @@ -19,7 +19,7 @@ public: TextField(Responder * parentResponder, char * textBuffer, size_t textBufferSize, size_t draftTextBufferSize, InputEventHandlerDelegate * inputEventHandlerDelegate, TextFieldDelegate * delegate = nullptr, const KDFont * font = KDFont::LargeFont, float horizontalAlignment = 0.0f, float verticalAlignment = 0.5f, - KDColor textColor = KDColorBlack, KDColor backgroundColor = KDColorWhite); + KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite); void setBackgroundColor(KDColor backgroundColor) override; void setTextColor(KDColor textColor); void setDelegates(InputEventHandlerDelegate * inputEventHandlerDelegate, TextFieldDelegate * delegate) { m_inputEventHandlerDelegate = inputEventHandlerDelegate; m_delegate = delegate; } diff --git a/escher/include/escher/text_view.h b/escher/include/escher/text_view.h index 7c449e22a..d88039cb5 100644 --- a/escher/include/escher/text_view.h +++ b/escher/include/escher/text_view.h @@ -2,6 +2,7 @@ #define ESCHER_TEXT_VIEW_H #include +#include #include /* alignment = 0 -> align left or top @@ -10,7 +11,7 @@ class TextView : public View { public: - TextView(const KDFont * font = KDFont::LargeFont, float horizontalAlignment = 0.0f, float verticalAlignment = 0.0f, KDColor textColor = KDColorBlack, KDColor backgroundColor = KDColorWhite) : + TextView(const KDFont * font = KDFont::LargeFont, float horizontalAlignment = 0.0f, float verticalAlignment = 0.0f, KDColor textColor = Palette::Text, KDColor backgroundColor = KDColorWhite) : View(), m_font(font), m_horizontalAlignment(horizontalAlignment), diff --git a/escher/src/ellipsis_view.cpp b/escher/src/ellipsis_view.cpp index f965ea447..01c1e5782 100644 --- a/escher/src/ellipsis_view.cpp +++ b/escher/src/ellipsis_view.cpp @@ -1,4 +1,5 @@ #include +#include #include const uint8_t ellipsisMask[EllipsisView::k_ellipsisHeight][EllipsisView::k_ellipsisWidth] = { @@ -18,7 +19,7 @@ void EllipsisView::drawRect(KDContext * ctx, KDRect rect) const { KDCoordinate heightCenter = bounds().height()/2; KDCoordinate ellipsisHalfHeight = k_ellipsisHeight/2; KDRect frame(widthCenter - ellipsisHalfWidth, heightCenter - ellipsisHalfHeight, k_ellipsisWidth, k_ellipsisHeight); - ctx->blendRectWithMask(frame, KDColorBlack, (const uint8_t *)ellipsisMask, s_ellipsisWorkingBuffer); + ctx->blendRectWithMask(frame, Palette::Text, (const uint8_t *)ellipsisMask, s_ellipsisWorkingBuffer); } KDSize EllipsisView::minimalSizeForOptimalDisplay() const { diff --git a/escher/src/even_odd_editable_text_cell.cpp b/escher/src/even_odd_editable_text_cell.cpp index 1f1c96030..2d2fcaebc 100644 --- a/escher/src/even_odd_editable_text_cell.cpp +++ b/escher/src/even_odd_editable_text_cell.cpp @@ -5,7 +5,7 @@ EvenOddEditableTextCell::EvenOddEditableTextCell(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, TextFieldDelegate * delegate, const KDFont * font, float horizontalAlignment, float verticalAlignment, KDCoordinate topMargin, KDCoordinate rightMargin, KDCoordinate bottomMargin, KDCoordinate leftMargin) : EvenOddCell(), Responder(parentResponder), - m_editableCell(this, inputEventHandlerDelegate, delegate, font, horizontalAlignment, verticalAlignment, KDColorBlack, KDColorWhite, topMargin, rightMargin, bottomMargin, leftMargin) + m_editableCell(this, inputEventHandlerDelegate, delegate, font, horizontalAlignment, verticalAlignment, Palette::Text, KDColorWhite, topMargin, rightMargin, bottomMargin, leftMargin) { } diff --git a/escher/src/expression_field.cpp b/escher/src/expression_field.cpp index 129893c13..fd1e62a35 100644 --- a/escher/src/expression_field.cpp +++ b/escher/src/expression_field.cpp @@ -8,7 +8,7 @@ static inline KDCoordinate maxCoordinate(KDCoordinate x, KDCoordinate y) { retur ExpressionField::ExpressionField(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, TextFieldDelegate * textFieldDelegate, LayoutFieldDelegate * layoutFieldDelegate) : Responder(parentResponder), View(), - m_textField(parentResponder, nullptr, k_textFieldBufferSize, k_textFieldBufferSize, inputEventHandlerDelegate, textFieldDelegate, KDFont::LargeFont, 0.0f, 0.5f, KDColorBlack, KDColorWhite), + m_textField(parentResponder, nullptr, k_textFieldBufferSize, k_textFieldBufferSize, inputEventHandlerDelegate, textFieldDelegate, KDFont::LargeFont, 0.0f, 0.5f, Palette::Text, KDColorWhite), m_layoutField(parentResponder, inputEventHandlerDelegate, layoutFieldDelegate) { // Initialize text field diff --git a/escher/src/expression_table_cell.cpp b/escher/src/expression_table_cell.cpp index b8db531c9..12f76e418 100644 --- a/escher/src/expression_table_cell.cpp +++ b/escher/src/expression_table_cell.cpp @@ -4,7 +4,7 @@ ExpressionTableCell::ExpressionTableCell(Layout layout) : TableCell(layout), - m_labelExpressionView(0.0f, 0.5f, KDColorBlack, KDColorWhite) + m_labelExpressionView(0.0f, 0.5f, Palette::Text, KDColorWhite) { } diff --git a/escher/src/key_view.cpp b/escher/src/key_view.cpp index 1c1022f5b..ba82e3daf 100644 --- a/escher/src/key_view.cpp +++ b/escher/src/key_view.cpp @@ -1,4 +1,5 @@ #include +#include const uint8_t upMask[KeyView::k_keySize][KeyView::k_keySize] = { {0xFF, 0xFF, 0xFF, 0x45, 0x45, 0xFF, 0xFF, 0xFF}, @@ -83,7 +84,7 @@ void KeyView::drawRect(KDContext * ctx, KDRect rect) const { KDCoordinate width = bounds().width(); KDCoordinate height = bounds().height(); KDRect frame((width - k_keySize)/2, (height - k_keySize)/2, k_keySize, k_keySize); - ctx->blendRectWithMask(frame, KDColorBlack, mask(), s_keyWorkingBuffer); + ctx->blendRectWithMask(frame, Palette::Text, mask(), s_keyWorkingBuffer); } KDSize KeyView::minimalSizeForOptimalDisplay() const { diff --git a/escher/src/layout_field.cpp b/escher/src/layout_field.cpp index 9d04cef04..769448640 100644 --- a/escher/src/layout_field.cpp +++ b/escher/src/layout_field.cpp @@ -12,7 +12,7 @@ static inline KDCoordinate minCoordinate(KDCoordinate x, KDCoordinate y) { retur LayoutField::ContentView::ContentView() : m_cursor(), - m_expressionView(0.0f, 0.5f, KDColorBlack, KDColorWhite), + m_expressionView(0.0f, 0.5f, Palette::Text, KDColorWhite), m_cursorView(), m_isEditing(false) { diff --git a/escher/src/message_table_cell.cpp b/escher/src/message_table_cell.cpp index 083b55605..c990e1cf9 100644 --- a/escher/src/message_table_cell.cpp +++ b/escher/src/message_table_cell.cpp @@ -4,7 +4,7 @@ MessageTableCell::MessageTableCell(I18n::Message label, const KDFont * font, Layout layout) : TableCell(layout), - m_messageTextView(font, label, 0, 0.5, KDColorBlack, KDColorWhite) + m_messageTextView(font, label, 0, 0.5, Palette::Text, KDColorWhite) { } diff --git a/escher/src/palette.cpp b/escher/src/palette.cpp index 54bc62551..976990e75 100644 --- a/escher/src/palette.cpp +++ b/escher/src/palette.cpp @@ -1,5 +1,6 @@ #include +constexpr KDColor Palette::Text; constexpr KDColor Palette::YellowDark; constexpr KDColor Palette::YellowLight; constexpr KDColor Palette::PurpleBright; diff --git a/escher/src/text_cursor_view.cpp b/escher/src/text_cursor_view.cpp index 6ef9a6ebe..c1b57dc2b 100644 --- a/escher/src/text_cursor_view.cpp +++ b/escher/src/text_cursor_view.cpp @@ -1,8 +1,9 @@ #include +#include void TextCursorView::drawRect(KDContext * ctx, KDRect rect) const { KDCoordinate height = bounds().height(); - ctx->fillRect(KDRect(0, 0, 1, height), KDColorBlack); + ctx->fillRect(KDRect(0, 0, 1, height), Palette::Text); } KDSize TextCursorView::minimalSizeForOptimalDisplay() const { diff --git a/poincare/include/poincare/layout_node.h b/poincare/include/poincare/layout_node.h index 9075ede02..70fbad761 100644 --- a/poincare/include/poincare/layout_node.h +++ b/poincare/include/poincare/layout_node.h @@ -2,6 +2,7 @@ #define POINCARE_LAYOUT_NODE_H #include +#include #include namespace Poincare { @@ -60,7 +61,7 @@ public: bool isIdenticalTo(Layout l); // Rendering - void draw(KDContext * ctx, KDPoint p, KDColor expressionColor = KDColorBlack, KDColor backgroundColor = KDColorWhite); + void draw(KDContext * ctx, KDPoint p, KDColor expressionColor = Palette::Text, KDColor backgroundColor = KDColorWhite); KDPoint origin(); KDPoint absoluteOrigin(); KDSize layoutSize();