mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Omega Theme: some fixes
This commit is contained in:
@@ -18,6 +18,6 @@ KDColor AppsContainer::k_promptColors[] = {
|
||||
KDColorWhite,
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
Palette::YellowDark};
|
||||
Palette::AccentText};
|
||||
|
||||
int AppsContainer::k_promptNumberOfMessages = 8;
|
||||
|
||||
@@ -14,6 +14,6 @@ KDColor AppsContainer::k_promptColors[] = {
|
||||
KDColorBlack,
|
||||
KDColorWhite,
|
||||
KDColorBlack,
|
||||
Palette::YellowDark};
|
||||
Palette::AccentText};
|
||||
|
||||
int AppsContainer::k_promptNumberOfMessages = 6;
|
||||
|
||||
@@ -63,31 +63,31 @@ void BatteryView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
*'content' depends on the charge */
|
||||
|
||||
// Draw the left part
|
||||
ctx->fillRect(KDRect(0, 0, k_elementWidth, k_batteryHeight), Palette::ToolbarText);
|
||||
ctx->fillRect(KDRect(0, 0, k_elementWidth, k_batteryHeight), Palette::Battery);
|
||||
|
||||
// Draw the middle part
|
||||
constexpr KDCoordinate batteryInsideX = k_elementWidth+k_separatorThickness;
|
||||
constexpr KDCoordinate batteryInsideWidth = k_batteryWidth-3*k_elementWidth-2*k_separatorThickness;
|
||||
if (m_isCharging) {
|
||||
// Charging: Yellow background with flash
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, batteryInsideWidth, k_batteryHeight), Palette::YellowLight);
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, batteryInsideWidth, k_batteryHeight), Palette::BatteryInCharge);
|
||||
KDRect frame((k_batteryWidth-k_flashWidth)/2, 0, k_flashWidth, k_flashHeight);
|
||||
ctx->blendRectWithMask(frame, Palette::ToolbarText, (const uint8_t *)flashMask, s_flashWorkingBuffer);
|
||||
ctx->blendRectWithMask(frame, Palette::Battery, (const uint8_t *)flashMask, s_flashWorkingBuffer);
|
||||
} else if (m_chargeState == Ion::Battery::Charge::LOW) {
|
||||
assert(!m_isPlugged);
|
||||
// Low: Quite empty battery
|
||||
ctx->fillRect(KDRect(batteryInsideX, 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::YellowLight);
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, 2*k_elementWidth, k_batteryHeight), Palette::BatteryLow);
|
||||
ctx->fillRect(KDRect(3*k_elementWidth+k_separatorThickness, 0, k_batteryWidth-5*k_elementWidth-2*k_separatorThickness, k_batteryHeight), Palette::BatteryInCharge);
|
||||
} else if (m_chargeState == Ion::Battery::Charge::SOMEWHERE_INBETWEEN) {
|
||||
assert(!m_isPlugged);
|
||||
// Middle: Half full battery
|
||||
constexpr KDCoordinate middleChargeWidth = batteryInsideWidth/2;
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, middleChargeWidth, k_batteryHeight), Palette::ToolbarText);
|
||||
ctx->fillRect(KDRect(batteryInsideX+middleChargeWidth, 0, middleChargeWidth, k_batteryHeight), Palette::YellowLight);
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, middleChargeWidth, k_batteryHeight), Palette::Battery);
|
||||
ctx->fillRect(KDRect(batteryInsideX+middleChargeWidth, 0, middleChargeWidth, k_batteryHeight), Palette::BatteryInCharge);
|
||||
} else {
|
||||
assert(m_chargeState == Ion::Battery::Charge::FULL);
|
||||
// Full but not plugged: Full battery
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, batteryInsideWidth, k_batteryHeight), Palette::ToolbarText);
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, batteryInsideWidth, k_batteryHeight), Palette::Battery);
|
||||
if (m_isPlugged) {
|
||||
// Plugged and full: Full battery with tick
|
||||
KDRect frame((k_batteryWidth-k_tickWidth)/2, (k_batteryHeight-k_tickHeight)/2, k_tickWidth, k_tickHeight);
|
||||
@@ -96,8 +96,8 @@ void BatteryView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
}
|
||||
|
||||
// Draw the right part
|
||||
ctx->fillRect(KDRect(k_batteryWidth-2*k_elementWidth, 0, k_elementWidth, k_batteryHeight), Palette::ToolbarText);
|
||||
ctx->fillRect(KDRect(k_batteryWidth-k_elementWidth, (k_batteryHeight-k_capHeight)/2, k_elementWidth, k_capHeight), Palette::ToolbarText);
|
||||
ctx->fillRect(KDRect(k_batteryWidth-2*k_elementWidth, 0, k_elementWidth, k_batteryHeight), Palette::Battery);
|
||||
ctx->fillRect(KDRect(k_batteryWidth-k_elementWidth, (k_batteryHeight-k_capHeight)/2, k_elementWidth, k_capHeight), Palette::Battery);
|
||||
}
|
||||
|
||||
KDSize BatteryView::minimalSizeForOptimalDisplay() const {
|
||||
|
||||
@@ -54,7 +54,7 @@ void HistoryViewCell::setHighlighted(bool highlight) {
|
||||
m_scrollableOutputView.evenOddCell()->setHighlighted(false);
|
||||
if (isHighlighted()) {
|
||||
if (m_dataSource->selectedSubviewType() == HistoryViewCellDataSource::SubviewType::Input) {
|
||||
m_inputView.setExpressionBackgroundColor(Palette::Select);
|
||||
m_inputView.setExpressionBackgroundColor(Palette::ListCellBackgroundSelected);
|
||||
} else {
|
||||
m_scrollableOutputView.evenOddCell()->setHighlighted(true);
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ void DistributionCurveView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
return;
|
||||
}
|
||||
if (m_distribution->isContinuous()) {
|
||||
drawCartesianCurve(ctx, rect, -INFINITY, INFINITY, EvaluateXYAtAbscissa, m_distribution, nullptr, Palette::YellowDark, true, lowerBound, upperBound);
|
||||
drawCartesianCurve(ctx, rect, -INFINITY, INFINITY, EvaluateXYAtAbscissa, m_distribution, nullptr, Palette::ProbabilityCurve, true, lowerBound, upperBound);
|
||||
} else {
|
||||
drawHistogram(ctx, rect, EvaluateAtAbscissa, m_distribution, nullptr, 0, 1, false, Palette::GreyMiddle, Palette::YellowDark, lowerBound, upperBound+0.5f);
|
||||
drawHistogram(ctx, rect, EvaluateAtAbscissa, m_distribution, nullptr, 0, 1, false, Palette::GreyMiddle, Palette::ProbabilityCurve, lowerBound, upperBound+0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ void DistributionCurveView::drawStandardNormal(KDContext * ctx, KDRect rect, flo
|
||||
// Draw a centered reduced normal curve
|
||||
NormalDistribution n;
|
||||
constCastedThis->setCurveViewRange(&n);
|
||||
drawCartesianCurve(ctx, rect, -INFINITY, INFINITY, EvaluateXYAtAbscissa, &n, nullptr, Palette::YellowDark, true, pixelToFloat(Axis::Horizontal, colorLowerBoundPixel), pixelToFloat(Axis::Horizontal, colorUpperBoundPixel));
|
||||
drawCartesianCurve(ctx, rect, -INFINITY, INFINITY, EvaluateXYAtAbscissa, &n, nullptr, Palette::ProbabilityCurve, true, pixelToFloat(Axis::Horizontal, colorLowerBoundPixel), pixelToFloat(Axis::Horizontal, colorUpperBoundPixel));
|
||||
|
||||
// Put back the previous curve view range
|
||||
constCastedThis->setCurveViewRange(previousRange);
|
||||
|
||||
@@ -15,7 +15,7 @@ ListController::ListController(Responder * parentResponder, ::InputEventHandlerD
|
||||
m_expressionCells{},
|
||||
m_parameterController(inputEventHandlerDelegate, this),
|
||||
m_typeParameterController(this, this, TableCell::Layout::Vertical),
|
||||
m_typeStackController(nullptr, &m_typeParameterController, Palette::BackgroundHard, Palette::PurpleDark, Palette::PurpleDark),
|
||||
m_typeStackController(nullptr, &m_typeParameterController, Palette::ToolboxHeaderText, Palette::ToolboxHeaderBackground, Palette::ToolboxHeaderBorder),
|
||||
m_sequenceToolbox()
|
||||
{
|
||||
for (int i = 0; i < k_maxNumberOfRows; i++) {
|
||||
|
||||
@@ -29,9 +29,9 @@ void ScrollableExactApproximateExpressionsView::ContentCell::setHighlighted(bool
|
||||
m_approximateSign.setBackgroundColor(backgroundColor());
|
||||
if (highlight) {
|
||||
if (m_selectedSubviewPosition == SubviewPosition::Left) {
|
||||
m_leftExpressionView.setBackgroundColor(Palette::Select);
|
||||
m_leftExpressionView.setBackgroundColor(Palette::ListCellBackgroundSelected);
|
||||
} else {
|
||||
m_rightExpressionView.setBackgroundColor(Palette::Select);
|
||||
m_rightExpressionView.setBackgroundColor(Palette::ListCellBackgroundSelected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ ListController::ListController(Responder * parentResponder, EquationStore * equa
|
||||
ListController * list = (ListController *)context;
|
||||
list->resolveEquations();
|
||||
return true;
|
||||
}, this), KDFont::LargeFont, Palette::PurpleBright),
|
||||
}, this), KDFont::LargeFont, Palette::ButtonText),
|
||||
m_modelsParameterController(this, equationStore, this),
|
||||
m_modelsStackController(nullptr, &m_modelsParameterController, Palette::BannerFirstVariantText, Palette::BannerFirstVariantBackground, Palette::BannerFirstVariantBorder)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ void BoxView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
drawSegment(ctx, rect, Axis::Vertical, calculations[k], lowBound, upBound, Palette::GreyMiddle, k_quantileBarWidth);
|
||||
}
|
||||
if (isMainViewSelected()) {
|
||||
drawSegment(ctx, rect, Axis::Vertical, calculations[(int)*m_selectedQuantile], lowBound, upBound, Palette::YellowDark, k_quantileBarWidth);
|
||||
drawSegment(ctx, rect, Axis::Vertical, calculations[(int)*m_selectedQuantile], lowBound, upBound, Palette::StatisticsBox, k_quantileBarWidth);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class HistogramController;
|
||||
|
||||
class HistogramView : public Shared::CurveView {
|
||||
public:
|
||||
HistogramView(HistogramController * controller, Store * store, int series, Shared::BannerView * bannerView, KDColor selectedHistogramColor = Palette::Select, KDColor notSelectedHistogramColor = Palette::GreyMiddle, KDColor selectedBarColor = Palette::YellowDark);
|
||||
HistogramView(HistogramController * controller, Store * store, int series, Shared::BannerView * bannerView, KDColor selectedHistogramColor = Palette::StatisticsSelect, KDColor notSelectedHistogramColor = Palette::GreyMiddle, KDColor selectedBarColor = Palette::StatisticsBox);
|
||||
int series() const { return m_series; }
|
||||
void reload() override;
|
||||
void reloadSelectedBar();
|
||||
|
||||
@@ -17,7 +17,7 @@ static KDColor sUSBConnectedColors[] = {
|
||||
Palette::PrimaryText,
|
||||
Palette::PrimaryText,
|
||||
Palette::PrimaryText,
|
||||
Palette::YellowDark,
|
||||
Palette::AccentText,
|
||||
KDColorWhite,
|
||||
Palette::PrimaryText,
|
||||
Palette::PrimaryText,
|
||||
|
||||
@@ -9,11 +9,15 @@ public:
|
||||
// Shared
|
||||
constexpr static KDColor PrimaryText = KDColor::RGB24(0x000000);
|
||||
constexpr static KDColor SecondaryText = KDColor::RGB24(0x6e6e6e);
|
||||
constexpr static KDColor AccentText = KDColor::RGB24(0x00857f);
|
||||
constexpr static KDColor BackgroundHard = KDColor::RGB24(0xffffff);
|
||||
constexpr static KDColor BackgroundApps = KDColor::RGB24(0xfafafa);
|
||||
constexpr static KDColor Toolbar = KDColor::RGB24(0xc03535);
|
||||
constexpr static KDColor ToolbarText = KDColor::RGB24(0xffffff);
|
||||
constexpr static KDColor ExpressionInputBackground = KDColor::RGB24(0xe0e0e0);
|
||||
constexpr static KDColor Battery = KDColor::RGB24(0xffffff);
|
||||
constexpr static KDColor BatteryInCharge = KDColor::RGB24(0x179e1f);
|
||||
constexpr static KDColor BatteryLow = KDColor::RGB24(0x992321);
|
||||
|
||||
// Controls (switches, gauge, arrows...)
|
||||
constexpr static KDColor Control = KDColor::RGB24(0x00857f);
|
||||
@@ -23,6 +27,8 @@ public:
|
||||
// Calculation
|
||||
constexpr static KDColor CalculationBackgroundOdd = KDColor::RGB24(0xffffff);
|
||||
constexpr static KDColor CalculationBackgroundEven = KDColor::RGB24(0xfafafa);
|
||||
constexpr static KDColor CalculationEmptyBox = KDColor::RGB24(0xc4c4c4);
|
||||
constexpr static KDColor CalculationEmptyBoxNeeded = KDColor::RGB24(0x00857f);
|
||||
|
||||
// Code
|
||||
constexpr static KDColor CodeBackground = KDColor::RGB24(0x000000);
|
||||
@@ -34,6 +40,13 @@ public:
|
||||
constexpr static KDColor CodeOperator = KDColor::RGB24(0xd73a49);
|
||||
constexpr static KDColor CodeString = KDColor::RGB24(0x032f62);
|
||||
|
||||
// Probability
|
||||
constexpr static KDColor ProbabilityCurve = KDColor::RGB24(0x00857f);
|
||||
|
||||
// Statistics
|
||||
constexpr static KDColor StatisticsBox = KDColor::RGB24(0x00857f);
|
||||
constexpr static KDColor StatisticsSelect = KDColor::RGB24(0xe0e0e0);
|
||||
|
||||
// SubMenus
|
||||
constexpr static KDColor SubMenuBackground = KDColor::RGB24(0xe0e0e0);
|
||||
constexpr static KDColor SubMenuBorder = KDColor::RGB24(0xfafafa);
|
||||
|
||||
@@ -2,11 +2,15 @@
|
||||
|
||||
constexpr KDColor Palette::PrimaryText;
|
||||
constexpr KDColor Palette::SecondaryText; // =GREYDARK
|
||||
constexpr KDColor Palette::AccentText;
|
||||
constexpr KDColor Palette::BackgroundHard;
|
||||
constexpr KDColor Palette::BackgroundApps;
|
||||
constexpr KDColor Palette::Toolbar;
|
||||
constexpr KDColor Palette::ToolbarText;
|
||||
constexpr KDColor Palette::ExpressionInputBackground;
|
||||
constexpr KDColor Palette::Battery;
|
||||
constexpr KDColor Palette::BatteryInCharge;
|
||||
constexpr KDColor Palette::BatteryLow;
|
||||
|
||||
constexpr KDColor Palette::Control;
|
||||
constexpr KDColor Palette::ControlEnabled;
|
||||
@@ -14,6 +18,8 @@ constexpr KDColor Palette::ControlDisabled;
|
||||
|
||||
constexpr KDColor Palette::CalculationBackgroundOdd;
|
||||
constexpr KDColor Palette::CalculationBackgroundEven;
|
||||
constexpr KDColor Palette::CalculationEmptyBox;
|
||||
constexpr KDColor Palette::CalculationEmptyBoxNeeded;
|
||||
|
||||
constexpr KDColor Palette::CodeBackground;
|
||||
constexpr KDColor Palette::CodeBackgroundSelected;
|
||||
@@ -24,6 +30,10 @@ constexpr KDColor Palette::CodeKeyword;
|
||||
constexpr KDColor Palette::CodeOperator;
|
||||
constexpr KDColor Palette::CodeString;
|
||||
|
||||
constexpr KDColor Palette::ProbabilityCurve;
|
||||
|
||||
constexpr KDColor Palette::StatisticsBox;
|
||||
|
||||
constexpr KDColor Palette::SubMenuBackground;
|
||||
constexpr KDColor Palette::SubMenuBorder;
|
||||
constexpr KDColor Palette::SubMenuText;
|
||||
@@ -71,10 +81,10 @@ constexpr KDColor Palette::HomeCellBackgroundActive;
|
||||
constexpr KDColor Palette::HomeCellText;
|
||||
constexpr KDColor Palette::HomeCellTextActive;
|
||||
|
||||
constexpr KDColor Palette::YellowDark;
|
||||
constexpr KDColor Palette::YellowLight;
|
||||
constexpr KDColor Palette::PurpleBright;
|
||||
constexpr KDColor Palette::PurpleDark;
|
||||
constexpr KDColor Palette::YellowDark; // DONE
|
||||
constexpr KDColor Palette::YellowLight; // DONE
|
||||
constexpr KDColor Palette::PurpleBright; // DONE
|
||||
constexpr KDColor Palette::PurpleDark; // DONE
|
||||
constexpr KDColor Palette::GreyWhite;
|
||||
constexpr KDColor Palette::GreyBright;
|
||||
constexpr KDColor Palette::GreyMiddle;
|
||||
|
||||
@@ -88,7 +88,7 @@ bool EmptyLayoutNode::willAddSibling(LayoutCursor * cursor, LayoutNode * sibling
|
||||
|
||||
void EmptyLayoutNode::render(KDContext * ctx, KDPoint p, KDColor expressionColor, KDColor backgroundColor) {
|
||||
if (m_isVisible) {
|
||||
KDColor fillColor = m_color == Color::Yellow ? Palette::YellowDark : Palette::GreyBright;
|
||||
KDColor fillColor = m_color == Color::Yellow ? Palette::CalculationEmptyBoxNeeded : Palette::CalculationEmptyBox;
|
||||
ctx->fillRect(KDRect(p.x()+(m_margins ? k_marginWidth : 0), p.y()+(m_margins ? k_marginHeight : 0), width(), height()), fillColor);
|
||||
ctx->fillRect(KDRect(p.x()+(m_margins ? k_marginWidth : 0), p.y()+(m_margins ? k_marginHeight : 0), width(), height()), fillColor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user