[escher] In palette, change name: YellowOne/Two -> YellowDark/Light

Change-Id: I0eba4914f7b4f9f78d7797d47fb893bd66ece454
This commit is contained in:
Émilie Feral
2017-01-27 11:48:30 +01:00
parent 13f314a744
commit ad95a693da
10 changed files with 16 additions and 16 deletions

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -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))
{
}

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -1,7 +1,7 @@
#include <escher/palette.h>
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;

View File

@@ -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);