From ec43f41a8eba6d54eff8502b2f3f0523b9552c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Guid=C3=A9e?= Date: Fri, 29 Nov 2019 23:35:35 +0100 Subject: [PATCH] Omega theme: some fixes --- apps/probability/distribution_curve_view.h | 2 +- apps/regression/calculation_controller.cpp | 2 +- ...table_cell_with_editable_text_with_separator.cpp | 2 +- apps/shared/hideable.h | 2 +- apps/shared/store_controller.cpp | 2 +- apps/shared/values_controller.cpp | 2 +- apps/solver/solutions_controller.cpp | 10 ++++++---- apps/statistics/calculation_controller.cpp | 2 +- apps/variable_box_empty_controller.cpp | 4 ++-- escher/include/escher/palette.h | 1 + escher/src/palette.cpp | 13 +++++++------ 11 files changed, 23 insertions(+), 19 deletions(-) diff --git a/apps/probability/distribution_curve_view.h b/apps/probability/distribution_curve_view.h index 68af5e3c3..e1288c3be 100644 --- a/apps/probability/distribution_curve_view.h +++ b/apps/probability/distribution_curve_view.h @@ -30,7 +30,7 @@ protected: private: static float EvaluateAtAbscissa(float abscissa, void * model, void * context); static Poincare::Coordinate2D EvaluateXYAtAbscissa(float abscissa, void * model, void * context); - static constexpr KDColor k_backgroundColor = Palette::WallScreen; + static constexpr KDColor k_backgroundColor = Palette::BackgroundApps; void drawStandardNormal(KDContext * ctx, KDRect rect, float colorLowerBound, float colorUpperBound) const; char m_labels[k_maxNumberOfXLabels][k_labelBufferMaxSize]; Distribution * m_distribution; diff --git a/apps/regression/calculation_controller.cpp b/apps/regression/calculation_controller.cpp index 4593e5ee7..ff02fa19c 100644 --- a/apps/regression/calculation_controller.cpp +++ b/apps/regression/calculation_controller.cpp @@ -28,7 +28,7 @@ CalculationController::CalculationController(Responder * parentResponder, Button { m_r2Layout = HorizontalLayout::Builder(CodePointLayout::Builder('r', KDFont::SmallFont), VerticalOffsetLayout::Builder(CodePointLayout::Builder('2', KDFont::SmallFont), VerticalOffsetLayoutNode::Position::Superscript)); m_selectableTableView.setVerticalCellOverlap(0); - m_selectableTableView.setBackgroundColor(Palette::WallScreenDark); + m_selectableTableView.setBackgroundColor(Palette::BackgroundAppsSecondary); m_selectableTableView.setMargins(k_margin, k_scrollBarMargin, k_scrollBarMargin, k_margin); m_r2TitleCell.setAlignment(1.0f, 0.5f); for (int i = 0; i < Store::k_numberOfSeries; i++) { diff --git a/apps/settings/sub_menu/message_table_cell_with_editable_text_with_separator.cpp b/apps/settings/sub_menu/message_table_cell_with_editable_text_with_separator.cpp index 44cf13d25..41561ed7e 100644 --- a/apps/settings/sub_menu/message_table_cell_with_editable_text_with_separator.cpp +++ b/apps/settings/sub_menu/message_table_cell_with_editable_text_with_separator.cpp @@ -15,7 +15,7 @@ void MessageTableCellWithEditableTextWithSeparator::setHighlighted(bool highligh void MessageTableCellWithEditableTextWithSeparator::drawRect(KDContext * ctx, KDRect rect) const { ctx->fillRect(KDRect(0, 0, bounds().width(), k_separatorThickness), Palette::GreyBright); - ctx->fillRect(KDRect(0, k_separatorThickness, bounds().width(), k_margin-k_separatorThickness), Palette::WallScreen); + ctx->fillRect(KDRect(0, k_separatorThickness, bounds().width(), k_margin-k_separatorThickness), Palette::BackgroundApps); } int MessageTableCellWithEditableTextWithSeparator::numberOfSubviews() const { diff --git a/apps/shared/hideable.h b/apps/shared/hideable.h index 94ff3b998..12d54d006 100644 --- a/apps/shared/hideable.h +++ b/apps/shared/hideable.h @@ -10,7 +10,7 @@ public: Hideable() : m_hide(false) {} - static KDColor hideColor() { return Palette::WallScreenDark; } + static KDColor hideColor() { return Palette::BackgroundAppsSecondary; } bool hidden() const { return m_hide; } virtual void setHide(bool hide) { m_hide = hide; } virtual void reinit() {} diff --git a/apps/shared/store_controller.cpp b/apps/shared/store_controller.cpp index 876b7682e..0fa05cfa9 100644 --- a/apps/shared/store_controller.cpp +++ b/apps/shared/store_controller.cpp @@ -18,7 +18,7 @@ StoreController::ContentView::ContentView(DoublePairStore * store, Responder * p m_formulaInputView(this, inputEventHandlerDelegate, textFieldDelegate), m_displayFormulaInputView(false) { - m_dataView.setBackgroundColor(Palette::WallScreenDark); + m_dataView.setBackgroundColor(Palette::BackgroundAppsSecondary); m_dataView.setVerticalCellOverlap(0); m_dataView.setMargins(k_margin, k_scrollBarMargin, k_scrollBarMargin, k_margin); } diff --git a/apps/shared/values_controller.cpp b/apps/shared/values_controller.cpp index 8786a4a3d..d6c9cec48 100644 --- a/apps/shared/values_controller.cpp +++ b/apps/shared/values_controller.cpp @@ -27,7 +27,7 @@ ValuesController::ValuesController(Responder * parentResponder, ButtonRowControl void ValuesController::setupSelectableTableViewAndCells(InputEventHandlerDelegate * inputEventHandlerDelegate) { selectableTableView()->setVerticalCellOverlap(0); selectableTableView()->setMargins(k_margin, k_scrollBarMargin, k_scrollBarMargin, k_margin); - selectableTableView()->setBackgroundColor(Palette::WallScreenDark); + selectableTableView()->setBackgroundColor(Palette::BackgroundAppsSecondary); int numberOfAbscissaCells = abscissaCellsCount(); for (int i = 0; i < numberOfAbscissaCells; i++) { diff --git a/apps/solver/solutions_controller.cpp b/apps/solver/solutions_controller.cpp index 8c1cc915c..1b69b5d18 100644 --- a/apps/solver/solutions_controller.cpp +++ b/apps/solver/solutions_controller.cpp @@ -18,18 +18,20 @@ 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, Palette::PrimaryText, Palette::WallScreenDark), - m_warningMessageView1(KDFont::SmallFont, I18n::Message::Default, 0.5f, 0.5f, Palette::PrimaryText, Palette::WallScreenDark), + m_warningMessageView0(KDFont::SmallFont, I18n::Message::Default, 0.5f, 0.5f, Palette::PrimaryText, Palette::BackgroundAppsSecondary), + m_warningMessageView1(KDFont::SmallFont, I18n::Message::Default, 0.5f, 0.5f, Palette::PrimaryText, Palette::BackgroundAppsSecondary), m_selectableTableView(controller), m_displayWarningMoreSolutions(false) { - m_selectableTableView.setBackgroundColor(Palette::WallScreenDark); + m_selectableTableView.setBackgroundColor(Palette::BackgroundAppsSecondary + ); m_selectableTableView.setVerticalCellOverlap(0); } void SolutionsController::ContentView::drawRect(KDContext * ctx, KDRect rect) const { if (m_displayWarningMoreSolutions) { - ctx->fillRect(KDRect(0, 0, bounds().width(), k_topMargin), Palette::WallScreenDark); + ctx->fillRect(KDRect(0, 0, bounds().width(), k_topMargin), Palette::BackgroundAppsSecondary + ); } } diff --git a/apps/statistics/calculation_controller.cpp b/apps/statistics/calculation_controller.cpp index 187cf4938..b3c76a2d1 100644 --- a/apps/statistics/calculation_controller.cpp +++ b/apps/statistics/calculation_controller.cpp @@ -19,7 +19,7 @@ CalculationController::CalculationController(Responder * parentResponder, Button m_hideableCell(), m_store(store) { - m_selectableTableView.setBackgroundColor(Palette::WallScreenDark); + m_selectableTableView.setBackgroundColor(Palette::BackgroundAppsSecondary); m_selectableTableView.setVerticalCellOverlap(0); m_selectableTableView.setMargins(k_margin, k_scrollBarMargin, k_scrollBarMargin, k_margin); for (int i = 0; i < k_numberOfSeriesTitleCells; i++) { diff --git a/apps/variable_box_empty_controller.cpp b/apps/variable_box_empty_controller.cpp index d3501cff8..0f4c22aba 100644 --- a/apps/variable_box_empty_controller.cpp +++ b/apps/variable_box_empty_controller.cpp @@ -7,12 +7,12 @@ using namespace Poincare; using namespace Ion; VariableBoxEmptyController::VariableBoxEmptyView::VariableBoxEmptyView() : - m_layoutExample(0.5f, 0.5f, Palette::PrimaryText, Palette::WallScreen) + m_layoutExample(0.5f, 0.5f, Palette::PrimaryText, Palette::BackgroundApps) { for (int i = 0; i < k_numberOfMessages; i++) { m_messages[i].setFont(k_font); m_messages[i].setAlignment(0.5f, 0.5f); - m_messages[i].setBackgroundColor(Palette::WallScreen); + m_messages[i].setBackgroundColor(Palette::BackgroundApps); } m_messages[0].setAlignment(0.5f,1.0f); m_messages[k_numberOfMessages-1].setAlignment(0.5f,0.0f); diff --git a/escher/include/escher/palette.h b/escher/include/escher/palette.h index 0df9b315e..7c818b781 100644 --- a/escher/include/escher/palette.h +++ b/escher/include/escher/palette.h @@ -12,6 +12,7 @@ public: constexpr static KDColor AccentText = KDColor::RGB24(0x00857f); constexpr static KDColor BackgroundHard = KDColor::RGB24(0xffffff); constexpr static KDColor BackgroundApps = KDColor::RGB24(0xfafafa); + constexpr static KDColor BackgroundAppsSecondary = KDColor::RGB24(0xf0f0f0); constexpr static KDColor Toolbar = KDColor::RGB24(0xc03535); constexpr static KDColor ToolbarText = KDColor::RGB24(0xffffff); constexpr static KDColor ExpressionInputBackground = KDColor::RGB24(0xe0e0e0); diff --git a/escher/src/palette.cpp b/escher/src/palette.cpp index 6e6f2b422..6f04a399d 100644 --- a/escher/src/palette.cpp +++ b/escher/src/palette.cpp @@ -5,6 +5,7 @@ constexpr KDColor Palette::SecondaryText; // =GREYDARK constexpr KDColor Palette::AccentText; constexpr KDColor Palette::BackgroundHard; constexpr KDColor Palette::BackgroundApps; +constexpr KDColor Palette::BackgroundAppsSecondary; constexpr KDColor Palette::Toolbar; constexpr KDColor Palette::ToolbarText; constexpr KDColor Palette::ExpressionInputBackground; @@ -90,12 +91,12 @@ constexpr KDColor Palette::GreyBright; constexpr KDColor Palette::GreyMiddle; constexpr KDColor Palette::GreyDark; constexpr KDColor Palette::GreyVeryDark; -constexpr KDColor Palette::Select; -constexpr KDColor Palette::SelectDark; -constexpr KDColor Palette::WallScreen; -constexpr KDColor Palette::WallScreenDark; -constexpr KDColor Palette::SubTab; -constexpr KDColor Palette::LowBattery; +constexpr KDColor Palette::Select; // Done +constexpr KDColor Palette::SelectDark; // Done +constexpr KDColor Palette::WallScreen; // Done +constexpr KDColor Palette::WallScreenDark; // Done +constexpr KDColor Palette::SubTab; // Done +constexpr KDColor Palette::LowBattery; // Done constexpr KDColor Palette::Red; constexpr KDColor Palette::RedLight; constexpr KDColor Palette::Magenta;