From 8108512fe9fab2bb367077b17fca5ec8858fbe66 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Wed, 15 Jun 2016 13:34:41 +0200 Subject: [PATCH] Kandinsky: Simplistic drawing for the TabView Change-Id: I3c3ade5da2d7f55a305811de071fb6bba5c2b37d --- escher/include/escher/tab_view.h | 3 +++ escher/src/tab_view.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/escher/include/escher/tab_view.h b/escher/include/escher/tab_view.h index c57d71191..2452c1197 100644 --- a/escher/include/escher/tab_view.h +++ b/escher/include/escher/tab_view.h @@ -9,6 +9,9 @@ class TabViewController; class TabView : public View { public: TabView(); + + // View + void drawRect(KDRect rect) const override; int numberOfSubviews() const override; View * subview(int index) override; void layoutSubviews() override; diff --git a/escher/src/tab_view.cpp b/escher/src/tab_view.cpp index 02cd19dda..9388bbebe 100644 --- a/escher/src/tab_view.cpp +++ b/escher/src/tab_view.cpp @@ -11,6 +11,11 @@ TabView::TabView() : { } +/* View */ +void TabView::drawRect(KDRect rect) const { + KDFillRect(rect, KDColorRGB(0xb5, 0x1d, 0xab)); +} + void TabView::addTabNamed(const char * name) { assert(m_numberOfTabs < k_maxNumberOfTabs); uint8_t tabIndex = m_numberOfTabs;