Remove all radio predefined colors except BLACK and WHITE (#882)
* Removed all "Basic color definitions" except BLACK and WHITE in colors.h Please ref. discussion on Discord: https://discord.com/channels/839849772864503828/839856795781431317/895858311579181066 * Removed theme color from the bootloader and replaced by RGB() like for e.g. green. * Wrong color in Value widget default background color; should be white, not black
This commit is contained in:
@@ -55,23 +55,10 @@ enum LcdColorIndex
|
||||
|
||||
//
|
||||
// Basic color definitions
|
||||
//
|
||||
//
|
||||
|
||||
#define WHITE RGB(0xFF, 0xFF, 0xFF)
|
||||
#define LIGHTWHITE RGB(238, 234, 238)
|
||||
#define BLACK RGB(0, 0, 0)
|
||||
#define YELLOW RGB(0xF0, 0xD0, 0x10)
|
||||
#define BLUE RGB(0x30, 0xA0, 0xE0)
|
||||
#define DARKBLUE RGB(0, 0x35, 0x67)
|
||||
#define GREY RGB(96, 96, 96)
|
||||
#define DARKGREY RGB(64, 64, 64)
|
||||
#define LIGHTGREY RGB(180, 180, 180)
|
||||
#define RED RGB(229, 32, 30)
|
||||
#define DARKRED RGB(160, 0, 6)
|
||||
#define GREEN RGB(25, 150, 50)
|
||||
#define LIGHTBROWN RGB(156, 109, 32)
|
||||
#define DARKBROWN RGB(106, 72, 16)
|
||||
#define BRIGHTGREEN RGB(0, 180, 60)
|
||||
#define ORANGE RGB(229, 100, 30)
|
||||
|
||||
#define RGB2FLAGS(r, g, b) (COLOR2FLAGS(RGB(r, g, b)) | RGB_FLAG)
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class SpectrumScaleWindow: public Window
|
||||
// Draw tracker
|
||||
int offset = reusableBuffer.spectrumAnalyser.track - (reusableBuffer.spectrumAnalyser.freq - reusableBuffer.spectrumAnalyser.span / 2);
|
||||
int x = limit<int>(0, offset / reusableBuffer.spectrumAnalyser.step, width() - 1);
|
||||
dc->drawSolidVerticalLine(x, 0, height(), BLACK);
|
||||
dc->drawSolidVerticalLine(x, 0, height(), COLOR_THEME_PRIMARY1);
|
||||
|
||||
// Draw text scale
|
||||
for (uint32_t frequency =
|
||||
@@ -172,11 +172,11 @@ class SpectrumWindow: public Window
|
||||
coord_t max_yv = SCALE_TOP - 1 - limit<int>(0, getAverage(step, &reusableBuffer.spectrumAnalyser.max[xv]) << 1, SCALE_TOP);
|
||||
|
||||
// Signal bar
|
||||
dc->drawSolidFilledRect(xv, yv, step - 1, SCALE_TOP - yv, YELLOW);
|
||||
dc->drawSolidFilledRect(xv, yv, step - 1, SCALE_TOP - yv, COLOR_THEME_ACTIVE);
|
||||
// lcdDrawSolidRect(xv, yv, step - 1, SCALE_TOP - yv, 1, TEXT_COLOR);
|
||||
|
||||
// Signal max
|
||||
dc->drawSolidHorizontalLine(xv, max_yv, step - 1, BLACK);
|
||||
dc->drawSolidHorizontalLine(xv, max_yv, step - 1, COLOR_THEME_PRIMARY1);
|
||||
|
||||
// Decay max values
|
||||
if (max_yv < yv) { // Those value are INVERTED (MENU_FOOTER_TOP - value)
|
||||
@@ -189,7 +189,7 @@ class SpectrumWindow: public Window
|
||||
// Draw tracker
|
||||
int offset = reusableBuffer.spectrumAnalyser.track - (reusableBuffer.spectrumAnalyser.freq - reusableBuffer.spectrumAnalyser.span / 2);
|
||||
int x = limit<int>(0, offset / reusableBuffer.spectrumAnalyser.step, width() - 1);
|
||||
dc->drawSolidVerticalLine(x, 0, height(), BLACK);
|
||||
dc->drawSolidVerticalLine(x, 0, height(), COLOR_THEME_PRIMARY1);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include "theme_manager.h"
|
||||
|
||||
const ZoneOption OPTIONS_THEME_DEFAULT[] = {
|
||||
{ STR_BACKGROUND_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(WHITE) },
|
||||
{ STR_MAIN_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(RED) },
|
||||
{ STR_BACKGROUND_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(COLOR_THEME_PRIMARY2) },
|
||||
{ STR_MAIN_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(COLOR_THEME_WARNING) },
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
#include "tabsgroup.h"
|
||||
|
||||
const ZoneOption OPTIONS_THEME_DEFAULT[] = {
|
||||
{ STR_BACKGROUND_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(WHITE) },
|
||||
{ STR_MAIN_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(RED) },
|
||||
{ STR_BACKGROUND_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(COLOR_THEME_PRIMARY2) },
|
||||
{ STR_MAIN_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(COLOR_THEME_WARNING) },
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ const ZoneOption GaugeWidget::options[] = {
|
||||
{ STR_SOURCE, ZoneOption::Source, OPTION_VALUE_UNSIGNED(1) },
|
||||
{ STR_MIN, ZoneOption::Integer, OPTION_VALUE_SIGNED(-RESX), OPTION_VALUE_SIGNED(-RESX), OPTION_VALUE_SIGNED(RESX) },
|
||||
{ STR_MAX, ZoneOption::Integer, OPTION_VALUE_SIGNED(RESX), OPTION_VALUE_SIGNED(-RESX), OPTION_VALUE_SIGNED(RESX) },
|
||||
{ STR_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(RED) },
|
||||
{ STR_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(COLOR_THEME_WARNING) },
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ const ZoneOption OutputsWidget::options[] = {
|
||||
{STR_FIRST_CHANNEL, ZoneOption::Integer, OPTION_VALUE_UNSIGNED(1),
|
||||
OPTION_VALUE_UNSIGNED(1), OPTION_VALUE_UNSIGNED(32)},
|
||||
{STR_FILL_BACKGROUND, ZoneOption::Bool, OPTION_VALUE_BOOL(false)},
|
||||
{STR_BG_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(LIGHTGREY)},
|
||||
{STR_BG_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(COLOR_THEME_SECONDARY3)},
|
||||
{STR_TEXT_COLOR, ZoneOption::Color,
|
||||
OPTION_VALUE_UNSIGNED(COLOR_THEME_PRIMARY1 >> 16)},
|
||||
{STR_COLOR, ZoneOption::Color,
|
||||
|
||||
@@ -145,7 +145,7 @@ class ValueWidget: public Widget
|
||||
|
||||
const ZoneOption ValueWidget::options[] = {
|
||||
{ STR_SOURCE, ZoneOption::Source, OPTION_VALUE_UNSIGNED(MIXSRC_Rud) },
|
||||
{ STR_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(WHITE) },
|
||||
{ STR_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(COLOR_THEME_PRIMARY2) },
|
||||
{ STR_SHADOW, ZoneOption::Bool, OPTION_VALUE_BOOL(false) },
|
||||
{ nullptr, ZoneOption::Bool }
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@ const uint8_t LBM_OK[] = {
|
||||
};
|
||||
|
||||
#define BL_GREEN COLOR2FLAGS(RGB(73, 219, 62))
|
||||
#define BL_RED COLOR2FLAGS(RED)
|
||||
#define BL_RED COLOR2FLAGS(RGB(229, 32, 30))
|
||||
#define BL_BACKGROUND COLOR2FLAGS(BLACK)
|
||||
#define BL_FOREGROUND COLOR2FLAGS(WHITE)
|
||||
#define BL_SELECTED COLOR2FLAGS(RGB(11, 65, 244)) // deep blue
|
||||
|
||||
@@ -68,19 +68,13 @@ const uint8_t LBM_OK[] = {
|
||||
};
|
||||
|
||||
#define BL_GREEN COLOR2FLAGS(RGB(73, 219, 62))
|
||||
#define BL_RED COLOR2FLAGS(RED)
|
||||
#define BL_RED COLOR2FLAGS(RGB(229, 32, 30))
|
||||
#define BL_BACKGROUND COLOR2FLAGS(BLACK)
|
||||
#define BL_FOREGROUND COLOR2FLAGS(WHITE)
|
||||
#define BL_SELECTED COLOR2FLAGS(RGB(11, 65, 244)) // deep blue
|
||||
|
||||
void bootloaderInitScreen()
|
||||
{
|
||||
// lcdColorTable[COLOR_THEME_SECONDARY1_INDEX] = WHITE;
|
||||
// lcdColorTable[COLOR_THEME_SECONDARY3_INDEX] = BLACK;
|
||||
// lcdColorTable[COLOR_THEME_PRIMARY3_INDEX] = RED;
|
||||
// lcdColorTable[COLOR_THEME_SECONDARY1_INDEX] = RED;
|
||||
// lcdColorTable[COLOR_THEME_SECONDARY2_INDEX] = RGB(73, 219, 62); // green
|
||||
|
||||
backlightEnable(BACKLIGHT_LEVEL_MAX);
|
||||
|
||||
// TODO: load/decompress bitmaps
|
||||
|
||||
Reference in New Issue
Block a user