From ad95a693da4580a52a80c968cb9dc9a1e00fde9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 27 Jan 2017 11:48:30 +0100 Subject: [PATCH] [escher] In palette, change name: YellowOne/Two -> YellowDark/Light Change-Id: I0eba4914f7b4f9f78d7797d47fb893bd66ece454 --- apps/battery_view.cpp | 4 ++-- apps/home/app_cell.cpp | 2 +- apps/home/controller.cpp | 2 +- apps/regression/graph_view.cpp | 4 ++-- apps/statistics/box_view.cpp | 2 +- apps/statistics/histogram_view.cpp | 4 ++-- apps/title_bar_view.cpp | 4 ++-- escher/include/escher/palette.h | 4 ++-- escher/src/palette.cpp | 4 ++-- escher/src/switch_view.cpp | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/battery_view.cpp b/apps/battery_view.cpp index 0d58879a6..075b3f4ae 100644 --- a/apps/battery_view.cpp +++ b/apps/battery_view.cpp @@ -19,11 +19,11 @@ void BatteryView::drawRect(KDContext * ctx, KDRect rect) const { ctx->fillRect(KDRect(0, 0, k_elementWidth, k_batteryHeight), KDColorWhite); if (m_chargeState == Ion::Battery::Charge::EMPTY) { ctx->fillRect(KDRect(k_elementWidth+k_separatorThickness, 0, 2*k_elementWidth, k_batteryHeight), Palette::LowBattery); - ctx->fillRect(KDRect(3*k_elementWidth+k_separatorThickness, 0, k_batteryWidth-5*k_elementWidth-2*k_separatorThickness, k_batteryHeight), Palette::YellowTwo); + ctx->fillRect(KDRect(3*k_elementWidth+k_separatorThickness, 0, k_batteryWidth-5*k_elementWidth-2*k_separatorThickness, k_batteryHeight), Palette::YellowLight); } if (m_chargeState == Ion::Battery::Charge::SOMEWHERE_INBETWEEN) { ctx->fillRect(KDRect(k_elementWidth+k_separatorThickness, 0, (k_batteryWidth-3*k_elementWidth-2*k_separatorThickness)/2, k_batteryHeight), KDColorWhite); - ctx->fillRect(KDRect(k_elementWidth+k_separatorThickness+(k_batteryWidth-3*k_elementWidth-2*k_separatorThickness)/2, 0, (k_batteryWidth-3*k_elementWidth-2*k_separatorThickness)/2, k_batteryHeight), Palette::YellowTwo); + ctx->fillRect(KDRect(k_elementWidth+k_separatorThickness+(k_batteryWidth-3*k_elementWidth-2*k_separatorThickness)/2, 0, (k_batteryWidth-3*k_elementWidth-2*k_separatorThickness)/2, k_batteryHeight), Palette::YellowLight); } if (m_chargeState == Ion::Battery::Charge::FULL) { ctx->fillRect(KDRect(k_elementWidth+k_separatorThickness, 0, k_batteryWidth-3*k_elementWidth-2*k_separatorThickness, k_batteryHeight), KDColorWhite); diff --git a/apps/home/app_cell.cpp b/apps/home/app_cell.cpp index 7edc72c99..acb0d62d9 100644 --- a/apps/home/app_cell.cpp +++ b/apps/home/app_cell.cpp @@ -40,7 +40,7 @@ void AppCell::setVisible(bool visible) { void AppCell::reloadCell() { TableViewCell::reloadCell(); - m_nameView.setBackgroundColor(isHighlighted() ? Palette::YellowOne : KDColorWhite); + m_nameView.setBackgroundColor(isHighlighted() ? Palette::YellowDark : KDColorWhite); } } diff --git a/apps/home/controller.cpp b/apps/home/controller.cpp index f908375fa..cbf8fa47e 100644 --- a/apps/home/controller.cpp +++ b/apps/home/controller.cpp @@ -9,7 +9,7 @@ namespace Home { Controller::Controller(Responder * parentResponder, ::AppsContainer * container) : ViewController(parentResponder), m_container(container), - m_selectableTableView(SelectableTableView(this, this, 0, 4, 0, 4, this, true, true, KDColorWhite, 28, Palette::YellowOne, Palette::GreyMiddle, 116)) + m_selectableTableView(SelectableTableView(this, this, 0, 4, 0, 4, this, true, true, KDColorWhite, 28, Palette::YellowDark, Palette::GreyMiddle, 116)) { } diff --git a/apps/regression/graph_view.cpp b/apps/regression/graph_view.cpp index b628cc076..f782b0983 100644 --- a/apps/regression/graph_view.cpp +++ b/apps/regression/graph_view.cpp @@ -17,9 +17,9 @@ void GraphView::drawRect(KDContext * ctx, KDRect rect) const { drawAxes(ctx, rect, Axis::Vertical); drawLabels(ctx, rect, Axis::Horizontal, true); drawLabels(ctx, rect, Axis::Vertical, true); - drawCurve(ctx, rect, nullptr, Palette::YellowOne); + drawCurve(ctx, rect, nullptr, Palette::YellowDark); for (int index = 0; index < m_store->numberOfPairs(); index++) { - drawDot(ctx, rect, m_store->get(0,index), m_store->get(1,index), Palette::YellowOne); + drawDot(ctx, rect, m_store->get(0,index), m_store->get(1,index), Palette::YellowDark); } drawDot(ctx, rect, m_store->meanOfColumn(0), m_store->meanOfColumn(1), Palette::PurpleBright); } diff --git a/apps/statistics/box_view.cpp b/apps/statistics/box_view.cpp index 4c34dd418..c0a3a010b 100644 --- a/apps/statistics/box_view.cpp +++ b/apps/statistics/box_view.cpp @@ -69,7 +69,7 @@ void BoxView::drawRect(KDContext * ctx, KDRect rect) const { drawSegment(ctx, rect, Axis::Vertical, calculations[k], lowBound, upBound, Palette::Select, 2); } if (isMainViewSelected()) { - drawSegment(ctx, rect, Axis::Vertical, calculations[(int)m_selectedQuantile], lowBound, upBound, Palette::YellowOne, 2); + drawSegment(ctx, rect, Axis::Vertical, calculations[(int)m_selectedQuantile], lowBound, upBound, Palette::YellowDark, 2); } // Draw the horizontal lines linking the box to the extreme bounds drawSegment(ctx, rect, Axis::Horizontal, 0.5f, m_store->minValue(), m_store->firstQuartile(), Palette::GreyDark); diff --git a/apps/statistics/histogram_view.cpp b/apps/statistics/histogram_view.cpp index 16fe915cc..da6dfbe43 100644 --- a/apps/statistics/histogram_view.cpp +++ b/apps/statistics/histogram_view.cpp @@ -26,10 +26,10 @@ void HistogramView::drawRect(KDContext * ctx, KDRect rect) const { drawAxes(ctx, rect, Axis::Horizontal); drawLabels(ctx, rect, Axis::Horizontal, false); if (isMainViewSelected()) { - drawHistogram(ctx, rect, nullptr, m_store->firstDrawnBarAbscissa(), m_store->barWidth(), true, Palette::YellowOne, Palette::Select, + drawHistogram(ctx, rect, nullptr, m_store->firstDrawnBarAbscissa(), m_store->barWidth(), true, Palette::YellowDark, Palette::Select, m_highlightedBarStart, m_highlightedBarEnd); } else { - drawHistogram(ctx, rect, nullptr, m_store->firstDrawnBarAbscissa(), m_store->barWidth(), true, Palette::YellowOne, Palette::Select); + drawHistogram(ctx, rect, nullptr, m_store->firstDrawnBarAbscissa(), m_store->barWidth(), true, Palette::YellowDark, Palette::Select); } } diff --git a/apps/title_bar_view.cpp b/apps/title_bar_view.cpp index c696f668d..fbaf8cd48 100644 --- a/apps/title_bar_view.cpp +++ b/apps/title_bar_view.cpp @@ -5,12 +5,12 @@ extern "C" { TitleBarView::TitleBarView() : View(), - m_titleView(KDText::FontSize::Small, nullptr, 0.5f, 0.5f, KDColorWhite, Palette::YellowOne) + m_titleView(KDText::FontSize::Small, nullptr, 0.5f, 0.5f, KDColorWhite, Palette::YellowDark) { } void TitleBarView::drawRect(KDContext * ctx, KDRect rect) const { - ctx->fillRect(bounds(), Palette::YellowOne); + ctx->fillRect(bounds(), Palette::YellowDark); } diff --git a/escher/include/escher/palette.h b/escher/include/escher/palette.h index 76c1ba45d..42f50380c 100644 --- a/escher/include/escher/palette.h +++ b/escher/include/escher/palette.h @@ -5,8 +5,8 @@ class Palette { public: - constexpr static KDColor YellowOne = KDColor::RGB24(0xffb734); - constexpr static KDColor YellowTwo = KDColor::RGB24(0xffcc7b); + constexpr static KDColor YellowDark = KDColor::RGB24(0xffb734); + constexpr static KDColor YellowLight = KDColor::RGB24(0xffcc7b); constexpr static KDColor PurpleBright = KDColor::RGB24(0x656975); constexpr static KDColor PurpleDark = KDColor::RGB24(0x414147); constexpr static KDColor GreyWhite = KDColor::RGB24(0xf5f5f5); diff --git a/escher/src/palette.cpp b/escher/src/palette.cpp index 7bbbde992..500abd889 100644 --- a/escher/src/palette.cpp +++ b/escher/src/palette.cpp @@ -1,7 +1,7 @@ #include -constexpr KDColor Palette::YellowOne; -constexpr KDColor Palette::YellowTwo; +constexpr KDColor Palette::YellowDark; +constexpr KDColor Palette::YellowLight; constexpr KDColor Palette::PurpleBright; constexpr KDColor Palette::PurpleDark; constexpr KDColor Palette::GreyWhite; diff --git a/escher/src/switch_view.cpp b/escher/src/switch_view.cpp index 2a6f87510..c49c3682f 100644 --- a/escher/src/switch_view.cpp +++ b/escher/src/switch_view.cpp @@ -25,7 +25,7 @@ void SwitchView::drawRect(KDContext * ctx, KDRect rect) const { KDCoordinate switchHalfHeight = k_switchHeight/2; KDCoordinate switchHalfWidth = k_switchWidth/2; - KDColor mainColor = m_state ? Palette::YellowOne : Palette::GreyDark; + KDColor mainColor = m_state ? Palette::YellowDark : Palette::GreyDark; // These 4 lines draw the outline of the switch. ctx->fillRect(KDRect(width - 2*k_separatorThickness - k_switchMargin - k_switchWidth, heightCenter-switchHalfHeight - k_separatorThickness, k_switchWidth + 2*k_separatorThickness, k_separatorThickness), mainColor); ctx->fillRect(KDRect(width - 2*k_separatorThickness - k_switchMargin - k_switchWidth, heightCenter-switchHalfHeight, k_separatorThickness, k_switchHeight+k_separatorThickness), mainColor);