From fa24561cd1d643a21c60599c60964b847e07c6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 10 Mar 2017 14:55:54 +0100 Subject: [PATCH] [apps/graph][apps/sequence] Improve footer rendering Change-Id: I4b5953621118b5dad9e4974514c35ae3fc9b215e --- apps/shared/list_controller.cpp | 6 +++--- escher/include/escher/button.h | 2 +- escher/include/escher/button_row_controller.h | 4 ++-- escher/src/button.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/shared/list_controller.cpp b/apps/shared/list_controller.cpp index 1557bf921..891b822a5 100644 --- a/apps/shared/list_controller.cpp +++ b/apps/shared/list_controller.cpp @@ -9,16 +9,16 @@ ListController::ListController(Responder * parentResponder, FunctionStore * func m_selectableTableView(SelectableTableView(this, this, 0, 0, 0, 0, nullptr, false, true)), m_functionStore(functionStore), m_addNewFunction(text), - m_plotButton(this, "Tracer", Invocation([](void * context, void * sender) { + m_plotButton(this, "Tracer la fonction", Invocation([](void * context, void * sender) { ListController * list = (ListController *)context; TabViewController * tabController = list->tabController(); tabController->setActiveTab(1); - }, this), KDText::FontSize::Large), + }, this), KDText::FontSize::Small, Palette::PurpleBright), m_valuesButton(this, "Afficher les valeurs", Invocation([](void * context, void * sender) { ListController * list = (ListController *)context; TabViewController * tabController = list->tabController(); tabController->setActiveTab(2); - }, this), KDText::FontSize::Large) + }, this), KDText::FontSize::Small, Palette::PurpleBright) { } diff --git a/escher/include/escher/button.h b/escher/include/escher/button.h index 025b4fdb5..348445c9d 100644 --- a/escher/include/escher/button.h +++ b/escher/include/escher/button.h @@ -8,7 +8,7 @@ class Button : public View, public Responder { public: - Button(Responder * parentResponder, const char * textBody, Invocation invocation, KDText::FontSize size = KDText::FontSize::Small); + Button(Responder * parentResponder, const char * textBody, Invocation invocation, KDText::FontSize size = KDText::FontSize::Small, KDColor textColor = KDColorBlack); bool handleEvent(Ion::Events::Event event) override; void setBackgroundColor(KDColor backgroundColor); KDSize minimalSizeForOptimalDisplay() const override; diff --git a/escher/include/escher/button_row_controller.h b/escher/include/escher/button_row_controller.h index bf7d36e52..2e1788b4d 100644 --- a/escher/include/escher/button_row_controller.h +++ b/escher/include/escher/button_row_controller.h @@ -43,8 +43,8 @@ private: ButtonRowDelegate * buttonRowDelegate() const; private: constexpr static KDCoordinate k_plainStyleHeight = 20; - constexpr static KDCoordinate k_embossedStyleHeight = 46; - constexpr static KDCoordinate k_embossedStyleHeightMargin = 5; + constexpr static KDCoordinate k_embossedStyleHeight = 36; + constexpr static KDCoordinate k_embossedStyleHeightMargin = 6; constexpr static KDColor k_separatorHeaderColor = KDColor::RGB24(0xDEE0E2); constexpr static KDColor k_selectedBackgroundColor = KDColor::RGB24(0x426DA7); ViewController * m_mainViewController; diff --git a/escher/src/button.cpp b/escher/src/button.cpp index 6bfc3f053..6e6d7e5fb 100644 --- a/escher/src/button.cpp +++ b/escher/src/button.cpp @@ -1,9 +1,9 @@ #include #include -Button::Button(Responder * parentResponder, const char * textBody, Invocation invocation, KDText::FontSize size) : +Button::Button(Responder * parentResponder, const char * textBody, Invocation invocation, KDText::FontSize size, KDColor textColor) : Responder(parentResponder), - m_pointerTextView(PointerTextView(size, textBody, 0.5f, 0.5f)), + m_pointerTextView(PointerTextView(size, textBody, 0.5f, 0.5f, textColor)), m_invocation(invocation), m_backgroundColor(KDColorWhite) {